Consider the following page reference string: 1, 2, 3, 2, 4, 1, 3, 2, 4, 1…
2018
Consider the following page reference string:
1, 2, 3, 2, 4, 1, 3, 2, 4, 1
Assume that there are three page frames which are initially empty. Let LRU, FIFO and OPTIMAL denote the number of page faults under the corresponding page replacement strategy. Then, which of the following expressions is true?
Answer: D. OPTIMAL < FIFO < LRU — With three initially empty frames and reference string 1, 2, 3, 2, 4, 1, 3, 2, 4, 1: FIFO gives 6 page faults, LRU gives 9 page faults, and OPTIMAL gives 5…
- A.
LRU = FIFO = OPTIMAL
- B.
FIFO < OPTIMAL < LRU
- C.
FIFO = OPTIMAL
- D.
OPTIMAL < FIFO < LRU
Attempted by 1 students.
Show answer & explanation
Correct answer: D
With three initially empty frames and reference string 1, 2, 3, 2, 4, 1, 3, 2, 4, 1: FIFO gives 6 page faults, LRU gives 9 page faults, and OPTIMAL gives 5 page faults. Hence the true relation is OPTIMAL < FIFO < LRU.