Question 45

How many page faults occur in LRU page replacement algorithm for the given reference string, with four page frames.

How many page faults occur in LRU page replacement algorithm for the given reference string, with four page frames. 7, 0, 1, 2, 0, 3, 0, 4, 2, 3, 0, 3, 2, 1, 2, 0, 1
  1. A6
  2. B8
  3. C7
  4. D9
Show answerHide answer

Correct answer: (C) 7

Explanation

With LRU and 4 frames: 7, 0, 1, 2 are 4 faults; 3 replaces 7; 4 replaces 1; then 1 replaces 4. All other references are hits, so there are 7 page faults.

From DSSSB TGT Computer Science Practice Set 2

This is question 45 of DSSSB TGT Computer Science Practice Set 2. See all questions of this paper with answers, or attempt the paper as a timed online test to get your score and all-India rank.