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
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.