Type a branch, a subject or a topic — “round robin”, “paging”, “civil”.

Operating Systems

Every topic is a step-by-step animation with the reasoning written beside it — not just what the OS did, but why it decided that.

Start from the beginning →

11 topics you can watch now, 17 still to come.

Foundations

What an operating system actually is, and why one exists at all.

Processes

The unit of work an OS schedules, and the states it moves through.

  • Context switching
  • Threads vs processes
  • Inter-process communication

CPU Scheduling

Who gets the CPU next, and what each answer costs you.

  • Multilevel feedback queues

Virtual Memory

What happens when the pages you need do not fit in memory.

  • Paging and address translation
  • Segmentation
  • Thrashing and the working set

Synchronisation

Two processes, one shared variable, and everything that can go wrong.

  • Race conditions
  • Critical sections and Peterson's solution
  • Semaphores
  • Producer-consumer
  • Readers-writers
  • Dining philosophers

Deadlock

The four conditions, and the cost of each way out.

  • Coffman conditions
  • Resource allocation graphs
  • Banker's algorithm
  • Detection and recovery

About Operating Systems

An operating system is the program that lies to every other program. It tells each one that it has the whole machine — all the memory, a CPU that never pauses, files that are simply there — and then quietly multiplexes one set of hardware between all of them. Almost everything in this subject is a mechanism for maintaining one of those lies convincingly.

That framing matters because it turns a pile of apparently unrelated topics into one question asked repeatedly. Scheduling is the lie about having a CPU. Virtual memory is the lie about having all the memory. File systems are the lie about persistent, named, contiguous storage. Once you see the pattern, the algorithms stop being arbitrary and start being answers to a specific cost.

It is also the subject where intuition fails most often, which is why every topic here runs as an animation. Convoy effects in first-come-first-served, thrashing under a page-replacement policy, the exact interleaving that produces a deadlock — these are all things you can be told and still not believe until you watch the queue build.

What to know first

  • Any one programming language, well enough to know what a variable and a function call cost
  • A rough picture of memory as addresses holding bytes

Where it gets used

  • Diagnosing why a service slows down under load rather than simply failing
  • Reading container and cgroup limits as the resource abstractions they are
  • Understanding why a database wants direct control of its own caching
Dashed entries are mapped but not animated yet. The running order is not fixed until a topic is built. Browse the other subjects.