Eight tracks
Each track is a question the kernel already answers and almost nobody reads the answer to. Prose on one side, a running kernel on the other, and every claim a program you can run against it.
Processes
2 lessonsWhat exactly does the child get?
forkand what is copied, shared and reset;execand what survives it;waitand who reaps; zombies and orphans; process groups, sessions and the controlling terminal.Descriptors
3 lessonsWhich of the three levels is this bug in?
The fd table, the open file description and the inode, drawn apart.
dup2and redirection, the offset two processes share afterfork,O_APPENDagainstlseekandwrite, pipe capacity and the deadlock that follows from not draining one, and leaks as you can see them.Signals
2 lessonsWhen is this delivered, and what does it interrupt?
Dispositions and masks, what cannot be caught, delivery at syscall boundaries,
EINTRand the restart that does not happen,SIGCHLD,SIGPIPE, and whykill -9is not a solution but an admission.PID 1 and lifecycle
1 lessonWhy does your container take ten seconds to stop?
What init owes the system: reaping, forwarding
SIGTERM,execin an entrypoint so the shell gets out of the way, graceful shutdown and the grace period that runs out.Identity and permission
2 lessonsWho does the kernel think you are?
Real and effective uid and gid, supplementary groups, the mode bits and the one function that checks them, setuid and the confused deputy, dropping privilege in the right order, and capabilities instead of root.
/proc and observability
lands inWhat is this process actually doing?
Reading state rather than guessing it.
/forensicsstraceand what it costs,Dstate and why you cannot kill it, and fd and memory forensics on a process you did not start.Namespaces and cgroups
2 lessonsWhat is a container, before any container tooling exists?
PID, mount, net, user and UTS namespaces as views a process holds, and cgroup v2 as a tree:
memory.maxand the OOM killer's score,cpu.maxand throttling that looks like a slow disk.Reading what was generated
lands inWhat will the kernel do with this?
The track the rest exists for. You are handed the entrypoint script, the systemd unit, the
/auditsubprocesscall or the privilege-dropping helper that a model wrote, and asked what the kernel will do with it. Then you run it and read the trace.
12 lessons so far. Every claim in one is a program you can run against the kernel beside it.