CS FundamentalsVery hardProduct company interview · GATE level

A system with a TLB and a two-level page table has TLB access time 10 ns (searched before memory), memory access time 100 ns and a TLB hit ratio of 90%; a TLB miss requires walking both levels in memory. In addition, 1 in every 100,000 memory references causes a page fault; servicing a fault takes 8 ms if the victim page is clean and 20 ms if it is dirty, and 30% of victims are dirty. Counting a faulting reference as just its service time, what is the effective access time?

  1. A. 130 ns
  2. B. About 210 ns
  3. C. About 236 ns
  4. D. About 246 ns

Correct answer: D. About 246 ns

Without faults: hit 10 + 100 = 110 ns; miss 10 + 2 x 100 (two table levels) + 100 = 310 ns; average 0.9 x 110 + 0.1 x 310 = 130 ns. Average fault service = 0.7 x 8 + 0.3 x 20 = 11.6 ms = 11,600,000 ns. EAT = (1 - 10^-5) x 130 + 10^-5 x 11,600,000 = about 130 + 116 = 246 ns. 210 ns ignores the dirty pages (8 ms only); 236 ns treats the page table as single-level; 130 ns ignores faults altogether - yet one fault in 100,000 almost doubles the access time.

More Operating Systems questions

Exams that ask this topic