Skip to content
Official PYQ · 2015

GATE CS 2015 Set 2 Q47 — Memory Management and Virtual Memory

Explain with AI
A computer system implements 8  kilobyte8\;\text{kilobyte} pages and a 32-bit32\text{-bit} physical address space. Each page table entry contains a valid bit, a dirty bit, three permission bits, and the translation. If the maximum size of the page table of a process is 24  megabytes24\;\text{megabytes}, the length of the virtual address supported by the system is _______ bits.
View worked solution

Answer: 36

To find the length of the virtual address, we can break down the problem into the following steps:

Step 1: Find the size of the Frame Number (Translation)

  • Physical Address Space: 32 bits32\text{ bits}
  • Page Size: 8 KB=213 bytes8\text{ KB} = 2^{13}\text{ bytes} (which means the page offset is 13 bits13\text{ bits})
  • Frame Number (Translation) bits: Physical Address−Page Offset=32−13=19 bits\text{Physical Address} - \text{Page Offset} = 32 - 13 = 19\text{ bits}

Step 2: Calculate the Page Table Entry (PTE) Size

Each page table entry contains:

  • 1 valid bit1\text{ valid bit}
  • 1 dirty bit1\text{ dirty bit}
  • 3 permission bits3\text{ permission bits}
  • 19 bits19\text{ bits} for translation (frame number)
Total PTE size=1+1+3+19=24 bits=3 bytes\text{Total PTE size} = 1 + 1 + 3 + 19 = 24\text{ bits} = 3\text{ bytes}

Step 3: Calculate the Number of Entries in the Page Table

The maximum size of the page table is 24 MB24\text{ MB}.

Number of entries (N)=Maximum Page Table SizePTE Size=24×220 bytes3 bytes=8×220=223 entries\text{Number of entries } (N) = \frac{\text{Maximum Page Table Size}}{\text{PTE Size}} = \frac{24 \times 2^{20}\text{ bytes}}{3\text{ bytes}} = 8 \times 2^{20} = 2^{23}\text{ entries}

Step 4: Determine the Virtual Address Length

  • Since there are 2232^{23} entries in the page table, the Virtual Page Number (VPN) requires 23 bits23\text{ bits}.
  • The page offset is 13 bits13\text{ bits}.
Virtual Address Length=Virtual Page Number bits+Page Offset bits=23+13=36 bits\text{Virtual Address Length} = \text{Virtual Page Number bits} + \text{Page Offset bits} = 23 + 13 = 36\text{ bits}

Thus, the length of the virtual address supported by the system is 36 bits.

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

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