ITPEC FE Morning October 2018 Question 21
Which of the following is a criterion for a page to be replaced in a Least Recently Used (LRU) algorithm?
Explanation
The last referenced time — LRU (least recently used) evicts the page that has gone longest without being used.
When a page fault occurs and no frame is free, LRU compares the time each resident page was last referenced and replaces the one whose last reference is oldest. It relies on locality: a page not used for a long time is unlikely to be needed soon. The operating system therefore has to record, for every page, when it was last accessed.
Answer (d)
Why not others:
- •(a) The cumulative total number of references — counting how often a page was used is the criterion of LFU (least frequently used)
- •(b) The first referenced time — the time a page was loaded is what FIFO uses; it ignores whether the page is still being used
- •(c) The frequency of references per unit of time — another frequency measure, again LFU-style, not recency
Key rule: LRU asks when a page was last used, LFU asks how often, and FIFO asks when it was loaded.
Software · AI-written, may contain errors
This question comes from an official ITPEC past paper. ITPEC Practice is an independent study tool and is not affiliated with ITPEC. See the official FE past-paper collection or Report an issue.