GATE CS 2025 Set 2 | Question 58

NAT · 2 marks

A computer system supports a logical address space of \(2^{32}\) bytes. It uses two-level hierarchical paging with a page size of 4096 bytes. A logical address is divided into a \(b\)-bit index to the outer page table, an offset within the page of the inner page table, and an offset within the desired page. Each entry of the inner page table uses eight bytes. All the pages in the system have the same size.

The value of \(b\) is ___________ . (Answer in integer)

Answer

11

Explanation

Split the 32-bit logical address from the right:

  • Offset within the desired page: \(4096 = 2^{12}\) bytes, so 12 bits.
  • Offset within a page of the inner page table: one page holds \(4096 / 8 = 512 = 2^{9}\) eight-byte entries, so 9 bits.
  • Outer page table index: whatever is left, \(b = 32 - 12 - 9 = 11\).

So the outer page table has \(2^{11} = 2048\) entries, each pointing to one page of the inner page table.

Answer: 11