Project ForgeSign up free
Operating Systems
Memory Management
GATE 2013
Hard

Common Data for this and the next question: A computer uses 46-bit virtual address, 32-bit physical address, and a three-level paged page table organization. The page table base register stores the base address of the first-level table (T1), which occupies exactly one page. Each entry of T1 stores the base address of a page of the second-level table (T2). Each entry of T2 stores the base address of a page of the third-level table (T3). Each entry of T3 stores a page table entry (PTE). The PTE is 32 bits in size. The processor used in the computer has a 1 MB 16-way set associative virtually indexed physically tagged cache. The cache block size is 64 bytes.

What is the size of a page in KB in this computer?

  • A2
  • B4
  • 8
  • D16

Explanation

Let the page size be 2^p bytes. Since each PTE is 32 bits = 4 bytes, a page holds 2^p/4 = 2^(p−2) entries — and since each level's table occupies exactly one page (with the same fan-out at each level), each of the 3 page-table-index fields in the virtual address is (p−2) bits wide. The 46-bit virtual address splits as: offset (p bits) + 3 × index (p−2 bits each): 46 = p + 3(p−2) = 4p − 6, so p = 13. Page size = 2^13 bytes = 8 KB.

Source: GATE CS 2013 (2013)

This question is part of a 15-day revision cycle — sign in and Project Forge will bring it back the day before you'd forget it.

Start revising free