Which cache replacement policy removes the memory block that has not been accessed for the longest period of time when allocating space for a new cache line?

Answer and explanation

Correct answer: B. LRU (Least Recently Used)

  1. Step 1: Cache capacity is finite; when all sets or ways are populated, a replacement algorithm must choose which victim line to overwrite.
  2. Step 2: Least Recently Used (LRU) tracks temporal locality, operating on the principle that data unread for the longest duration is least likely to be needed in the immediate future.
Answer
LRU (Least Recently Used)
Why not the others: 'FIFO (First-In, First-Out)' FIFO replaces the oldest block brought into the cache regardless of how frequently or recently it was accessed; 'LFU (Least Frequently Used)' LFU replaces the block with the lowest total access counter, which can cause older heavily-used lines to linger inappropriately; 'Random Replacement' Random replacement selects a victim block arbitrarily without tracking access timestamps or history.

Practise more Computer Architecture and Hardware.

Free questions with an explanation for every one, and full timed General Knowledge mock tests.