Skip to content
Official PYQ · 2008

GATE CS 2008 Q67 — Memory Management and Virtual Memory

Explain with AI

A processor uses 3636 bit physical address and 3232 bit virtual addresses, with a page frame size of 44 Kbytes. Each page table entry is of size 44 bytes. A three level page table is used for virtual to physical address translation, where the virtual address is used as follows:

  • Bits 30−3130-31 are used to index into the first level page table.
  • Bits 21−2921-29 are used to index into the 2nd level page table.
  • Bits 12−2012-20 are used to index into the 3rd level page table.
  • Bits 0−110-11 are used as offset within the page.

The number of bits required for addressing the next level page table(or page frame) in the page table entry of the first, second and third level page tables are respectively

Choose one option
View worked solution

Answer: D

To find the number of bits required to address the next level page table or page frame, we first determine the size and alignment requirements of each level's page table.

1. Size of each level's page table:

  • Level 1: Index has 22 bits (bits 30–3130\text{--}31). Number of entries = 22=42^2 = 4.
    Size = 4×4 bytes=16 bytes4 \times 4\text{ bytes} = 16\text{ bytes}.
  • Level 2: Index has 99 bits (bits 21–2921\text{--}29). Number of entries = 29=5122^9 = 512.
    Size = 512×4 bytes=2 KB512 \times 4\text{ bytes} = 2\text{ KB} (211 bytes2^{11}\text{ bytes}).
  • Level 3: Index has 99 bits (bits 12–2012\text{--}20). Number of entries = 29=5122^9 = 512.
    Size = 512×4 bytes=2 KB512 \times 4\text{ bytes} = 2\text{ KB} (211 bytes2^{11}\text{ bytes}).
  • Physical Page Frame: Size = 4 KB4\text{ KB} (212 bytes2^{12}\text{ bytes}).

2. Addressing bits required in each level:

  • First Level PTE points to a Level 2 page table. Since a Level 2 page table is 2 KB2\text{ KB} in size, its starting physical address must be aligned to a 2 KB2\text{ KB} boundary (the lowest 1111 bits are 00). Thus, the number of bits required to address it is: 36−11=25 bits36 - 11 = 25\text{ bits}
  • Second Level PTE points to a Level 3 page table. Since a Level 3 page table is also 2 KB2\text{ KB} in size, its starting physical address must be aligned to a 2 KB2\text{ KB} boundary (the lowest 1111 bits are 00). Thus, the number of bits required to address it is: 36−11=25 bits36 - 11 = 25\text{ bits}
  • Third Level PTE points to a physical page frame. Since a page frame is 4 KB4\text{ KB} in size, its starting physical address must be aligned to a 4 KB4\text{ KB} boundary (the lowest 1212 bits are 00). Thus, the number of bits required to address it is: 36−12=24 bits36 - 12 = 24\text{ bits}

Therefore, the required bits are 25, 25, and 24 respectively.

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

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