Skip to content
Official PYQ · 2001

GATE CS 2001 Q2.21 — Memory Management and Virtual Memory

Explain with AI

Consider a machine with 6464 MB physical memory and a 3232-bit virtual address space. If the page size s 44 KB, what is the approximate size of the page table?

Choose one option
View worked solution

Answer: C

To find the approximate size of the page table, we first determine the number of entries in the page table and the size of each Page Table Entry (PTE).

1. Number of Entries in the Page Table

The number of entries in the page table is equal to the number of pages in the virtual address space:

  • Virtual Address Space: 2322^{32} bytes (since it is a 3232-bit address space)
  • Page Size: 4 KB=2124\text{ KB} = 2^{12} bytes
Number of Pages=Virtual Address SpacePage Size=232212=220 pages\text{Number of Pages} = \frac{\text{Virtual Address Space}}{\text{Page Size}} = \frac{2^{32}}{2^{12}} = 2^{20} \text{ pages}

Thus, the page table must contain 2202^{20} entries.

2. Size of each Page Table Entry (PTE)

Each entry in the page table must store the physical frame number corresponding to that page:

  • Physical Memory Size: 64 MB=22664\text{ MB} = 2^{26} bytes
  • Number of Frames: 226212=214\frac{2^{26}}{2^{12}} = 2^{14} frames

To address 2142^{14} frames, we need at least log⁡2(214)=14\log_2(2^{14}) = 14 bits for the frame number.

In practice, a page table entry also contains auxiliary control bits (such as valid/invalid, dirty, and read/write protection bits). Rounding the minimum 1414 bits up to the nearest byte boundary for alignment gives:

PTE size=2 bytes (16 bits)\text{PTE size} = 2 \text{ bytes } (16 \text{ bits})

3. Size of the Page Table

Page Table Size=Number of Entries×PTE size=220×2 bytes=2 MB\begin{aligned} \text{Page Table Size} &= \text{Number of Entries} \times \text{PTE size} \\ &= 2^{20} \times 2 \text{ bytes} \\ &= 2 \text{ MB} \end{aligned}

Therefore, the approximate size of the page table is 2 MB.

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

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