How many page faults occur for first-in first-out page replacement algorithm…

2022

How many page faults occur for first-in first-out page replacement algorithm for the following reference string when there are 3 frames?
7, 0, 1, 0, 2, 7, 1, 0, 1, 2

  1. A.

    5

  2. B.

    7

  3. C.

    8

  4. D.

    10

Attempted by 93 students.

Show answer & explanation

Correct answer: C

To solve this, simulate FIFO with 3 frames for the string 7, 0, 1, 0, 2, 7, 1, 0, 1, 2. Initial faults occur at 7, 0, and 1. Subsequent faults happen when replacing the oldest page: at 2 (replace 7), at 7 (replace 0), at 0 (replace 1), at 1 (replace 2), and finally at 2 (replace 7). This results in a total of 8 page faults.

Explore the full course: Up Lt Grade Assistant Teacher 2025