OS & Hardware

With 48 virtual address bits in use, 4 KB pages and 512-entry (9-bit) tables at each level, how many levels must a multilevel page table walk?

  1. A2
  2. B3
  3. C4
Show answer and explanation

Answer: C. 4

A 4 KB = 2¹² page means the low 12 bits are the page offset. The remaining 48 − 12 = 36 bits form the page number, and at 9 bits per level that gives 36 ÷ 9 = 4 levels. Each table holds 512 entries × 8 bytes = 4 KB, fitting exactly in one page. A TLB miss may require up to four memory reads, which is why caching TLB and page-table entries matters. Three levels would correspond to 39-bit addresses.

  • A. Two levels cover only 18 bits.
  • B. Three levels correspond to 39-bit virtual addresses.
  • C. Correct. (48 − 12) ÷ 9 = 4 levels.
Practice this topic Back to topic

More OS & Hardware questions

  1. Which combination of information does a page-table entry usually contain?
  2. What is the advantage of using copy-on-write when duplicating a process?
  3. Which describes demand paging?
  4. In the clock (second-chance) page-replacement algorithm, what is each page's reference bit used for?
  5. With FIFO page replacement, adding physical pages can sometimes increase page faults. What is this phenomenon called?