GateAI
Memory Management and Virtual Memory

GATE CSE 2023 · Q58

NAT2 marksMedium

Time

Consider a computer system with 57-bit virtual addressing using multi-level tree-structured page tables with LL 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 LL is ________.

Your answerNumerical answer

Enter a value to check

Solution

Step-by-step verified solution

Official answer: 5 (±0)

Memory Management and Virtual Memory

To determine the number of levels LL in the multi-level page table, we divide the Virtual Page Number (VPN) bits across the levels:

  1. Virtual Address (VA) size: 57 bits57\text{ bits}

  2. Page size: 4 KB=4×1024 B=212 B4\text{ KB} = 4 \times 1024\text{ B} = 2^{12}\text{ B}

    Page offset bits=log⁡2(212)=12 bits\text{Page offset bits} = \log_2(2^{12}) = 12\text{ bits}
  3. Virtual Page Number (VPN) bits:

    VPN bits=57−12=45 bits\text{VPN bits} = 57 - 12 = 45\text{ bits}
  4. Page Table Entry (PTE) size: 8 bytes=23 bytes8\text{ bytes} = 2^3\text{ bytes}

  5. Number of entries per page table page:

    Entries per page=Page SizePTE Size=4 KB8 B=21223=29=512\text{Entries per page} = \frac{\text{Page Size}}{\text{PTE Size}} = \frac{4\text{ KB}}{8\text{ B}} = \frac{2^{12}}{2^3} = 2^9 = 512
  6. Bits required to index each level:

    Bits per level=log⁡2(512)=9 bits\text{Bits per level} = \log_2(512) = 9\text{ bits}
  7. Number of levels LL:

    L=VPN bitsBits per level=459=5L = \frac{\text{VPN bits}}{\text{Bits per level}} = \frac{45}{9} = 5

Thus, the value of LL is 5.

Try the question first, then check your work.

Think the official key or this write-up is wrong?

Report error or challenge

Examiner trap

The misconception this question tests

This Memory Management and Virtual Memory previous year question is Q58 of the GATE CSE 2023 paper. Find more GATE CSE PYQs on Memory Management and Virtual Memory in Operating Systems, or browse all GATE CSE PYQs.

Free diagnostic

Where do you stand for GATE?

Take the 20-minute diagnostic: the 3 topics that cost you the most marks, and a rank range. Or sit 5 related Memory Management and Virtual Memory PYQs now with no account.

One GATE CSE PYQ every morning

An official question by email at 7 AM IST, with a link to its verified solution. Unsubscribe in one click.

Memory Management and Virtual Memory in GATE CSE

Memory Management and Virtual Memory has 32 GATE CSE PYQs across 22 papers from 2011 to 2026. 15 of them are 2-mark NAT questions like this one, and GATE CSE 2023 has 2.

How GATE tests Memory Management and Virtual Memory

More from GATE CSE 2023

Share this solution

A plain-text card for WhatsApp or Telegram study groups.

GateAI solution cardGATE CSE 2023 · Q58 · NAT

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 …

Topic-wise GATE CS PYQs with verified steps

Independent practice explanation verified by the GateAI team. GATE is conducted by the IITs; question text follows the official paper.