Post

12. IPC - Introduction

12. IPC - Introduction

Inter-Process Communication (IPC) refers to the mechanisms that allow processes to exchange data and synchronize their execution. In Linux, multiple processes often need to communicate—whether they are cooperating on a task, sharing resources, or coordinating work.

Linux provides several IPC mechanisms, each with its own use cases, advantages, and trade-offs.

Types of IPC Mechanisms in Linux

Linux provides multiple IPC techniques, which are generally divided into:

  • Communication IPCs: For exchanging data.
  • Synchronization IPCs: For coordinating process execution.

Linux provides several IPC mechanisms, which can be broadly categorized as follows:

IPC MechanismKernel InvolvementCommunication TypeSynchronization Capability
Pipes (Unnamed Pipes)Minimal (via file descriptors)UnidirectionalNo
Named Pipes (FIFOs)Minimal (via filesystem)Unidirectional (bidirectional with care)No
Message QueuesModerate (kernel-managed queue)BidirectionalYes (ordering)
Shared MemoryModerate (shared address space)BidirectionalNeeds external synchronization (e.g., semaphores)
SemaphoresHigh (kernel-managed)N/AYes (synchronization only)
SocketsHigh (network stack)BidirectionalYes (explicit)
SignalsMinimalOne-shot notificationLimited (basic notifications)
This post is licensed under CC BY 4.0 by the author.