All mock tests are FREE till 31 December — register to save your progress

Consider that a process has been allocated 3 frames and has a sequence of page referencing 1, 2, 1, 3, 7, 4, 5, 6, 3, 1 as . What shall be the difference in page faults for the above string using the algorithms of LRU and optimal page replacement for referencing the string?

Pick an option to check yourself, or open the answer below.

Show answer & explanation

Correct answer: A. 2

Explanation

With 3 frames, LRU faults 9 times on 1, 2, 1, 3, 7, 4, 5, 6, 3, 1; optimal faults 7 times (3 and 1 hit at the end). Difference 2.

More System Software and Operating System questions