🐧 Linux Systems Programming
Tutorial Prerequisites GitHub ↗
Home / IPC
Part 5 3 chapters

IPC

Pipes, FIFOs, UNIX sockets with fd passing, and shared-memory coordination with futexes and eventfd — pmon grows a log pipeline and a control plane; shmkv goes multi-process.

Chapter 18

Pipes, FIFOs, and splice

pmon v4 turns the supervisor into a log pipeline: the pipe as a ring of kernel pages with its capacity read live via F_GETPIPE_SZ, what PIPE_BUF atomicity does and does not promise, FIFO open semantics and the ENXIO trick, SIGPIPE/EPIPE as the writer's contract, and splice moving log bytes into a FIFO without a userspace copy — proven with strace, /proc, and a 5.3 GB/s dd run.

45 minutesRead →
Chapter 19

UNIX sockets and fd passing

pmon grows a control plane on a UNIX stream socket: filesystem vs abstract addresses under ss -x, SO_PEERCRED as kernel-vouched local auth, and SCM_RIGHTS sending an open log fd across process boundaries — proven shared at the open-file-description layer with /proc fdinfo on both sides.

50 minutesRead →
Chapter 20

Shared-memory coordination: futexes and seqlocks

The coordination ladder from a 1 ms poll loop through POSIX message queues to the futex — the kernel's one real primitive, sleep/wake on a shared word — plus a seqlock for read-mostly snapshots, process-shared atomics in all three languages, and a measured IPC latency matrix, as shmkv v1 gains watchers that never poll.

60 minutesRead →
← Previous part Memory Next part → Networking

Linux Systems Programming

A chaptered guide to Linux systems programming in modern C++, Go, and Rust — processes, I/O, memory, IPC, networking, concurrency, debugging, containers, and observability, with runnable examples in all three languages.

Tutorial

  • Outline
  • Prerequisites
  • Lab setup
  • Roadmap

Reference

  • Linux man pages ↗
  • Linux performance (Gregg) ↗
  • View on GitHub ↗
  • Issues ↗
Open source · Apache 2.0 Last built 2026-10-11