Operating systems and concurrency
See what the computer does underneath your program.
Sessions
Go in order. Each session is one idea you can drag, step and break.
01How a computer runs code
2 live · 3 comingThe CPU, memory and the kernel.
Interactive
Coming soonThe CPU: fetch, decode, execute
One instruction at a time, billions of times a second.
Interactive
LiveRegisters, caches and RAM
Why some reads take 1 ns and others 100 ns.
Open session →
Interactive
LiveCache lines and locality
Why looping over an array the right way is faster.
Open session →
Interactive
Coming soonNumbers in binary
Integers, overflow and why 0.1 + 0.2 isn't 0.3.
Interactive
Coming soonSystem calls
How a program asks the kernel to do things.
02Processes and threads
1 live · 5 comingRunning many programs at once.
Interactive
Coming soonProcesses
A running program: its memory, files and state.
Interactive
Coming soonThreads
Several paths of execution sharing one process.
Interactive
Coming soonContext switching
What it costs to switch from one thread to another.
Interactive
LiveCPU scheduling
Who runs next: round robin, priorities and fairness.
Open session →
Interactive
Coming soonfork and exec
How a new process is started on Unix.
Interactive
Coming soonInter-process communication
Pipes, sockets, shared memory and signals.
03Memory
2 live · 4 comingWhere your program's data lives.
Interactive
Coming soonStack vs heap
Function frames and longer-lived data.
Interactive
LiveVirtual memory and paging
Every process thinks it has the whole memory to itself.
Open session →
Interactive
Coming soonPage faults and swapping
What happens when memory isn't really there yet.
Interactive
Coming soonMemory allocation
How malloc finds space, and fragmentation.
Interactive
LiveGarbage collection
Mark and sweep, generations and pauses.
Open session →
Interactive
Coming soonMemory leaks
Memory nobody frees, and how to find it.
04Concurrency
3 live · 4 comingMany things at once, without corrupting data.
Interactive
LiveRace conditions
Two threads update one counter and lose an increment.
Open session →
Interactive
Coming soonMutexes and critical sections
Let one thread in at a time.
Interactive
Coming soonSemaphores
Let up to N threads in at once.
Interactive
LiveDeadlocks
Two threads each hold what the other needs.
Open session →
Interactive
LiveCondition variables and producer-consumer
Wait for work without spinning.
Open session →
Interactive
Coming soonAtomics and lock-free code
Compare-and-swap and updates without locks.
Interactive
Coming soonThread pools
A fixed set of workers pulling from a queue.
05Async and parallel models
1 live · 4 comingDifferent ways to do many things.
Already live in other tracks: The event loop, phase by phase, The libuv thread pool
Interactive
Coming soonBlocking vs non-blocking I/O
Wait for the disk, or ask to be told when it's ready.
Interactive
LiveEvent loops and epoll
One thread watching thousands of connections.
Open session →
Interactive
Coming soonAsync vs threads
Two models for concurrency, and the costs of each.
Interactive
Coming soonConcurrency vs parallelism
Juggling tasks vs doing them at the same moment.
Interactive
Coming soonActors and channels
Share by communicating instead of sharing memory.
06Files and storage
0 live · 4 comingWhat happens when you write to disk.
Already live in other tracks: The write-ahead log
Interactive
Coming soonFile systems and inodes
How files, directories and metadata are stored.
Interactive
Coming soonFile descriptors
The numbers that stand for open files and sockets.
Interactive
Coming soonDisk I/O and the page cache
Why a write returns before it reaches the disk.
Interactive
Coming soonfsync and durability
Forcing data onto the disk, and what it costs.
07Virtualization and containers
0 live · 2 comingMany machines on one machine.
Already live in other tracks: Containers vs virtual machines
Interactive
Coming soonVirtual machines and hypervisors
Run whole operating systems side by side.
Interactive
Coming soonNamespaces and cgroups
The kernel features that make a container.
In production
Tools you can use
26 technologies across 9 live sessions. Same names in any language — pick a session to see how the idea maps to the real world.
Services, platforms, protocols and standards — not one stack.
Every performance decision sits on these numbers.
Data layout decides cache performance.
Every OS has a scheduler; you mostly influence it through priorities and limits.
Every modern OS and CPU translates addresses this way.
Managed runtimes all trace the heap; some also count references.
Any language with threads has this bug and the same fixes: locks, atomics or not sharing memory.
Deadlocks appear in threads and in database transactions alike.
Blocking queues implement this pattern for you.
Every high-concurrency server waits on sockets this way.
Roadmap
Coming soonA step-by-step path through the track, with sessions and practice at each stage.
- Stage 1
How a computer runs code
- Stage 2
Processes, threads and memory
- Stage 3
Concurrency
- Stage 4
Async models
- Stage 5
Files, storage and virtualization
Projects
Coming soonBuild something real to lock in the skill.
- Write a thread-safe queue
- Find and fix a deadlock
- Profile a program that's slow for no obvious reason