Skip to content
GATEiit

GATE CSE 2021 Set 2 Q58: Minimum page-table memory for 2 GB with a three-level table

Question

Consider a three-level page table to translate a 39-bit virtual address to a physical address as shown below.

39-bit virtual address
Level 1 offsetLevel 2 offsetLevel 3 offsetPage offset
9 bits9 bits9 bits12 bits

The page size is 4KB (1KB=2101\text{KB} = 2^{10} bytes) and page table entry size at every level is 8 bytes. A process PP is currently using 2GB (1GB=2301\text{GB} = 2^{30} bytes) virtual memory which is mapped to 2GB of physical memory. The minimum amount of memory required for the page table of PP across all levels is ________ KB.

Try it: numerical answer: type the value

Numerical answer. No negative marking.
Show answer and explanation

Answer: 4108 (official GATE 2021 final answer key)

Concept used: Each page table at every level has 292^9 entries of 8 bytes, i.e. exactly one 4 KB page; count the tables needed.

First step: 2 GB is 2192^{19} pages, needing 219/29=10242^{19}/2^9 = 1024 level-3 tables; these need 1024/512=21024/512 = 2 level-2 tables and 1 level-1 table.

Full step-by-step solution

Detailed working, common mistakes and linked mock tests will be available with a free GATEiit account. Log-in is coming soon.

Share this question

WhatsAppDownload image

Source: official GATE 2021 Set 2 CS question paper and final answer key, organised by IIT Bombay. Question paper · Answer key