โ Computer Organization & Architecture learning pathComputer Organization & Architecture ยท Module 7 of 10
Virtual memory
Pages, page tables and TLBs.
๐ Key ideas
- Virtual memory gives each process its own address space larger than physical RAM.
- Memory is divided into fixed-size pages (virtual) and frames (physical), often 4 KB.
- The page table maps virtual pages to physical frames; a missing page causes a page fault.
- The TLB is a small cache of recent page-table entries.
- 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