$linuxjunkies
>

IPC

also: inter-process communication, IPC mechanism

Inter-Process Communication (IPC) is a set of mechanisms that allow processes running on a system to exchange data and synchronize their actions. Common IPC methods include pipes, sockets, message queues, and shared memory.

Inter-Process Communication (IPC) enables separate processes to send messages, share data, and coordinate their execution without one process directly accessing another's memory space. This is essential for building modular, multi-process applications where different components need to work together.

Linux provides several IPC mechanisms, each suited to different needs. Pipes connect process input/output streams sequentially; sockets enable network and local communication; message queues allow asynchronous message passing; shared memory provides fast data sharing; and semaphores coordinate access to shared resources.

For example, when you pipe commands together (cat file.txt | grep pattern), the shell uses IPC to connect the output of cat to the input of grep. Similarly, a web server and database might use Unix sockets (an IPC mechanism) to communicate efficiently on the same machine.

Related terms