Veritas Qualifying Exam 1 Practice

Access More Questions
Compare common cache eviction policies: LRU and LFU; discuss when each is advantageous.
Correct Answer:
LRU evicts least recently used; LFU evicts least frequently used; LRU is good for temporal locality; LFU for stable access patterns.
Explanation:
The main idea here is how eviction decisions use recency versus frequency to decide what to throw away. LRU (least recently used) evicts the item that hasn’t been used for the longest time. The logic is that if something was accessed recently, it’s likely to be accessed again soon because workloads often show temporal locality—recently used items tend to come back into use. LFU (least frequently used) evicts the item with the lowest access count. The idea is that items that have been accessed often are likely to be accessed again, so keeping those “hot” items around is beneficial when the workload has stable, long-term popularity. Thus, LRU shines when the workload exhibits temporal locality and patterns change over time; it adapts to recent behavior. LFU shines when there are a few consistently popular items and access patterns are stable enough that frequency is a good predictor of future use. Real systems sometimes blend these ideas or add aging to prevent old, frequently-used-but-no-long-used data from crowding the cache. The correct choice reflects these points: LRU evicts least recently used; LFU evicts least frequently used; LRU is good for temporal locality; LFU for stable access patterns. The other statements mischaracterize how the policies work or overgeneralize their applicability.

Access more questions from this quiz

Continue to Veritas Qualifying Exam 1 Practice for more practice questions and the full quiz experience.

Access More Questions