Virtual Memory & Paging


Answer & solution
Official answer: 154.5 to 155.5
Our answer: 155.0 under conditional page-fault convention
Worked explanation
Under the intended conditional model, split all references into disjoint cases: TLB hit probability .95 and time 120; nonfaulting TLB miss probability .05×.9=.045 and time 220; clean-victim fault probability .05×.1×.8=.004 and time 5220; dirty-victim fault probability .05×.1×.2=.001 and time 10220. These probabilities sum to 1. Weighted contributions are 114,9.9,20.88,10.22 ns, totaling 155.0 ns. The 220 ns baseline counts lookup, page-table read and final data access; the faults add one or two disk transfers. This arithmetic follows the official convention, not a uniquely specified real-system fault handler. An unconditional 10% page-fault rate cannot coexist with 95% valid resident TLB hits in this simple model.
Derivation and answer
A TLB hit costs 20+100=120 ns; a nonfaulting miss costs 20+100+100=220 ns. Average disk work per page fault is 5000+0.20*5000=6000 ns. Interpreting the stated 10% page-fault rate as conditional on a TLB miss gives 0.95*120+0.05*(220+0.10*6000)=155.0 ns, within the official 154.5–155.5 range. The question does not explicitly say conditional: an unconditional 10% fault probability is inconsistent with a 95% valid resident TLB hit ratio in this standard model, since faults can occur only among the 5% misses. Official scoring therefore depends on the conditional interpretation and neglects extra fault-handler/restart overhead.