Question: LRU is often approximated by a pseudo-LRU replacement policy for cache associativity greater than 2. For example, one method to construct a 4-way pseudo-LRU is

LRU is often approximated by a pseudo-LRU replacement policy for cache associativity greater than 2. For example, one method to construct a 4-way pseudo-LRU is to partition each set into two subsets and use 1 bit to track which subset is LRU, and within a subset use 1 bit to track which of the two blocks is LRU. Contrast this scheme with true-LRU for a 4-way cache in terms of (a)-(c) above. The tables below depict the difference in the cache layout for the two schemes. Consider the difference in storage space and the complexity to maintain the LRU metadata bits. Give an example (e.g. sequence of byte accesses with the same index) of when the two policies would choose to evict a different cache line. This implies finding a sequence of accesses to the same cache set that leads to a different cache line being replaced when using the two policies. You should state your assumptions (e.g. block size, #sets, cache size, tag size, etc.) as needed. You can greatly improve your answer by showing the cache contents in the two tables below for the hypothetical byte sequence, and identifying the different cache lines that would be replaced by each of the two policies.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!