Fill in the following table for a fully set associative, 3-block cache, for the
ID: 3731992 • Letter: F
Question
Fill in the following table for a fully set associative, 3-block cache, for the block addresses (already shifted for byte offset) shown in the 2nd column. Use a LRU replacement policy The Block-# columns show the state of the block after the block address in that row is handled The blocks fill from left to right. For the "Hit/Miss" column, valid answers are either "Hit" or "Miss" For the Block-# columns, valid answers are of the form "Mem(n)" where n is a block address or "Empty Step Block Address Hit/Miss Block-0 Block-1 Block-2 0 2 3 3 4 2 4 0Explanation / Answer
In fully set associative cache , data or page with any offset can be placed in any block of cache there is no restriction.
Here is implementation for given Example
step BlckAddress Hit/Miss Block-0 Block-1 Block-2
1 0 Miss mem(0) ,1 ..... ......
In block-0 1 in "mem(0),1" represnts last time this page was accessed as blocks are filled from left to right block-0 will fill first
2 2 Miss mem(0),1 mem(2),2 ......
3 3 Miss mem(0),1 mem(2),2 mem(3),3
4 2 Hit mem(0),1 mem(2),4 mem(3),3
This time BlockAddress 2 was already there in cache so it was hit and we will update access time for mem(2),2 to mem(2),4 . 4 is new time counter
5 4 Miss mem(4),5 mem(2),4 mem(3),3
address 4 was not in cache also cache was full so we replaced new block-address with lru which was mem(1),1 time 1 is least
6 0 Miss mem(4),5 mem(2),4 mem(0),6
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.