Consider a main memory with five page frames and the following sequence of…

2015

Consider a main memory with five page frames and the following sequence of page references: 3, 8, 2, 3, 9, 1, 6, 3, 8, 9, 3, 6, 2, 1, 3. Which one of the following is true with respect to page replacement policies First In First Out (FIFO) and Least Recently Used (LRU)?

Answer: A. Both incur the same number of page faultsAnswer: Both FIFO and LRU incur 9 page faults for the given reference string with five frames. FIFO — 9 page faults. The first five unique references (3, 8,…

  1. A.

    Both incur the same number of page faults

  2. B.

    FIFO incurs 2 more page faults than LRU

  3. C.

    LRU incurs 2 more page faults than FIFO

  4. D.

    FIFO incurs 1 more page faults than LRU

Attempted by 56 students.

Show answer & explanation

Correct answer: A

Answer: Both FIFO and LRU incur 9 page faults for the given reference string with five frames.

  • FIFO — 9 page faults. The first five unique references (3, 8, 2, 9, 1) fill the frames (5 faults). Subsequent faults occur when 6, 3, 8 and 2 are referenced and are not in frames, adding 4 more faults, for a total of 9.

  • LRU — 9 page faults. Similarly, the first five unique references cause 5 faults to fill frames. Later references that are not present cause 4 additional faults (6, 8, 2, 1 in the simulation), giving a total of 9.

Conclusion: Since both policies produce the same total number of page faults (9), the statement "Both incur the same number of page faults" is correct; the other numeric difference claims are incorrect.

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

Explore the full course: Wipro Preparation

Loading lesson…