CS FundamentalsVery hardGATE CS

A 32-bit system uses two-level paging with 4 KB pages and 4-byte entries (a 1024-entry outer table, each inner table mapping 4 MB). A process uses only 16 MB of code at the bottom of its address space and 1 MB of stack at the top. How much memory do its page tables need?

  1. A. 4 MB
  2. B. 20 KB
  3. C. 24 KB
  4. D. 8 KB

Correct answer: C. 24 KB

The 16 MB of code needs 4 inner tables and the 1 MB stack 1 more (it fits inside one 4 MB region), plus the outer table: 6 pages of 4 KB = 24 KB. A flat table would need 4 MB.

More Operating Systems questions

Exams that ask this topic