Answered step by step
Verified Expert Solution
Question
1 Approved Answer
A 2-way set associative cache is using the true LRU replacement algorithm discussed in class. A designer proposes to use a new least frequently used
A 2-way set associative cache is using the true LRU replacement algorithm discussed in class. A designer proposes to use a new least frequently used (LFU) algorithm, which works as follows: On a cache miss, if no empty (invalid) block is found in a set, then LFU chooses to evict the block that has been accessed the least number of times since being brought into the cache. If multiple candidate blocks fit this criteria, then the LFU algorithm chooses the least recently used block among the candidate blocks. (a) Consider the following sequence of accesses to a cache set: A, A, B, C, B, C, A Assume that the set is initially empty. Compare the number of hits for the LRU and LFU policies. (b) Construct an access sequence for which the LFU policy results in more hits than the LRU policy. Your access sequence must include 5 or fewer accesses. Similar to part(a), you need to consider accesses going only to a single cache set and assume that the set is initially empty
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started