OS & Hardware
With 32-bit virtual addresses, 4 KB pages and 4-byte page-table entries, how large is a single-level page table?
- A4 KB
- B4 MB
- C16 MB
Show answer and explanation
Answer: B. 4 MB
A 4 KB = 2¹² page gives a 12-bit offset, so the page number has 32 − 12 = 20 bits and there are 2²⁰ ≈ one million pages. At 4 bytes per entry the table is 2²⁰ × 4 B = 4 MB. Needing 4 MB per process is why multilevel page tables that omit unused parts are standard. 4 KB is the size of one page, and 16 MB would assume 16-byte entries.
- A. 4 KB is the size of one page.
- B. Correct. 2²⁰ entries × 4 bytes = 4 MB.
- C. 16 MB would assume 16-byte entries.