OS & Hardware

With 32-bit virtual addresses, 4 KB pages and 4-byte page-table entries, how large is a single-level page table?

  1. A4 KB
  2. B4 MB
  3. 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.
Practice this topic Back to topic

More OS & Hardware questions

  1. 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?
  2. Which combination of information does a page-table entry usually contain?
  3. What is the advantage of using copy-on-write when duplicating a process?
  4. Which describes demand paging?
  5. In the clock (second-chance) page-replacement algorithm, what is each page's reference bit used for?