Consider the following reference strings and assume 3 frames are available,…

2025

Consider the following reference strings and assume 3 frames are available, then the number of page faults that occur using Optimal page replacement algorithm is 6, 0, 5, 2, 0, 3, 0, 4, 2, 3, 0, 3, 2, 5, 2

  1. A.

    15 Page Faults

  2. B.

    9 Page Faults

  3. C.

    12 Page Faults

  4. D.

    8 Page Faults

Attempted by 80 students.

Show answer & explanation

Correct answer: D

Using the Optimal Page Replacement algorithm with 3 frames:

1. Access 6: Fault (Frames: [6])

2. Access 0: Fault (Frames: [6, 0])

3. Access 5: Fault (Frames: [6, 0, 5])

4. Access 2: Fault (Replace 6, not used again). Frames: [2, 0, 5]

5. Access 0: Hit

6. Access 3: Fault (Replace 5, used furthest). Frames: [2, 0, 3]

7. Access 0: Hit

8. Access 4: Fault (Replace 0, used furthest). Frames: [2, 4, 3]

9. Access 2: Hit

10. Access 3: Hit

11. Access 0: Fault (Replace 4, never used again). Frames: [2, 0, 3]

12. Access 3: Hit

13. Access 2: Hit

14. Access 5: Fault (Replace 0 or 3, neither used again). Frames: [2, 5, 3]

15. Access 2: Hit

Total Page Faults: 8

Explore the full course: Isro