A program has five virtual pages, numbered from 0 to 4. If the pages are…

2007

A program has five virtual pages, numbered from 0 to 4. If the pages are referenced in the order 012301401234, with three page frames, the total number of page faults with FIFO will be equal to

  1. A.

    0

  2. B.

    4

  3. C.

    6

  4. D.

    9

Attempted by 41 students.

Show answer & explanation

Correct answer: D

The FIFO algorithm uses a queue to track pages. Initial references 0, 1, 2 cause faults filling frames. Subsequent replacements occur at indices corresponding to references 3, 0, 1, 4, 2, and 3 based on the oldest page in memory. The final count is exactly 9 faults.

A video solution is available for this question — log in and enroll to watch it.

Explore the full course: Mppsc Assistant Professor