A LRU page replacement is used with four page frames and eight pages. How many page faults will occur with the reference string 0172327103 if the four…
A LRU page replacement is used with four page frames and eight pages. How many page faults will occur with the reference string 0172327103 if the four frames are initially empty?
Show answerHide answer
Correct answer: (B) 7
Explanation
Reference string 0 1 7 2 3 2 7 1 0 3 with 4 frames (LRU): 0, 1, 7, 2 are faults (4); 3 replaces 0 (5); 2, 7, 1 are hits; 0 replaces 3 (6); 3 replaces 2 (7). Total page faults = 7.