consider a machine with 64Mbyte physical memory and a 32 bit virtual address.…

2001

consider a machine with 64Mbyte physical memory and a 32 bit virtual address. if the page size is 4 kByte, what is the approximate size of the page table?

  1. A.

    16 Mbyte

  2. B.

    8 Mbyte

  3. C.

    2 Mbyte

  4. D.

    24 Mbyte

Attempted by 30 students.

Show answer & explanation

Correct answer: C

Determine the Number of Pages (Entries in Page Table)

The number of entries in a single-level page table is equal to the number of virtual pages in the virtual address space.

  • Virtual Address Space: 232 bytes (since it is a 32-bit address).

  • Page Size: 4kB = 212 bytes.

  • Number of Entries: 232/212 = 220 entries (approx. 1 million entries).

2. Determine the Page Table Entry (PTE) Size

A Page Table Entry must, at minimum, store the physical frame number.

  • Physical Memory: 4MB = 226 bytes.

  • Number of Frames: 226 / 212 = 214 frames.

  • To address 214 frames, we need 14 bits.

  • In practice, PTEs also include protection bits (valid/invalid, read/write, dirty bits). Typically, PTE sizes are rounded up to the nearest byte or power of 2 for alignment. A 14-bit address would require at least a 2-byte (16-bit) entry.

3. Calculate Total Page Table Size

Total Size = Number of Entries x PTE Size

Total Size = 220 x 2 bytes = 2 x 220 bytes = 2 Mbyte

A video solution is available for this question — log in and enroll to watch it.

Explore the full course: Gate Guidance By Sanchit Sir