Inter-Process Communication
Pipes, shared memory, message queues, signals and sockets — compared on speed, isolation, complexity and local-vs-remote.
Processes are isolated by design, so every way for two of them to communicate — pipes, shared memory, sockets, message queues, signals — is a hole the kernel punches on purpose, and each hole trades speed, isolation and reach differently.
A pipe is a small kernel-owned ring buffer with a write end and a read end; the kernel blocks the writer when it is full and the reader when it is empty, turns the last close into EOF, and that is enough to build every shell pipeline and every `subprocess.PIPE`.
Map the same physical pages into two address spaces and data moves between processes at the speed of a load and a store — but the kernel is no longer between them, so every rule about who may write when has to be rebuilt in user space with process-shared locks and atomics.
A signal is a number delivered to a process at a moment it did not choose, interrupting whatever it was doing; that is enough to implement Ctrl-C, graceful shutdown and crash reporting, and it is also why signal handlers are the most constrained code you will ever write.