Which eviction policy removes the item not accessed for the longest time when the cache is full?

Test your Systems Design Concepts knowledge with our comprehensive quiz. Utilize flashcards and multiple choice questions to enhance your study session. Prepare thoroughly with detailed explanations for each answer and ace your examination!

Multiple Choice

Which eviction policy removes the item not accessed for the longest time when the cache is full?

Explanation:
The concept being tested is eviction based on recency of use, specifically the Least Recently Used principle. When the cache is full, this policy removes the item that hasn’t been accessed for the longest time, on the assumption that recently used items are more likely to be needed again soon. By keeping the most recently used data, the cache stays aligned with temporal locality—the idea that recent data tends to be reused in a short time window. This differs from other common strategies. Evicting the item that was most recently accessed would discard data you just used, which is typically counterproductive and is known as the Most Recently Used approach. Evicting based on the lowest access count uses frequency rather than recency, which is the Least Frequently Used strategy and can keep items in the cache that are old but frequently accessed. Evicting after a TTL means items expire after a fixed lifetime, regardless of how often they’re accessed, which is time-based rather than usage-pattern based. LRU is widely used because it naturally favors items with recent activity, matching how programs tend to reuse data shortly after it is accessed.

The concept being tested is eviction based on recency of use, specifically the Least Recently Used principle. When the cache is full, this policy removes the item that hasn’t been accessed for the longest time, on the assumption that recently used items are more likely to be needed again soon. By keeping the most recently used data, the cache stays aligned with temporal locality—the idea that recent data tends to be reused in a short time window.

This differs from other common strategies. Evicting the item that was most recently accessed would discard data you just used, which is typically counterproductive and is known as the Most Recently Used approach. Evicting based on the lowest access count uses frequency rather than recency, which is the Least Frequently Used strategy and can keep items in the cache that are old but frequently accessed. Evicting after a TTL means items expire after a fixed lifetime, regardless of how often they’re accessed, which is time-based rather than usage-pattern based.

LRU is widely used because it naturally favors items with recent activity, matching how programs tend to reuse data shortly after it is accessed.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy