ITPEC FE Morning April 2020 Question 19
Topic: Software
32-bit virtual address space is mapped to 4 k-byte pages. How many pages can be created? Here, 1k bytes represent 1,024 bytes.
Explanation
1,048,576 pages — that is 220, the 32-bit address space divided by the 4 KB page size.
- •Virtual address space: 232 bytes (4 GB)
- •Page size: 4 KB = 4 × 1,024 = 22 × 210 = 212 bytes
- •Number of pages: 232 ÷ 212 = 220
Equivalently, the 32-bit address splits into a 12-bit offset within the page and a 20-bit page number.
Answer (c)
Why not others:
- •(a) — 24 pages of 4 KB cover only 64 KB of the 4 GB space
- •(b) — 210 pages of 4 KB cover only 4 MB; to fill 4 GB with that many pages each would have to be 4 MB
- •(d) — 232 is the number of byte addresses, which would mean pages of one byte
Key rule: The number of pages is the address space divided by the page size; with powers of two, subtract the exponents, which equals the address bits minus the offset bits.
Software · AI-written, may contain errors
This question comes from an official ITPEC past paper. ITPEC Practice is an independent study tool and is not affiliated with ITPEC. See the official FE past-paper collection or Report an issue.