Skip to content
Official PYQ · 2023

GATE CS 2023 Q48 — Memory Management and Virtual Memory

Explain with AI
Consider a computer system with 5757-bit virtual addressing using multi-level tree-structured page tables with L\mathrm{L} levels for virtual to physical address translation. The page size is 4 KB(1 KB=1024 B)4 \mathrm{~KB}(1 \mathrm{~KB}=1024 \mathrm{~B}) and a page table entry at any of the levels occupies 88 bytes.

The value of L\mathrm{L} is ______________.
View worked solution

Answer: 5

To find the number of levels LL in the multi-level page table, we analyze the virtual address split:

  1. Page Offset:

    The page size is 4 KB=212 bytes4\text{ KB} = 2^{12}\text{ bytes}.
    Therefore, the page offset requires log⁡2(212)=12\log_2(2^{12}) = 12 bits.

  2. Virtual Page Number (VPN):

    The total virtual address size is 5757 bits.
    The bits allocated for the Virtual Page Number (VPN) are:
    VPN bits=57−12=45 bits\text{VPN bits} = 57 - 12 = 45\text{ bits}

  3. Page Table Entry (PTE) per Page:

    Each page table at any level must fit within a single page of size 4 KB4\text{ KB}.
    Given that each Page Table Entry (PTE) is 8 bytes8\text{ bytes}:
    Number of entries per page table=4 KB8 B=40968=512=29 entries\text{Number of entries per page table} = \frac{4\text{ KB}}{8\text{ B}} = \frac{4096}{8} = 512 = 2^9\text{ entries}
    Thus, each level of the page table indexes exactly 99 bits of the virtual address.

  4. Number of Levels (LL):

    Since each level translates 99 bits of the VPN, the number of levels LL required to translate the 4545-bit VPN is:
    L=459=5L = \frac{45}{9} = 5

Thus, the value of LL is 5.

Free practice · Your answers on this page are not saved.

Published
Report a correction
Keep exploringMore Memory Management and Virtual Memory questions