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 __________
GATE 2024 CS1 Q.62: solution and answer
Answer and solution
ANSWER
The physical address corresponding to virtual address 2500 is 6596.
Official answer: 6596Source: Official answer key, GATE 2024 CS1 (IISc Bengaluru)
The page size is bytes.
Page number of virtual address 2500: .
Offset within the page: .
The page table, read from the question (pages 0, 1, 2, 3 are in frames 1, 3, 2, 0): Page 1 is therefore in frame 3.
Physical address .
KEY IDEA
Split the virtual address into a page number and an offset by dividing by the page size. Look up the frame in the page table. The physical address is frame number times page size plus offset.
WATCH OUT FOR
Using the page number as the frame number (1 x 2048 + 452 = 2500), or reading the frame list in the wrong order. Another slip is taking 2 KB as 2000 bytes instead of 2048.
From the GATE 2024 CS1 paper. Every question of this paper · Download the full paper · All 10 Memory management questions, with notes
More Memory management questions
- GATE 2024 CS2 Q.64 · NAT · 2 marksConsider a 32-bit system with 4 KB page size and page table entries of size 4 bytes each.
- GATE 2023 CS Q.58 · NAT · 2 marksConsider a computer system with 57-bit virtual addressing using multi-level tree-structured page tables with…
- GATE 2022 CS Q.38 · MCQ · 2 marksWhich one of the following statements is FALSE?
- GATE 2020 CS Q.11 · MCQ · 1 markConsider allocation of memory to a new process. Assume that none of the existing holes in the memory will…
