Cache Replacement: Which Policy Removes the Least Recently Used Block?
The algorithm that removes the block that was least recently used (i.e., whose most recent access time is the oldest) is LRU. In a cache, LRU evicts the cache block with the oldest “last referenced” timestamp, matching the phrase “least recently used block.”
To contrast:
- FIFO evicts the block that entered the cache first, regardless of how recently it was accessed.
- Random Replacement evicts a randomly selected cache block.
Footnotes
-
LRU (Least Recently Used) page (Wikipedia) - https://en.wikipedia.org/wiki/Cache_replacement_policies - Defines LRU as evicting the least recently used item based on last access. ↩
-
FIFO (First-In First-Out) page (Wikipedia) - https://en.wikipedia.org/wiki/Cache_replacement_policies - Defines FIFO as evicting the oldest inserted/arrived item. ↩
-
Random replacement (cache) (Wikipedia) - https://en.wikipedia.org/wiki/Cache_replacement_policies - Describes random replacement as evicting a random cache block. ↩
Cache Replacement Policies (LRU vs FIFO vs Random)
Key idea for the given question
The question asks: “Which cache replacement algorithm removes the least recently used block?”
By definition, least recently used corresponds directly to LRU.
So the correct choice among (i) FIFO, (ii) LRU, (iii) Random Replacement is: (ii) LRU.
Footnotes
-
LRU (Least Recently Used) page (Wikipedia) - https://en.wikipedia.org/wiki/Cache_replacement_policies - Defines LRU as evicting the least recently used item based on last access. ↩ ↩2
Decide the correct replacement policy
- 1Step 1
“Least recently used block” refers to the block whose last access happened farthest in the past.
- 2Step 2
Match “oldest last access time” to LRU.
- 3Step 3
FIFO evicts by arrival order, not last access; Random chooses uniformly at random.
- 4Step 4
Therefore, the correct algorithm is LRU (option (ii)).
Side-by-side comparison (what gets evicted?)
Footnotes
-
FIFO (First-In First-Out) page (Wikipedia) - https://en.wikipedia.org/wiki/Cache_replacement_policies - Defines FIFO as evicting the oldest inserted/arrived item. ↩
-
LRU (Least Recently Used) page (Wikipedia) - https://en.wikipedia.org/wiki/Cache_replacement_policies - Defines LRU as evicting the least recently used item based on last access. ↩
-
Random replacement (cache) (Wikipedia) - https://en.wikipedia.org/wiki/Cache_replacement_policies - Describes random replacement as evicting a random cache block. ↩
Exam shortcut
If the wording contains “least recently used” or “LRU,” the answer is almost always LRU—because that’s the definition.
Common confusion
Students often confuse FIFO with LRU. FIFO tracks insertion order; LRU tracks recent access history. The names (First-In vs Least Recently Used) are clues to the eviction criterion. 2
Footnotes
-
FIFO (First-In First-Out) page (Wikipedia) - https://en.wikipedia.org/wiki/Cache_replacement_policies - Defines FIFO as evicting the oldest inserted/arrived item. ↩
-
LRU (Least Recently Used) page (Wikipedia) - https://en.wikipedia.org/wiki/Cache_replacement_policies - Defines LRU as evicting the least recently used item based on last access. ↩
How eviction criterion differs
Evict by insertion time
FIFO viewOldest inserted block is removed, independent of accesses. "
Footnotes
-
FIFO (First-In First-Out) page (Wikipedia) - https://en.wikipedia.org/wiki/Cache_replacement_policies - Defines FIFO as evicting the oldest inserted/arrived item. ↩
Evict by last-access time
LRU viewBlock with the oldest last reference is removed. "
Footnotes
-
LRU (Least Recently Used) page (Wikipedia) - https://en.wikipedia.org/wiki/Cache_replacement_policies - Defines LRU as evicting the least recently used item based on last access. ↩
Evict randomly
Random viewAny block may be selected as the victim with equal probability. "
Footnotes
-
Random replacement (cache) (Wikipedia) - https://en.wikipedia.org/wiki/Cache_replacement_policies - Describes random replacement as evicting a random cache block. ↩
FAQ
Knowledge Check
Which cache replacement algorithm removes the least recently used block?