GATE | GATE-CS-2007 | Question 83

Consider the data given in above question.

Least Recently Used (LRU) page replacement policy is a practical approximation to optimal page replacement. For the above reference string, how many more page faults occur with LRU than with the optimal page replacement policy?
(A) 0
(B) 1
(C) 2
(D) 3


Answer: (C)

Explanation: LRU replacement policy: The page that is least recently used is being Replaced.

Given String:   1, 2, 1, 3, 7, 4, 5, 6, 3, 1

123  // 1 ,2, 3 //page faults

173 ->7

473 ->4

453 ->5

456 ->6

356 ->3

316 ->1

Total 9

In http://quiz.geeksforgeeks.org/gate-gate-cs-2007-question-82/, In optimal Replacement total page faults=7

Therefore 2 more page faults 

Answer is C

Quiz of this Question



My Personal Notes arrow_drop_up


Article Tags :

Be the First to upvote.


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.