Level 2 · Processes, Memory & Storage¶
Level 2 is about a system that's running, not just installed. You'll send real signals and watch processes change
state, read /proc/<pid>/status to see what the kernel actually tracks about a process, trigger an OOM kill on
purpose, partition and mount a disk with LVM, and write your own systemd unit files instead of only reading ones
someone else wrote.
What was run, and what wasn't
Process, memory, disk and systemd examples in this level were run on a real Linux VM. Memory-pressure and
OOM-killer behaviour depends on the kernel's overcommit settings and available RAM, so exact numbers (how much
memory before the kill, which process is chosen) will differ on your machine — the mechanism shown is real, the
specific numbers are this lab's, and the lessons say so.
Prerequisites: Level 1 (processes, permissions, the filesystem). You do not need root for most of this level; the lessons that do (LVM, OOM provocation) say so and suggest doing them in a disposable VM.
Modules¶
- Process States, Signals & Job Control: running/sleeping/zombie/stopped,
SIGTERMvsSIGKILLvsSIGSTOP, and why a zombie can't be killed. - Scheduling: Nice, Priorities & the CFS: niceness vs real priority, how the Completely Fair Scheduler picks the next process to run.
- Memory Management: virtual address space, paging, page cache vs "free" memory, and provoking the OOM killer on purpose.
- Disks & Block Devices: partitions, LVM physical/volume/logical groups, and creating an ext4 vs xfs filesystem.
- Mounting, fstab & Network Filesystems: mount namespaces at a glance,
/etc/fstabfields, bind mounts, and NFS basics. - systemd Deep Dive: units, targets, the dependency graph, and
systemd-analyze. - Writing systemd Services & Timers: a real unit file,
Restart=, and a timer that replaces a cron job. - Logging & journald: structured logs,
journalctlfilters, and persistent vs volatile journals. - Device Files, udev & /dev: character vs block devices, major/minor numbers, and how udev names a new device.
- Project: Diagnose a Resource-Starved System: a script that eats memory and CPU on purpose, and the diagnostic pass that finds and explains it.
After Level 2¶
Level 3 goes outward: how Linux resolves a name and routes a packet, firewalls old and new, SSH's actual protocol, SELinux/AppArmor, and the namespaces and cgroups that containers are built from.