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)
- Step 1: Cache capacity is finite; when all sets or ways are populated, a replacement algorithm must choose which victim line to overwrite.
- 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.
More Computer Architecture and Hardware questions
- In the classical Von Neumann computer architecture, which component is responsible for coordinating and directing the operations of all othe…
- Which internal CPU register holds the memory address of the next sequential instruction waiting to be fetched and executed?
- What type of high-speed semiconductor memory is built directly into or adjacent to the CPU core using static flip-flops to minimize latency…
- What maximum physical RAM address space can theoretically be directly addressed by a computer architecture possessing a 32-bit address bus?
- Which memory technology stores each bit of data in a tiny integrated capacitor that gradually loses charge and therefore requires periodic d…
- What hardware mechanism enables high-speed peripheral devices like network cards and storage drives to transfer data directly to and from sy…