GATE CSE 2024 Session 2 Q64: Min and max page-table pages for 2000 pages in a 2-level table
- Operating System
- 2 marks
- NAT
- No negative marking
Question
Consider a 32-bit system with 4 KB page size and page table entries of size 4 bytes each. Assume 1 KB = bytes. The OS uses a 2-level page table for memory management, with the page table containing an outer page directory and an inner page table. The OS allocates a page for the outer page directory upon process creation. The OS uses demand paging when allocating memory for the inner page table, i.e., a page of the inner page table is allocated only if it contains at least one valid page table entry.
An active process in this system accesses 2000 unique pages during its execution, and none of the pages are swapped out to disk. After it completes the page accesses, let X denote the minimum and Y denote the maximum number of pages across the two levels of the page table of the process.
The value of X+Y is ________
Try it: numerical answer: type the value
Show answer and explanation
Answer: 1028 (official GATE 2024 final answer key)
Concept used: Each inner page-table page holds 1024 entries; the outer directory has 1024 entries.
First step: Minimum: pack 2000 pages into as few inner pages as possible; maximum: spread them so each inner page holds one, limited by the 1024 directory entries.
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
Source: official GATE 2024 Session 2 CS question paper and final answer key, organised by IISc Bangalore. Question paper · Answer key
More Operating System PYQs
- 2026 Session 1 · Q29False statements about deadlocks
- 2026 Session 1 · Q35Minimum resource instances for deadlock freedom (5 processes, max 2)
- 2026 Session 1 · Q59Disk transfer time for random sectors on tracks 5, 12, 7
- 2026 Session 1 · Q63Number of printf calls with fork, continue and break
- 2026 Session 1 · Q64Average FCFS waiting time for alternating A and C processes
- 2026 Session 2 · Q23CPU scheduling algorithm that cannot be preemptive