Skip to content
Official PYQ · 2022

GATE CS 2022 Q54 — Memory Management and Virtual Memory

Explain with AI
Consider a demand paging system with four page frames (initially empty) and LRU\text{LRU} page replacement policy. For the following page reference string
7,2,7,3,2,5,3,4,6,7,7,1,5,6,17, 2, 7, 3, 2, 5, 3, 4, 6, 7, 7, 1, 5, 6, 1
the page fault rate, defined as the ratio of number of page faults to the number of memory accesses (rounded off to one decimal place)\textit{(rounded off to one decimal place)} is _____________.
View worked solution

Answer: 0.6

To find the page fault rate, we trace the Least Recently Used (LRU) page replacement policy with 4 initially empty page frames.

The step-by-step memory state transition for the reference string is shown below:

Access 7 2 7 3 2 5 3 4 6 7 7 1 5 6 1
Frame 1 7 7 7 7 7 7 7 4 4 4 4 4 5 5 5
Frame 2 2 2 2 2 2 2 2 6 6 6 6 6 6 6
Frame 3 3 3 3 3 3 3 7 7 7 7 7 7
Frame 4 5 5 5 5 5 5 1 1 1 1
Fault? F F H F H F H F F F H F F H H

From the trace:

  • Total number of memory accesses = 1515
  • Total number of page faults (F) = 99

The page fault rate is calculated as:

Page Fault Rate=Number of Page FaultsTotal Memory Accesses=915=0.6\text{Page Fault Rate} = \frac{\text{Number of Page Faults}}{\text{Total Memory Accesses}} = \frac{9}{15} = 0.6

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

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