What are the primary mechanisms for Inter-Process Communication? Compare Shared Memory vs. Message Passing in terms of speed and ease of implementation.
Last updated
Inter-Process Communication (IPC) mechanisms include shared memory, message queues, pipes, sockets, signals, and semaphores.
Shared memory maps the same physical pages into both processes. It is fastest (no kernel copying after setup) but harder, since the programmer must synchronize access with mutexes or semaphores.
Message passing uses kernel-mediated
send/receive. It is slower due to copying, but simpler, safer, and works across machines.