Skip to content
Official PYQ · 2025

GATE CS 2025 Set 2 Q48 — Memory Management and Virtual Memory

Explain with AI
A computer system supports a logical address space of 2322^{32} bytes. It uses two-level hierarchical paging with a page size of 40964096 bytes. A logical address is divided into a bb-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 bb is _________. (Answer in integer)
View worked solution

Answer: 11:11

To find the value of bb, we can break down the logical address into its constituent parts based on the given specifications:

  1. Logical Address Size:

    The logical address space is 2322^{32} bytes. Therefore, the logical address size is 3232 bits.

  2. Page Offset:

    The page size is 40964096 bytes (2122^{12} bytes). Thus, the offset within the desired page requires log⁡2(4096)=12\log_2(4096) = 12 bits.

  3. Inner Page Table Index (Offset within the page of the inner page table):

    All pages in the system, including those holding the inner page tables, have a size of 40964096 bytes.

    Each entry in the inner page table is 88 bytes (232^3 bytes).

    The number of entries that can fit into a single page of the inner page table is:

    Number of entries=Page SizePage Table Entry Size=4096 bytes8 bytes=512=29\text{Number of entries} = \frac{\text{Page Size}}{\text{Page Table Entry Size}} = \frac{4096\text{ bytes}}{8\text{ bytes}} = 512 = 2^9

    Thus, to index an entry within a page of the inner page table, we need log⁡2(512)=9\log_2(512) = 9 bits.

The logical address is divided as follows:

Logical Address (32 bits)=Outer Page Index (b)+Inner Page Index (9 bits)+Page Offset (12 bits)\text{Logical Address (32 bits)} = \text{Outer Page Index } (b) + \text{Inner Page Index (9 bits)} + \text{Page Offset (12 bits)}

Substituting the values:

b+9+12=32b + 9 + 12 = 32 b+21=32b + 21 = 32 b=11b = 11

Thus, the value of bb is 11.

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

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