Skip to content
Official PYQ · 2014

GATE CS 2014 Set 3 Q20 — Memory Management and Virtual Memory

Explain with AI

A system uses 33 page frames for storing process pages in main memory. It uses the Least Recently Used (LRU) page replacement policy. Assume that all the page frames are initially empty. What is the total number of page faults that will occur while processing the page reference string given below? 

4, 7, 6, 1, 7, 6, 1, 2, 7, 2\text{4, 7, 6, 1, 7, 6, 1, 2, 7, 2}

View worked solution

Answer: 6

We have 33 initially empty page frames and use the Least Recently Used (LRU) page replacement policy. Let us trace the page reference string step-by-step:

Step Reference Frames (LRU → MRU) Page Fault? Remarks
14[4]Yes (1)Initial allocation
27[4, 7]Yes (2)Initial allocation
36[4, 7, 6]Yes (3)Initial allocation
41[7, 6, 1]Yes (4)Replaces 4 (LRU)
57[6, 1, 7]NoHit
66[1, 7, 6]NoHit
71[7, 6, 1]NoHit
82[6, 1, 2]Yes (5)Replaces 7 (LRU)
97[1, 2, 7]Yes (6)Replaces 6 (LRU)
102[1, 7, 2]NoHit

Thus, the total number of page faults that occur is 6.

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

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