map / systems

Pillar 02 · 7 principles

Systems.

The kernel is the platform you’re actually running on.

“The box is slow” is a classic SRE prompt. Answering it well means knowing what the kernel is doing on your behalf: scheduling, memory, file descriptors, and I/O.

01

Processes vs threads

Processes get separate address spaces; threads share one — which makes threads cheap to communicate and easy to corrupt.

Two processes with isolated memory vs one process with threads sharing a heap.

Coming soon
02

Scheduling

The scheduler time-slices runnable threads across cores; when there are more runnable threads than cores, work waits in a run queue.

A run queue feeding cores, with load average counting what’s waiting.

Coming soon
03

Virtual memory

Every process sees its own address space mapped onto physical pages on demand, which is why memory “used” and memory “resident” differ.

A memory map filling up until the kernel reclaims cache, then swaps, then invokes the OOM killer.

Coming soon
04

File descriptors

Files, sockets, and pipes are all just numbered handles in a per-process table — and that table has a limit.

A process’s fd table filling with sockets until EMFILE.

Coming soon
05

Syscalls

A syscall is the only door from user space into the kernel, so tracing syscalls shows you what a program is really doing.

A request crossing user space → kernel → hardware and back.

Coming soon
06

The I/O stack

A write() usually lands in the page cache and returns; durability only happens when data is flushed to the device.

Application → page cache → block layer → device, with fsync forcing the slow path.

Coming soon
07

cgroups & namespaces

A container is a process with namespaces (what it can see) and cgroups (what it can use) — not a tiny VM.

One kernel, several processes, each with its own view and resource limits.

Coming soon

How it shows up in interviews

  • “This host is slow — what do you check, in what order?”
  • Load average vs CPU utilization vs I/O wait.
  • Reading top, vmstat, iostat, and strace output.

Next pillar

03 · Distributed Systems

Everything fails, and it fails partially.

Go →