Skip to content
Official PYQ · 2024

GATE CS 2024 Set 1 Q52 — Memory Management and Virtual Memory

Explain with AI

Consider a memory management system that uses a page size of 2 KB2 \mathrm{~KB}. Assume that both the physical and virtual addresses start from 00. Assume that the pages 0,1,20,1,2, and 33 are stored in the page frames 1,3,21,3,2, and 00, respectively. The physical address (in decimal format) corresponding to the virtual address 25002500 (in decimal format) is ___________.

View worked solution

Answer: 6596

To find the physical address corresponding to the virtual address 25002500, we first need to determine the page number and the offset within that page.

1. Identify Page Size and Offset

The page size is given as 2 KB2\text{ KB}.

Page Size=2×1024 bytes=2048 bytes\text{Page Size} = 2 \times 1024\text{ bytes} = 2048\text{ bytes}

For the virtual address 25002500:

Page Number (p)=⌊25002048⌋=1\text{Page Number } (p) = \lfloor \frac{2500}{2048} \rfloor = 1 Offset (d)=2500(mod2048)=452\text{Offset } (d) = 2500 \pmod{2048} = 452

2. Map Page to Frame

The problem specifies the mapping of pages to physical frames as follows:

  • Page 0→0 \to Frame 11
  • Page 1→1 \to Frame 33
  • Page 2→2 \to Frame 22
  • Page 3→3 \to Frame 00

Since the virtual address belongs to Page 11, it is mapped to Frame 33.

3. Calculate Physical Address

The physical address is calculated using the frame number (ff) and the offset (dd):

Physical Address=(f×Page Size)+d\text{Physical Address} = (f \times \text{Page Size}) + d Physical Address=(3×2048)+452\text{Physical Address} = (3 \times 2048) + 452 Physical Address=6144+452=6596\text{Physical Address} = 6144 + 452 = 6596

Thus, the corresponding physical address in decimal format is 6596.

Free practice · Your answers on this page are not saved.

Published
Report a correction
Keep exploringMore Memory Management and Virtual Memory questions