CS FundamentalsHardGATE CS

A 40-bit virtual address space uses 8 KB pages and 8-byte page-table entries, and every page-table node at every level must fit in exactly one page. How many levels are needed, and how many bits index the top level?

  1. A. 3 levels; the top level uses 10 bits
  2. B. 2 levels; the top level uses 14 bits
  3. C. 3 levels; the top level uses 7 bits
  4. D. 4 levels; the top level uses 3 bits

Correct answer: C. 3 levels; the top level uses 7 bits

The VPN is 40 − 13 = 27 bits. A page holds 8192/8 = 1024 entries, so each level resolves 10 bits: 27 = 7 + 10 + 10, giving 3 levels with only 7 bits (128 entries) at the top. Putting the 10-bit levels at the top would leave an odd level at the bottom.

More Operating Systems questions

Exams that ask this topic