INTERMEDIATEFrequently Tested 4 min read 22 views
Virtual Memory, Multi-Level Paging & TLB Effective Access Time
Virtual/physical address bit calculations, optimal page size for multi-level page tables, EMAT, and Belady’s anomaly.
Page Replacement Algorithms & Belady’s Anomaly
| Algorithm | Suffers from Belady’s Anomaly? | Stack Property? | Notes |
|---|---|---|---|
| FIFO | 🚨 YES (e.g. 3 vs 4 frames on 1,2,3,4,1,2,5,1,2,3,4,5) | No | Oldest loaded page evicted |
| Optimal (OPT / Belady) | No | Yes | Provably minimum page faults (non-causal benchmark) |
| LRU (Least Recently Used) | No | Yes | Approximated in hardware using Reference/Clock bit |
Interactive 2-Level Paging + TLB Hardware Address Translation Drawing
Operating SystemsSVG Bus Diagram
Virtual Memory TLB + 2-Level Page Table Hardware Schematic
TLB Hit 90% ⇒ EMAT = 130.0 ns
Key Formulas Summary
Number of Pages & Frames
Note: Page Offset bits = log_2(Page Size)
TLB Effective Memory Access Time (1-Level Page Table)
Note: For k-level page table, TLB miss takes (k + 1) memory accesses!
#OS#Paging#Virtual Memory#TLB#NAT
Practice Questions on This Chapter (2)
Q1GATE CS OS TLBNATMEDIUM
+2M • 0 Neg
A paging system uses a single-level page table in main memory ( access time) and a TLB ( lookup time) with a TLB hit ratio of . Assuming sequential TLB-then-memory lookup, what is the Effective Memory Access Time (EMAT) in nanoseconds?
Q2GATE CS 2023NATMEDIUM
+2M • 0 Neg
A system uses a 2-level hierarchical page table with a TLB. TLB access takes , main memory access takes , and the TLB hit ratio is . Assuming zero page faults, what is the Effective Memory Access Time (EMAT) in nanoseconds?