Reference and Selective Reading
You do not need to read the source books front-to-back for this module. Use the concept pages and practice pages first. Open these local chunks only when you need alternate exposition, more worked examples, or a deeper exercise lane.
Source Roles
| Source | Role | Why it is here |
|---|---|---|
| Operating Systems: Three Easy Pieces (Arpaci-Dusseau) | Primary teaching source | Best operational explanations of virtualization mechanisms: paging, TLBs, page-fault control flow, and policies. Uses worked numeric examples throughout |
| Operating System Concepts (Silberschatz) | Formal support | Complementary treatment of replacement policies (LRU, LRU approximations, Clock) and a cleaner definition of fragmentation; better for policy surveys |
Linux kernel docs (docs.kernel.org) | Real-system support | Authoritative reference for Linux-specific VM features: THP, NUMA, memory cgroups, PSI |
| LWN.net articles | Modern wrinkles | Journalistic deep-dives on THP, slab, memory compression, CXL, madvise evolution |
| Brendan Gregg performance pages | Diagnosis support | Flame graphs and perf-based memory performance recipes |
Read Only If Stuck
Cluster 1: Address Spaces and Translation
- OSTEP: Virtualizing memory
- OSTEP: Dialogue on memory virtualization
- OSTEP: Early systems
- OSTEP: The address space
- OSTEP: Every address you see is virtual
- OSTEP: 15.1 Assumptions
- OSTEP: 15.2 Dynamic relocation example
- OSTEP: Software-based relocation
- OSTEP: HW support summary
- OSTEP: Dynamic relocation responsibilities
- OSTEP: Segmentation generalized
- OSTEP: The segmentation fault
- OSTEP: Sharing segments
- OSTEP: Segmentation OS support
- OSTEP: 16.7 Summary
- OSTEP: Paging overview
- OSTEP: Paging too slow
- OSTEP: Page-table data structure
- OSTEP: PTE bits
- OSTEP: 18.6 Summary
Cluster 2: Page Tables and the TLB
- OSTEP: TLB basic algorithm
- OSTEP: TLB array example
- OSTEP: RISC vs CISC aside
- OSTEP: TLB context switches
- OSTEP: A real TLB entry
- OSTEP: Bhandarkar & Clark
- OSTEP: Bigger pages
- OSTEP: Paging + segments hybrid
- OSTEP: Multi-level page tables
- OSTEP: Multi-level page tables pt 2
- OSTEP: Inverted page tables
- OSTEP: Hypervisors and HW TLBs
Cluster 3: Page Replacement and Swapping
- OSTEP: Beyond physical memory mechanisms
- OSTEP: Swap space
- OSTEP: The page fault
- OSTEP: Why HW does not handle faults
- OSTEP: Page-fault control flow
- OSTEP: When replacements really occur
- OSTEP: 21.7 Summary
- OSTEP: Cache management
- OSTEP: OPT
- OSTEP: FIFO
- OSTEP: Workloads
- OSTEP: No-locality workload
- OSTEP: Implementing historical algorithms
- OSTEP: 23.1 Background
- OSTEP: Why null-pointer segfaults
- OSTEP: Linux page replacement
- OSC: Basic page replacement
- OSC: LRU
- OSC: LRU approximation
- OSC: Global vs local allocation
- OSC: Performance of demand paging
- OSC: Memory compression
Cluster 4: Allocators and Fragmentation
- OSTEP: Types of memory
- OSTEP: The malloc call
- OSTEP: Common allocator errors
- OSTEP: Forgetting to free
- OSTEP: Underlying OS support
- OSTEP: 14.7 Summary
- OSTEP: Free list low-level mechanisms
- OSTEP: Free list low-level (part 2)
- OSTEP: Basic strategies (free list)
- OSTEP: Other approaches (buddy, segregated)
- OSTEP: Great engineers aside
- OSTEP: 17.5 Summary
- OSTEP: Memory allocation library (appendix)
- OSC: Fragmentation
- OSC: Physical memory management
- OSC: User-level memory managers
Cluster 5: Practical Virtual Memory Effects
- OSTEP: The fork system call
- OSTEP: exec system call
- OSTEP: Why motivating the API
- OSTEP: Other parts of the API
- OSTEP: Other neat VM tricks
- OSTEP: Summary dialogue on memory virtualization
- OSTEP: Copy-on-write mappings
- OSC: Virtual memory overview
Optional Deep Dive
- Linux kernel docs: admin-guide/mm - authoritative reference for THP, NUMA, memory cgroups, and PSI.
- Linux kernel docs: Transparent hugepages - full knobs for THP tuning.
- Linux kernel docs: NUMA memory policy - how
numactl,set_mempolicy, and autobalance work. - LWN: Transparent huge pages in 2.6.38 - canonical historical explanation.
- LWN: The slab allocator series - deep dives on SLAB, SLUB, SLOB evolution.
- Brendan Gregg: Memory flame graphs - identifying memory-bound code with flame graphs.
- Brendan Gregg: Linux performance tools - the complete memory-observability stack.
- jemalloc manual - authoritative reference for the leading production userland allocator.
- tcmalloc design doc - Google's allocator internals.
Concept-to-Source Map
| Primary concept | Best source if stuck | Why this source |
|---|---|---|
| Physical vs virtual addresses | OSTEP: The address space | Defines the abstraction first, mechanism later |
| Base/bounds and segmentation | OSTEP: Segmentation generalized | The cleanest operational treatment of segments |
| Paging | OSTEP: Paging overview | Numeric walkthrough with VPN/offset split |
| Multi-level page tables | OSTEP: Multi-level page tables | Worked example of tree-structured tables |
| Inverted page tables | OSTEP: Inverted page tables | The frame-indexed alternative with tradeoffs |
| TLB as a cache | OSTEP: TLB basic algorithm | The operational model of the TLB |
| Demand paging and faults | OSTEP: Page-fault control flow | Step-by-step fault path |
| Replacement policies | OSTEP: FIFO + OSC: LRU approximations | OSTEP for mechanism, OSC for the policy survey |
| Thrashing and working set | OSC: Performance of demand paging | Quantitative cost model |
| Buddy + slab allocators | OSTEP: Other approaches (buddy, segregated) | The two-layer kernel allocator |
| Userland allocators | OSC: User-level memory managers plus jemalloc docs | Survey + real implementation |
| Internal vs external fragmentation | OSC: Fragmentation | Clean definitions with worked examples |
| Copy-on-write | OSTEP: Copy-on-write mappings | The mechanism in detail |
mmap flavors | OSTEP: Other neat VM tricks | Shared, private, anonymous, file-backed in one place |
| Large pages, NUMA | Linux kernel docs: THP + NUMA policy | Books lag; kernel docs are the truth here |