GATE / CS ARCHIVE

GATE CSE 2025 SET 1 / QUESTION 14

Sizing a virtual page table

Operating Systems · Virtual Memory & Paging · Full GATE CSE 2025 Set 1 paper

GATE 2025 Set 1, Q14 1 mark · MCQ
Report issue

Virtual Memory & Paging

Question 14, GATE 2025: A byte-addressable demand-paged machine has 32-bit logical addresses, 20-bit physical addresses, and 2048-byte pages. What is the maximum number of entries in a conventional page table? A 2^21; B 2^20; C 2^22; D 2^24.
Tap to enlarge
Your answer
Answer & solution

Official answer: A

Step through it (5 steps)

Approach: Count virtual pages, because a conventional page table has one possible entry per virtual page.
The page size is 2048=211 bytes, so the low 11 bits of a logical address identify a byte within its page. The remaining 32−11=21 bits identify the virtual page. There are therefore 221 possible virtual-page numbers, selecting A.
Equivalently, the virtual address space has 232 bytes and dividing by 211 bytes per page gives 221 pages. Physical-address width is not the numerator in this calculation. It determines that physical memory can contain 220−11=29 frames and that a frame number needs 9 bits.
Demand paging may leave many entries invalid or pages absent from physical memory, but that does not reduce the maximum number of distinct virtual pages the table must represent.

Original paper, page 14 · Answer key