Skip to content
BIASED

Inter-process communication

Block 1 of 3~3 min

Why through the kernel

Processes do not share a heap. If one writes an address into memory, another’s read of the “same” virtual address sees different physical pages. To communicate they need a kernel object: either a buffer the kernel copies through (with blocking when empty or full), or shared pages mapped into both address spaces (fast, but races need synchronization).

A plain file as a channel is a poor substitute: no clean EOF event for live writers, polling or locking for readiness, and a path in the filesystem. Pipes, FIFOs, signals, POSIX shared memory and message queues are the purpose-built answers. Choose by need: async notification → signal; byte stream between related processes → pipe; named stream → FIFO; structured messages → message queue; large shared state → shared memory plus a semaphore or mutex.

Answers are saved on the server and tied to this browser until you sign in.