โ† Computer Organization & Architecture learning path
Computer Organization & Architecture ยท Module 7 of 10

Virtual memory

Pages, page tables and TLBs.

๐Ÿ“– Key ideas

  1. Virtual memory gives each process its own address space larger than physical RAM.
  2. Memory is divided into fixed-size pages (virtual) and frames (physical), often 4 KB.
  3. The page table maps virtual pages to physical frames; a missing page causes a page fault.
  4. The TLB is a small cache of recent page-table entries.
  5. Page replacement policies: FIFO, LRU and optimal; thrashing occurs when pages swap constantly.
๐Ÿ’ก Real-life example: Virtual memory is like a library catalogue: your book number (virtual address) is looked up to find which shelf (physical frame) holds it today.
PageFixed-size block of virtual memory
Page tableMaps virtual pages to physical frames
TLBCache of page-table entries
Page faultAccess to a page not in physical memory