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
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