A system uses FIFO policy for page replacement. It has 4 page frames with no…

2017

A system uses FIFO policy for page replacement. It has 4 page frames with no pages loaded to begin with. The system first accesses 50 distinct pages in some order and then accesses the same 50 pages in reverse order. How many page faults will occur?

  1. A.

    96

  2. B.

    100

  3. C.

    97

  4. D.

    92

Attempted by 109 students.

Show answer & explanation

Correct answer: A

In the first pass, accessing 50 distinct pages with only 4 frames results in a page fault for every access since all pages are new. This generates 50 initial faults. During the second pass in reverse order, the first four pages (P50 to P47) are hits because they remain in the frames. The remaining 46 pages (P46 to P1) cause faults as they are evicted and replaced. Therefore, the total page faults equal 50 + 46 = 96.

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

Explore the full course: Isro