Virtual Memory Paging and Page Replacement Policies
Virtual memory allows processes to use more address space than physical RAM by mapping logical pages to physical frames. Understanding paging mechanics, the Translation Lookaside Buffer (TLB), and page replacement algorithms (FIFO, LRU, Optimal) is critical for OS coursework, GATE CS, and systems programming interviews.
Interactive Deck
5 CardsLRU vs Optimal page replacement
What is thrashing in virtual memory?
Master this topic effortlessly.
Study G helps you master any topic effortlessly using proven learning algorithms and smart review timing
Download Study GFrequently Asked Questions
What is Belady's anomaly and which algorithm suffers from it?
Belady's anomaly is the counterintuitive result where adding more physical frames increases page faults. Only FIFO page replacement exhibits this behavior. LRU and Optimal are stack algorithms and are immune to it.
How does the TLB improve virtual memory performance?
Without TLB, every memory access requires two lookups: one to the page table, one to data. The TLB caches recent page-to-frame translations, reducing most accesses to a single lookup. With a 99% hit rate, the average penalty is near zero.
What is the difference between paging and segmentation?
Paging divides memory into fixed-size pages — no external fragmentation, but internal fragmentation possible. Segmentation uses variable-size logical units (code, stack, heap) — supports protection but causes external fragmentation.
Modern OS use segmented paging (x86-64 uses paging predominantly).
