A system has three page frames and uses the Optimal page replacement algorithm. For the reference string 1, 2, 3, 4, 1, 2, 5, how many page faults occur?
Options
- A. 5
- B. 6
- C. 7
- D. More than one of the above
- E. None of the above
Quiz Practice:
A. 5
Explanation: Initially, 1, 2 and 3 cause three page faults. When 4 is referenced, the page whose next use is farthest in the future is replaced. Later, 1 and 2 are hits, and 5 causes another replacement. The total number of page faults is 5.