CS FundamentalsVery hardGATE CS

A machine has 46-bit virtual addresses, 16 KB pages, 40-bit physical addresses, and each page-table entry holds the frame number plus 6 flag bits, rounded up to a power-of-two number of bytes. Every page-table node must fit exactly in one page except the top node, which takes the leftover VPN bits. What is the number of levels needed and the size of the top-level table?

  1. A. 3 levels, 8 KB
  2. B. 3 levels, 4 KB
  3. C. 4 levels, 16 KB
  4. D. 3 levels, 1 KB

Correct answer: D. 3 levels, 1 KB

Frame number = 40−14 = 26 bits, plus 6 = 32 bits = 4-byte entries. A 16 KB page holds 4096 = 2¹² entries. VPN = 46−14 = 32 bits, so 12+12 uses two levels and leaves 8 bits for the top: 3 levels, with a top table of 2⁸ × 4 B = 1 KB.

More Operating Systems questions

Exams that ask this topic