Inter-Process Communication
Inter-process communication, or IPC, is how separate running programs (processes) pass information to each other. Each process has its own private memory, so the operating system (the main software of the computer) has to provide a way to talk. Questions here cover the two models, shared memory and message passing, then pipes (one-way channels between two programs) and the producer-consumer example (one program makes items, another uses them). Examples use made-up numbers.
After this section you can compare the two models, explain how a pipe behaves when it is empty, full or closed, and describe send and receive in their blocking (the caller waits) and non-blocking (the caller carries on) forms.
Topics in this section
- Why processes need IPC, and the two models
- Shared memory against message passing
- Producer-consumer, the standard IPC example
- Pipes and named pipes (FIFO)
- Sockets and signals
- Direct and indirect communication, blocking and non-blocking