IAE Academy

GATE 2025 CS2 Q.58: solution and answer

GATE 2025 · CS2Q.58 · 2 marks · NAT

A computer system supports a logical address space of bytes. It uses two-level hierarchical paging with a page size of 4096 bytes. A logical address is divided into a -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 is ___________ . (Answer in integer)

See the question in the paper

Answer and solution

ANSWER

The value of is .

Official answer: 11Source: Official answer key, GATE 2025 CS2 (IIT Roorkee)

  1. The logical address space is bytes, so a logical address has bits.

  2. The page size is bytes, so the offset within the desired page takes bits.

  3. All pages in the system have the same size, so each page of the inner page table is also bytes.

  4. Each inner page table entry is bytes, so one inner-table page holds entries. Indexing into it takes bits.

  5. The remaining high-order bits index the outer page table: .

  6. Check: bits, so the outer page table has entries.

KEY IDEA

The three fields of the address must add up to 32 bits. The two lower fields come from the page size and from how many 8-byte entries fit in one page. The outer index takes whatever bits remain.

WATCH OUT FOR

Taking the inner-table index as the offset within a page, or ignoring the 8-byte entry size. Another slip is using the 4096-byte page size directly as the number of entries, which gives instead of .

From the GATE 2025 CS2 paper. Every question of this paper · Download the full paper · All 10 Memory management questions, with notes

More Memory management questions