C++23 ยท Go ยท Rust ยท Fedora 44

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.

3ร—Every example in modern C++23, Go, and Rust โ€” switch languages with one click
VMPrivileged and two-host demos run in a disposable Fedora 44 KVM lab โ€” never on your laptop
๐Ÿ“ŠObserve everything: bcc/bpftrace, perf, PCP, and OpenTelemetry into Grafana
๐Ÿงฐgdb, valgrind, sanitizers, delve, miri โ€” a real debugging curriculum in every language

What this tutorial is

A chapter-based, hands-on path through Linux systems programming for developers who already program and want to understand what their code asks of the kernel. Each chapter builds the same runnable example idiomatically in C++23, Go, and Rust โ€” processes, files and I/O, memory, IPC, networking, and concurrency, then debugging, containers, observability, and low-latency work. Everything runs locally on Fedora 44 except what genuinely needs root, kernel observation, or a second host โ€” that runs in a disposable KVM lab. eBPF appears as an observation toolkit (bcc-tools, bpftrace, bpftool) aimed at your own programs; this is systems programming, not kernel programming. All container images are UBI-based and run rootless under Podman.

Part 0

Setting Up

Prepare a Fedora 44 workstation for three toolchains, provision the two-VM KVM lab for anything privileged, and stand up the Podman LGTM observability stack โ€” everything later chapters assume.

4 chapters Explore โ†’
Part 1

Foundations

What a system call really is, and the two disciplines this book never stops practicing โ€” how each language reports failure, and how each language shares work.

3 chapters Explore โ†’
Part 2

Files and I/O

From file descriptors and the VFS through the page cache, epoll event loops, and io_uring โ€” building fwatch, a real file watcher, one I/O model at a time.

4 chapters Explore โ†’
Part 3

Processes, Signals, Privilege

fork/exec/wait, safe signal handling, race-free pidfd supervision, and privilege dropping โ€” building pmon, a mini process supervisor that stays with us to the capstone.

4 chapters Explore โ†’
Part 4

Memory

Virtual address spaces, mmap and shared mappings, and what glibc malloc, Rust allocators, and the Go GC actually do โ€” with shmkv, a cross-language mmap-backed key-value store.

3 chapters Explore โ†’
Part 5

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.

3 chapters Explore โ†’
Part 6

Networking

TCP and UDP sockets from first principles to an epoll event loop and a two-VM peer-to-peer chat mesh โ€” plus the time, timers, and deadline discipline every networked program needs.

4 chapters Explore โ†’
Part 7

Concurrency in Depth

Down to the futex, up to lock-free rings and memory ordering, and out to async โ€” C++ coroutines on epoll, the Go scheduler, and tokio โ€” and when plain threads still win. The C++ treatment of these topics has been extracted into its own dedicated, runnable book, C++ Concurrency and Parallelism (patterncatalyst.github.io/cpp-concurrency-and-parallelism); the chapters here now point to it.

3 chapters Explore โ†’
Part 8

Debugging

gdb from core dump to remote gdbserver in the VM, valgrind versus sanitizers versus miri, an eBPF observation toolkit aimed at our own daemons, and each language's native toolbelt.

4 chapters Explore โ†’
Part 9

Containers and Virtualization

Namespaces, cgroup v2, seccomp, and Landlock as APIs our programs call โ€” then our daemons living inside Podman containers and the real trade-offs of containers versus KVM virtual machines.

4 chapters Explore โ†’
Part 10

Observability

From /proc, /sys, and cgroup stats through the USE method and eBPF tools to OpenTelemetry in all three languages, flowing into the local LGTM stack โ€” with Cockpit and Performance Co-Pilot alongside.

3 chapters Explore โ†’
Part 11

Performance and Low Latency

Benchmark without lying to yourself, strip a hot path down to pinned cores and zero allocation, and finish by assembling every artifact into a supervised, sandboxed, fully observed two-VM fleet.

3 chapters Explore โ†’
Part 12

Deep Dives

Language-specific excursions โ€” embedding Lua as a policy engine in all three languages, Rust macros for systems code, and the Go runtime from a systems programmer's seat.

3 chapters Explore โ†’
Part 13

Appendices: Tooling

Reference-depth guides to the analysis suites โ€” Cockpit, SystemTap, and Performance Co-Pilot โ€” and the full C++, Go, and Rust toolboxes that keep this book's examples sharp.

4 chapters Explore โ†’
Part 14

Compendium: C++ Concurrency

A C++-only compendium that takes one workload through every concurrency model the language offers โ€” pthreads, std threading, Boost.Thread, C++20 coroutines, Boost.Fiber, Boost.Asio. This compendium has been extracted into its own dedicated, runnable book, C++ Concurrency and Parallelism (patterncatalyst.github.io/cpp-concurrency-and-parallelism); the chapters here now point to it.

8 chapters Explore โ†’