GATE / CS ARCHIVE

GATE CSE 2013 / QUESTION 52

Page size in a three-level page table

Operating Systems · Virtual Memory & Paging · Full GATE CSE 2013 paper

GATE 2013, Q52 2 marks · MCQ
Report issue

Virtual Memory & Paging

Question 52, GATE 2013: A46-bit virtual/32-bit physical address machine uses 3-level paging. T1 fits exactly one page; T1 entries point to page-sized T2 blocks; T2 entries point to page-sized T3 blocks of 32-bit PTEs. Under32-bit table entries throughout, page size: A2, B4, C8, D16 KB. Shared data:1MB16-way virtually indexed physically tagged cache, 64-byte block.
Question 52, GATE 2013: A46-bit virtual/32-bit physical address machine uses 3-level paging. T1 fits exactly one page; T1 entries point to page-sized T2 blocks; T2 entries point to page-sized T3 blocks of 32-bit PTEs. Under32-bit table entries throughout, page size: A2, B4, C8, D16 KB. Shared data:1MB16-way virtually indexed physically tagged cache, 64-byte block.
Tap to enlarge
Your answer
Answer & solution

Official answer: C

Let each page contain 2p bytes. Under the standard fixed-width organization, a 32-bit PTE or physical-address entry occupies four bytes, so each page-sized table contains 2p−2 entries and each of the three levels uses p−2 index bits. The page offset uses p bits. Covering the 46-bit virtual address therefore gives 3(p−2)+p=46, hence 4p=52 and p=13. The page size is 213 bytes=8 KiB, labeled 8 KB in the options, so C. This uses 32-bit entries at the upper levels as well as the stated 32-bit leaf PTE, page-sized table blocks, full address-space coverage, and the usual binary KB convention.

A page of 2^pbytes contains 2p/4=2p−2table entries when each occupies 4 bytes. Hence each level contributes p−2 index bits and the final byte offset contributes pbits. With three levels, the address budget is(p−2)+(p−2)+(p−2)+p=46. Solving gives p=13and8192 bytes. The result is conditional on the usual fixed-width pointer entries at upper levels; the problem explicitly gives the leaf PTE size and implies that conventional organization.

Original paper, page 12 · Answer key