OSTEP VizTools
Step-by-step animations of the ideas in Operating Systems: Three Easy Pieces. Each tool plays a worked example from the book and lets you try your own inputs.
Virtualization
How the OS gives every process its own CPU and memoryCPU
-
Limited direct execution: traps, system calls and the timer
Follow the protocols line by line and watch the mode bit, the kernel stack and the saved registers change as the OS takes the CPU back.
Chapter 6, Mechanism: Limited Direct Execution -
CPU scheduling: FCFS, SJF, STCF and RR
Fill in a process schedule one decision at a time, see where jobs get preempted, and read off turnaround, response and waiting times.
Chapter 7, Scheduling: Introduction -
The multi-level feedback queue
Watch jobs move between the ready queues, then see how starvation, changing behaviour and gaming break the basic rules and how the fixes repair them.
Chapter 8, Scheduling: The Multi-Level Feedback Queue -
Lottery scheduling: tickets, currencies and transfers
Draw a winning ticket each time slice and walk the job list to find its holder, then see how currency, transfer and inflation change who holds what.
Chapter 9, Scheduling: Proportional Share -
Stride scheduling: exact shares, no dice
Fill in the pass-value table one decision at a time, compare the shares against lottery, and see what a newly arrived job does to the whole thing.
Chapter 9, Scheduling: Proportional Share -
Multiprocessor scheduling: coherence, affinity, SQMS and MQMS
Watch a stale cache read happen, race a shared free list with and without a lock, then compare one shared run queue against one queue per CPU and fix the load imbalance it causes.
Chapter 10, Multiprocessor Scheduling (Advanced)
Memory
-
Address translation with segmentation
Split a 14-bit virtual address into segment and offset, check the bounds, and add the base to find the physical address.
Chapter 16, Segmentation -
malloc() and free() on a 4KB heap
Watch headers and magic numbers get written, chunks split off the free list, and freed chunks pile up as fragmentation.
Chapter 17, Free-Space Management -
Free-space strategies, slab and buddy allocators
Compare first, best, worst and next fit on the same requests, then see how slab caches and buddy splitting avoid the search.
Chapter 17, Free-Space Management -
Paging: translating addresses with a page table
Split a virtual address into page number and offset, read the page-table entry from memory, check its bits, and see why page tables get expensive.
Chapter 18, Paging: Introduction -
A memory trace with paging
Plot every memory access of a loop that zeroes an array, one at a time, and see that half of them are page-table reads.
Chapter 18, Paging: Introduction -
TLBs: caching address translations
Step through a locality-friendly array loop to see hits pile up, then see who handles a miss, why context switches need ASIDs, and how replacement policy and TLB reach can bite you.
Chapter 19, Paging: Faster Translations (TLBs) -
Page Table Design
Watch a flat page table balloon with address-space size, then shrink it with bigger pages, paged segmentation, multi-level tables, and an inverted page table.
Chapter 20, Paging: Smaller Tables -
Swapping: swap space and the page-fault control flow
See how pages live in physical frames or swap-space blocks, then step through the six moves the hardware and OS make when a page isn't there.
Chapter 21, Beyond Physical Memory: Mechanisms
Concurrency
Threads, locks, condition variables and semaphoresNo visualizations here yet.
Persistence
Devices, disks and file systemsNo visualizations here yet.