GATE 2024 CS (CS1) – Question 62
Consider a memory management system that uses a page size of 2 KB. Assume that both the physical and virtual addresses start from 0. Pages 0, 1, 2, and 3 are stored in page frames 1, 3, 2, and 0, respectively. The physical address (in decimal format) corresponding to the virtual address 2500 (in decimal format) is _________
Practise this question in The GATE Grind →
Show answer and explanation
Correct answer: 6596
Explanation
**1. Split the virtual address.** Page size is 2 KB = 2048 bytes. Integer division gives $2500=1(2048)+452$, so the virtual page number is 1 and the offset is 452 bytes.
**2. Apply the page-table mapping.** The given mapping sends virtual page 1 to physical frame 3. Translation changes the page/frame number but retains the offset.
**3. Reassemble the physical address.** Frame 3 starts at $3(2048)=6144$. Add the offset: $6144+452=\mathbf{6596}$. Addresses start at zero, so no extra one is added.