Assume the system with 256B memory and 64B cache and the block size of 16 bytes. I.e., there are 4 blocks in the cache.
2. Assume the system as question 1. Assume cache is initially empty, i.e., all 4 cache blocks are invalid. Consider the memory reference sequence: D6, 58, D8, 9A, DE, 5C.
(a) Indicate if it is a hit or misss for each memory reference if it is direct-mapped cache. What is the miss ratio?(Hint: Three memory block 50-5F, 90-9F, and D0-DF would be copied to the same block in the cache because their block index is the same, 1.)
(b) Indicate if it is a hit or misss for each memory reference if it is fully-associative cache? What is the miss ratio?
(c) Indicate if it is a hit or misss for each memory reference if it is 2-way set-associative cache? What is the miss ratio? Assume to replace the block which has been used "least recently".(Hint: Three memory block 50-5F, 90-9F, and D0-DF would be copied to the same "set" in the cache because their "set" index is the same, 1. In each set, there are 2 blocks.)