Skip to main content

Learning Resources

This module is populated from the local chunked books in library/raw/semester-05-os-networking/books. Use this page as a source map, not as an instruction to read everything.

Source Stack

BookRoleHow to use it in this module
Operating Systems: Three Easy Pieces (Arpaci-Dusseau)Primary teaching sourceDefault for all virtual memory mechanism and policy explanations. The "Three Easy Pieces" split puts virtualization (of which VM is half) at the center of the book
Operating System Concepts (Silberschatz)Selective support for rigorUse for formal replacement-policy definitions, a cleaner treatment of fragmentation, and additional examples like page-replacement algorithms
Computer Networking / Unix Network ProgrammingNot used this moduleReserved for later networking modules

Resource Map by Cluster

Cluster 1: Address Spaces and Translation

NeedBest local chunkWhy
why virtualize memory at allOSTEP: Virtualizing memoryCleanest "why" argument; sets up every downstream concept
dialogue introOSTEP: Dialogue on memory virtualizationArpaci-Dusseau style framing of the whole problem
the address-space abstractionOSTEP: The address spaceDefines what a process "sees" as memory
every address you see is virtualOSTEP: Aside - every address you see is virtualThe tiny but sticky insight
early systems (pre-VM)OSTEP: Early systemsMotivates why base/bounds and paging arose
base/bounds + dynamic relocationOSTEP: Dynamic relocation exampleThe minimal model of translation
software-based relocationOSTEP: Aside - software-based relocationThe failed historical alternative
HW support summaryOSTEP: Hardware support summaryWhat the MMU must provide
segmentation generalizedOSTEP: Segmentation - generalized base/boundsSegments are base/bounds per region
the segmentation faultOSTEP: Aside - the segmentation faultWhere the term comes from and what it means today
segment sharingOSTEP: Support for sharingWhy segments allowed sharing but paging finishes the job
segmentation OS supportOSTEP: Segmentation OS supportAllocator problem segments expose
paging introOSTEP: A simple example and overviewThe clearest paging walkthrough in the book
paging is slow without TLBOSTEP: Paging is also too slowMotivates the TLB
page-table data structureOSTEP: Aside - the page tableData-structure view of PTEs

Cluster 2: Page Tables and the TLB

NeedBest local chunkWhy
page-table walk worked exampleOSTEP: Paging walkthroughWorked translation with numbers
page table sample PTE layoutOSTEP: 1124 pagetableShows PTE bits (present, dirty, etc.)
bigger-page shortcutOSTEP: Simple solution - bigger pagesWhy huge pages help, and their cost
hybrid paging + segmentsOSTEP: Hybrid approachDesign alternative to multi-level
multi-level page tablesOSTEP: Multi-level page tablesThe canonical tree-structured table
multi-level page tables cont.OSTEP: Multi-level page tables (part 2)Continuation with cost analysis
inverted page tablesOSTEP: Inverted page tablesDesign alternative indexed by frame
TLB basic algorithmOSTEP: TLB basic algorithmThe core translation-caching idea
TLB exampleOSTEP: Example - accessing an arrayWhy locality makes TLBs work
TLB + context switchesOSTEP: TLB issue - context switchesMotivates ASID/PCID
real TLB entryOSTEP: A real TLB entryActual hardware PTE format
hypervisor-managed TLBsOSTEP: Aside - hypervisors and hardware-managed TLBsNested-paging wrinkle

Cluster 3: Page Replacement and Swapping

NeedBest local chunkWhy
beyond physical memoryOSTEP: Beyond physical memory mechanismsEstablishes why swapping exists
swap spaceOSTEP: Swap spaceStorage backing VM
the page faultOSTEP: The page faultFault semantics
why HW does not handle faultsOSTEP: Aside - why HW does not handle page faultsWhy the OS is on the hook
page-fault control flowOSTEP: Page-fault control flowThe canonical algorithm
when replacement happensOSTEP: When replacements really occurHigh/low watermarks in practice
cache management framingOSTEP: Cache managementVM as a cache
optimal policyOSTEP: The optimal replacement policyOPT as the theoretical lower bound
FIFOOSTEP: FIFOSimplest real policy and Belady's anomaly
workloadsOSTEP: Workload examplesHow workload shape changes which policy wins
no-locality workloadOSTEP: The no-locality workloadWhere every policy looks the same
implementationOSTEP: Implementing historical algorithmsWhy exact LRU is not implemented
thrashing contextOSTEP: 23.1 backgroundSets up replacement policies in Linux
linux page replacementOSTEP: Linux page replacementReal kernel policy sketch
vm tricksOSTEP: Other neat VM tricksCoW, zero-page, CSM, etc.
OSC: basic page replacementOSC: Basic page replacementAlternate exposition of FIFO/LRU/OPT
OSC: LRUOSC: LRU page replacementFocused LRU treatment
OSC: LRU approximationsOSC: LRU approximation page replacementClock and reference-bit policies
demand paging performanceOSC: Performance of demand pagingQuantitative fault-cost models
global vs local replacementOSC: Global versus local allocationWorking-set policy context
memory compressionOSC: Memory compressionzswap-style modern wrinkle

Cluster 4: Allocators and Fragmentation

NeedBest local chunkWhy
types of memoryOSTEP: Types of memoryStack vs heap vs static
malloc APIOSTEP: The malloc callmalloc/free from user view
common allocator bugsOSTEP: Common errorsUse-after-free, leaks, double-free
forgetting to freeOSTEP: Forgetting to free memoryThe leak canonical example
OS support for heapOSTEP: Underlying OS supportbrk/mmap as heap backing
free-space management strategiesOSTEP: Basic strategiesFirst-fit, best-fit, worst-fit
other approachesOSTEP: Other approaches (segregated lists)Slab/segregated lists, buddy allocator
malloc library (appendix)OSTEP: Memory allocation libraryWriting your own malloc
OSC: fragmentationOSC: FragmentationClean definitions of internal/external
OSC: physical memory mgmtOSC: Management of physical memoryReal kernel allocator description
OSC: user-level memory managersOSC: User-level memory managersUserland allocator landscape
OSC: memory management overviewOSC: Memory management (part four)Unified memory management framing

Cluster 5: Practical Virtual Memory Effects

NeedBest local chunkWhy
fork system callOSTEP: The fork system callEssential to understand CoW
copy-on-write mappingsOSTEP: Copy-on-write mappingsThe CoW mechanism in detail
VM tricks overviewOSTEP: Other neat VM tricksCoW, zero-filled, shared libraries
memory virt summary dialogueOSTEP: Summary dialogue on memory virtualizationCloses the VM story with perspective
bigger pagesOSTEP: Simple solution - bigger pagesMotivates huge pages
OSC: virtual memory chapter introOSC: Virtual memoryOS-level overview with Linux flavor

External Resources (Read-If-Curious)

Only use these if you want a second exposition or supplementary problem source. The module is completable from the local chunks alone.

Use Rules

  • If you are stuck on a mechanism (how does translation / paging / the TLB work?), go to OSTEP first. It is operationally the best.
  • If you want a second, more formal exposition or a different treatment of fragmentation and replacement, open Operating System Concepts.
  • For Linux specifics (THP, NUMA, numactl, /proc/meminfo, /proc/pressure/memory), use the external docs.kernel.org and LWN links.
  • For real allocator internals (jemalloc, tcmalloc), go to the official docs. Books lag here.
  • Open one chunk for one concept gap; do not read sequential OSTEP chapters on autopilot.
  • If rereading does not fix the problem, stop and run the relevant practice lab. In this module, the fix is almost always experimental, not more reading.