CS FundamentalsModerateGATE CS (PYQ pattern)

A 4-level x86-64 style page table maps 4 KB pages through all four levels, 2 MB pages with the third-level entry as the leaf and 1 GB pages with the second-level entry as the leaf. The TLB lookup takes 1 ns and misses on 4% of accesses; of the misses, 70% are to 4 KB pages, 25% to 2 MB pages and 5% to 1 GB pages. Each memory access (page-table read or data) costs 100 ns and nothing is cached. What is the effective access time?

  1. A. 117.0 ns
  2. B. 119.6 ns
  3. C. 114.6 ns
  4. D. 115.6 ns

Correct answer: D. 115.6 ns

Page-table reads per miss: 0.70 x 4 + 0.25 x 3 + 0.05 x 2 = 3.65. EAT = 1 + 100 + 0.04 x 3.65 x 100 = 115.6 ns. Assuming every miss walks four levels gives 117 ns; adding the data access to the walk count again (4.65) gives 119.6 ns; leaving out the 1 ns TLB lookup gives 114.6 ns.

More Operating Systems questions

Exams that ask this topic