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?
- A2
- B3
- 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.