Question: 4. In a computer system, the memory has 16 blocks and the cache has 4 blocks. Assume there is only one word per block

4. In a computer system, the memory has 16 blocks and the

4. In a computer system, the memory has 16 blocks and the cache has 4 blocks. Assume there is only one word per block with 4 bytes in one word. The reference sequence in terms of word location is: 2, 4, 7, 8, 1, 9, 4, 14, 2, 8, 2. (a) [7%] How many bits are there for the index and the tag if this is a direct-mapped cache, fully associative cache, and 2-way set associative cache, respectively? (b) [7%] If the cache is a direct-mapped cache, how many misses do we have if the cache is initially empty? Give the hit or miss sequence for each reference. (c) [7%] If the cache is a fully associative cache, how many misses do we have with LRU replacement policy if the cache is initially empty? Give the hit or miss sequence for each reference. (d) [7%] If the cache is a two-way set associative cache, how many misses do we have with LRU replacement policy if the cache is initially empty? Give the hit or miss sequence for each reference.

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!