Question: Question 2 ( b ) Assume a set - associative mapping with 4 blocks per set. One implementation of the LRU algorithm is to use

Question 2(b) Assume a set-associative mapping with 4 blocks per set. One implementation of the LRU algorithm is to use a counter associated with each block in the set. Assume the set is empty and assign an initial value of 0 for each counter.
If the following events occurred in sequence
1. Read miss
2. Read miss
3. Read miss
4. Read hit in the first cache block
5. Read hit in the second cache block
6. Read miss
7. Read miss
8. Read hit in the first cache block
9. Read hit in the first cache block
10. Read miss
Draw a diagram for the set after each event to show how the values of the four counters and the contents of the cache are changed with each event of the above.
For example, the given diagram shows a set with two occupied blocks and two empty blocks. The diagram also shows the contents of the counters associated with each block.
Question 2 ( b ) Assume a set - associative

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 Programming Questions!