For the page reference string 7, 0, 1, 2, 0, 3, 0, 4, 2, 3, 0, 3, 2, 1, 2, 0, 1, 7, 0, 1 with 3 page frames (initially empty), which page replacement algorithm produces the minimum number of page faults?
Pick an option to check yourself, or open the answer below.
Show answer & explanation
Correct answer: D. Optimal
Explanation
Tracing all three frames across the 20 references gives FIFO 15 faults, LRU 12 faults, and the Optimal (Belady's MIN) algorithm — which always evicts the page that will be used farthest in the future — only 9 faults. This is not a quirk of this particular string: Optimal is provably a lower bound on the number of page faults for any reference string and any fixed number of frames, so no realizable algorithm such as FIFO, LRU or LIFO can ever do better. LIFO (replacing the most recently loaded page) performs worst of all here since it keeps evicting pages that are about to be reused. Hence the algorithm guaranteed to give the minimum number of faults is Optimal.More Programming Languages and Computer Graphics questions
- Which of the following is incorrect for virtual memory?
- A memory management system has 64 pages with a page size of 512 bytes. Physical memory consists of 32 page frames. The number of bits requi…
- Consider the page-reference string: 0 1 2 3 0 1 4 0 1 2 3 4. If the FIFO page-replacement algorithm is used, find the number of page faults…
- What would be the equivalent pointer expression for referring the array element ar[ m ][ n ][0]
- Which of the following technique is used for Clipping?
- Match List I with List II