NOTE
IPC
IPC lets processes with separate address spaces exchange information. These notes examine communication methods through the limits of direct memory access.
This is a historical learning note and may contain outdated or incomplete understanding.
1. What Is Inter-Process Communication?
It is the exchange of information between processes.
2. Why Inter-Process Communication Is Needed
Because each process has an independent address space, for security reasons the operating system does not allow one process to directly access the address space of another process.
3. Inter-Process Communication Methods
3.1. Semaphore
- A counter used to provide multiple processes with access to shared data objects.
3.2. Shared Memory
- Multiple processes communicate by sharing the same address space. Because data does not need to be copied between processes, this is the fastest form of IPC.
- Semaphores are needed to synchronize access to shared memory.
3.3. Pipe
- Can only implement one-way transmission.
- Can only be used between parent and child processes.
3.4. FIFO
- Also called a named pipe; removes the restriction that pipes can only be used between parent and child processes.
3.5. Message Queue
- A message queue can exist independently of the reading and writing processes.
- Processes do not need to synchronize by themselves.
3.6. socket
- Can be used for inter-process communication between different machines.
4. References
Drag to pan, scroll to zoom, and click a node to expand or collapse it. Large maps start with deeper levels collapsed; click nodes to expand them.
Discussion
Sign in with GitHub to comment. Discussions are stored as GitHub Issues.View on GitHub