Question: For the purpose of this exercise, we assume that we have a 512- byte cache with 64-byte blocks. We will also assume that the main
For the purpose of this exercise, we assume that we have a 512- byte cache with 64-byte blocks. We will also assume that the main memory is 2 KB large.We can regard the memory as an array of 64-byte blocks: M0, M1,…, M31. Figure B.30 sketches the memory blocks that can reside in different cache blocks if the cache was direct-mapped.
a. Show the contents of the table if the cache is organized as a fullyassociative cache.
b. Repeat part (a) with the cache organized as a four-way set associative cache.

Cache block 0 1 2 3 4 5 6 7 Set 0 1 2 3. 4 5 6 7 Way 0 0 0 0 0 0 0 0 Possible memory blocks MO, M8, M16, M24 M1, M9, M17, M25 M2, M10, M18, M26 **** Figure B.30 Memory blocks distributed to direct-mapped cache. .... M7, M15, M23, M31
Step by Step Solution
3.46 Rating (159 Votes )
There are 3 Steps involved in it
Lets address each part of the exercise step by step a Fully Associative Cache In a fully associative cache any block from the main memory can be place... View full answer
Get step-by-step solutions from verified subject matter experts
