Operating Systems

What actually happens between my program and the hardware? Processes, threads, the scheduler, system calls, virtual memory, files, descriptors, I/O, synchronization, IPC, sockets and containers — taught by following one program from `./server` down to CPU, RAM, disk and NIC, with simulators you can break.

Follow one operation through every layer

The defining experience: no “Client → Server” and stop. Every arrow can be expanded until you reach the hardware.

  1. C++ / Python / JavaScript program
  2. Runtime
  3. System call
  4. Kernel
  5. Scheduler
  6. Virtual memory
  7. CPU / RAM / Disk / Network
Learn → Visualize → Inspect → Simulate
Every mechanism is derived from the constraint it solves, then shown as a stepped simulation you can run, pause, step and reset.
Break → Debug → Practice → Interview
Labs let you exhaust memory, deadlock threads, drop packets and expire certificates; challenges make you find the root cause across layers.
Accuracy over slogans
Sections are labelled CONCEPTUAL · LINUX · UNIX-STYLE · WINDOWS · IPV4 · IPV6 · SIMULATED · RUNTIME-SPECIFIC so you always know whether you are reading a model or an implementation.

Start here

Journeys

“What actually happens when I…?” — zoom from four boxes to the full internals.

Modules

0/72 lessons mastered
How Programs Run0/4
What an OS is for, and what happens between `./server` and the first instruction on a CPU: loader, address space, process, scheduler.
Several programs want the same CPU, memory, disk and NIC. Who coordinates them?
Processes0/3
A process is a running program with an identity, an address space, a state, open resources and a parent. The process table, the state machine, fork and exec.
How does one executable become three isolated running instances?
Threads, Async & Event Loops0/7
Threads inside a process, concurrency vs parallelism, threads vs async vs processes, and how C++, JavaScript/TypeScript and Python each map onto the OS.
Why can a single core run a thousand tasks "at once", and why is that not parallelism?
CPU Scheduling0/3
A hundred runnable processes, eight cores. Ready queues, time slices, priority, preemption, fairness, and what a context switch actually saves and restores.
There are 100 runnable processes and 8 cores. Who runs, and for how long?
System Calls & Kernel Mode0/2
Why applications cannot touch hardware directly, the user/kernel boundary, and what a system call costs.
Why can’t my program just write to the disk itself?
Stack & Heap0/4
The process memory layout, stack frames pushed and popped by function calls, the heap under `new`/`malloc`/object allocation, and what a stack overflow really is.
Where does a local variable live, where does an object live, and why does recursion have a limit?
Virtual Memory & Paging0/9
Every process believes it owns a huge private memory. Pages, frames, page tables, the TLB, page faults, memory pressure, memory mapping and copy-on-write.
Multiple processes each believe they have their own large continuous memory. How?
Files, File Systems & Descriptors0/4
Paths, files, directories, metadata, permissions, offsets; the descriptor table; how a path becomes blocks on storage; inodes on Unix-style systems.
What is the difference between a filename and a file — and what is FD 3?
I/O0/4
Follow a `read()` from the call to the SSD and back; blocking, non-blocking, asynchronous and multiplexed I/O; and why a file and a socket are the same kind of thing.
How can one thread wait for 10,000 sockets without spinning?
Concurrency, Synchronization & Deadlocks0/7
Race conditions, lost updates, visibility, critical sections, mutexes, semaphores, atomics, and the four ingredients of a deadlock.
Two threads both add one to a counter and the result is one. Why?
Inter-Process Communication0/4
Pipes, shared memory, message queues, signals and sockets — compared on speed, isolation, complexity and local-vs-remote.
Two isolated processes need to talk. What are the options and what does each cost?
Sockets0/1
The socket abstraction as the OS sees it: a descriptor with buffers behind it, and the bridge into the Networking domain.
What does the kernel actually give me when I call `socket()`?
Containers & the OS0/3
Containers are not small virtual machines: namespaces, control groups, layered filesystems, shared host kernel, and how that differs from a hypervisor.
If a container has no kernel of its own, what is actually isolating it?
OS Internals Lab0/2
A configurable OS simulator — cores, processes, threads, RAM, I/O, locks — and a panel of buttons to break it, then diagnose the failure.
What happens to the scheduler, memory and I/O when I exhaust something?
OS Debugging & Capstone0/2
High CPU, high memory, hangs, too many open files: the diagnosis playbook, and the capstone — explain a 50,000-connection server layer by layer, then diagnose what was injected.
The process is at 100% CPU. What are the four different things that could mean?
OS + Networking Together0/13
Follow `send()` through the socket API, the kernel, the transport stack and the NIC to a server that wakes up in `recv()`; build a tiny server from blocking to event-driven; buffers, backpressure, zero-copy and a combined failure simulator.
What actually happens between writing `send()` and another machine’s process waking up?

Connected to the other domains

These domains are one map, not isolated courses.