The GATE Grind

GATE 2023 CS – Question 58

Operating System · Memory Management and Virtual Memory · 2 marks · Numerical answer

Consider a computer system with 57-bit virtual addressing using multi-level tree-structured page tables with L levels for virtual to physical address translation. The page size is 4 KB (1 KB = 1024 B) and a page table entry at any of the levels occupies 8 bytes. The value of L is ______.

Practise this question in The GATE Grind →

Show answer and explanation

Correct answer: 5

Explanation

57-bit virtual address, page size $4\text{ KB}=2^{12}$ bytes, so the offset takes 12 bits. The page-number part has $57-12=45$ bits.

A page-table entry is 8 bytes. Each page-table level fits in one page: $\dfrac{4096}{8}=512=2^9$ entries, so each level resolves 9 bits.

Number of levels $L=\dfrac{45}{9}=\mathbf5$.

More Memory Management and Virtual Memory questions

All Memory Management and Virtual Memory questions →