ਕਿਉਂਕਿ ਹਰ process ਦਾ ਇੱਕ ਵੱਖਰਾ (isolated) address space ਹੁੰਦਾ ਹੈ, ਉਹ ਸਿੱਧੇ variables ਸਾਂਝੇ ਨਹੀਂ ਕਰ ਸਕਦੇ — ਉਹਨਾਂ ਨੂੰ inter-process communication (IPC) ਦੀ ਲੋੜ ਹੁੰਦੀ ਹੈ। OS ਕਈ ਵਿਧੀਆਂ ਪੇਸ਼ ਕਰਦਾ ਹੈ, ਜੋ ਗਤੀ, ਦਿਸ਼ਾ, ਅਤੇ ਕੀ ਉਹ ਮਸ਼ੀਨਾਂ ਵਿਚਕਾਰ ਕੰਮ ਕਰਦੀਆਂ ਹਨ, ਵਿੱਚ ਵੱਖਰੀਆਂ ਹੁੰਦੀਆਂ ਹਨ।
ਮੁੱਖ ਵਿਧੀਆਂ
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
