Question:

Consider a memory management system that uses a page size of 2 KB. Assume that both the physical and virtual addresses start from 0. Assume that the pages 0, 1, 2, and 3 are stored in the page frames 1, 3, 2, and 0, respectively. The physical address (in decimal format) corresponding to the virtual address 2500 (in decimal format) is \_\_\_\_\_.

Updated On: Jan 22, 2025
Hide Solution
collegedunia
Verified By Collegedunia

Solution and Explanation

Step 1: Calculate the virtual page number and offset. The page size is \( 2 \, \text{KB} = 2048 \, \text{bytes} \). The virtual address \( 2500 \) can be divided into: \[ \text{Page number} = \left\lfloor \frac{2500}{2048} \right\rfloor = 1, \quad \text{Offset} = 2500 \mod 2048 = 452. \] Step 2: Map the virtual page to the physical frame. From the given mapping: \[ \text{Page } 1 \to \text{Frame } 3. \] Step 3: Compute the physical address. The physical address is: \[ \text{Physical address} = \text{Frame number} \times \text{Page size} + \text{Offset} = 3 \times 2048 + 452 = 6596. \] Final Answer: \[ \boxed{6596} \]
Was this answer helpful?
0
0

Questions Asked in GATE CS exam

View More Questions