각 프로세스는 격리된 주소 공간을 갖기 때문에, 변수를 그냥 공유할 수 없다 — **프로세스 간 통신(inter-process communication, IPC)**이 필요하다. OS는 속도, 방향, 그리고 머신을 넘어 동작하는지 여부가 다른 여러 메커니즘을 제공한다.
주요 메커니즘
text
Pipe / FIFO → byte stream, one direction; anonymous pipe = parent↔child, named FIFO = any procs
e.g. ls | grep foo (the shell wires stdout→stdin via a pipe)
Shared memory → both map the SAME physical pages → FASTEST (no copy), but you must
synchronize access yourself (semaphore/mutex)
Message queue → kernel-managed queue of discrete messages; decoupled, preserves boundaries
Socket → bidirectional stream/datagram; UNIX-domain (same host) or TCP/UDP (across network)
Signal → tiny async notification (a number), e.g. SIGINT, SIGTERM — control, not data transfer
