∑GateAndNet
Practice MCQs
GATE CS / Operating Systems
Edit
INTERMEDIATE🔥 High-Yield Exam Topic 4 min read 4 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

AlgorithmSuffers 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)NoOldest loaded page evicted
Optimal (OPT / Belady)NoYesProvably minimum page faults (non-causal benchmark)
LRU (Least Recently Used)NoYesApproximated in hardware using Reference/Clock bit
📐 Quick Revision Formula Sheet
Number of Pages & Frames
#Pages=2VA bitsPage Size,#Frames=2PA bitsPage Size\#\text{Pages} = \frac{2^{\text{VA bits}}}{\text{Page Size}}, \qquad \#\text{Frames} = \frac{2^{\text{PA bits}}}{\text{Page Size}}
💡 Page Offset bits = log_2(Page Size)
TLB Effective Memory Access Time (1-Level Page Table)
EMAT=h(tTLB+tm)+(1−h)(tTLB+2 tm)\text{EMAT} = h(t_{\text{TLB}} + t_m) + (1 - h)(t_{\text{TLB}} + 2\,t_m)
💡 For k-level page table, TLB miss takes (k + 1) memory accesses!
#OS#Paging#Virtual Memory#TLB#NAT

🎯 Practice PYQs on This Topic (1)

Q1.GATE CS OS TLBNATMEDIUM
+2 Marks • No Negative

A paging system uses a single-level page table in main memory (100 ns100\text{ ns} access time) and a TLB (20 ns20\text{ ns} lookup time) with a TLB hit ratio of 80%80\%. Assuming sequential TLB-then-memory lookup, what is the Effective Memory Access Time (EMAT) in nanoseconds?

Previous TopicCPU Scheduling, Semaphores & Deadlock Banker’s FormulaNext Topic Page Replacement (FIFO, LRU, Optimal), Unix Inodes & Disk Arm Scheduling