Consider the following page reference string. 1 2 3 4 2 1 5 6 2 1 2 3 7 6 3 2…
2020
Consider the following page reference string.
1 2 3 4 2 1 5 6 2 1 2 3 7 6 3 2 1 2 3 6 What are the minimum number of frames required to get a single page fault for the above sequence assuming LRU replacement strategy ?
- A.
7
- B.
4
- C.
6
- D.
5
Attempted by 79 students.
Show answer & explanation
Correct answer: C
Reference String:
1 2 3 4 2 1 5 6 2 1 2 3 7 6 3 2 1 2 3 6
Distinct pages = {1, 2, 3, 4, 5, 6, 7}
To obtain exactly one additional page fault after the initial loading phase:
With 5 or fewer frames, multiple replacements occur, causing several page faults.
With 6 frames, pages 1–6 can be accommodated. When page 7 is referenced, it causes exactly one replacement under LRU. After that, the remaining references are hits.
With 7 frames, all distinct pages fit in memory, so no additional page fault occurs after the initial loading.
Therefore, the minimum number of frames required is 6.
Answer: C) 6
A video solution is available for this question — log in and enroll to watch it.