Operating System Interview Questions · Question 18

What is inter-process communication (IPC), and which mechanisms are commonly used?

Interview preparation resource from Gate Smashers.

Interview-ready answer

IPC is the set of mechanisms that let separate processes exchange data and coordinate. Common choices include pipes, message queues, shared memory, signals and sockets.

Operating System Interview Questions diagram explaining What is inter-process communication (IPC), and which mechanisms are commonly used
Understand it clearly

Message-passing mechanisms such as pipes, queues and sockets copy or transfer data through a kernel-managed interface. They provide clear ownership and isolation, and sockets can communicate across machines, but system calls and copying may add overhead.

Shared memory maps the same physical pages into multiple processes and is often the fastest method for large local data. Because the kernel does not automatically coordinate every access, processes must add synchronization such as mutexes, semaphores or atomic operations.

Pipes are simple for related processes, queues preserve message boundaries, shared memory offers high throughput and sockets work across machines. The correct IPC mechanism depends on data volume, relationship between processes, required isolation and whether communication is local or distributed.