190k views
2 votes
2- There are many different design parameters that are important to a cache’s overall performance. Below are listed parameters for different direct-mapped cache designs. Cache Data Size: 32 KiB Cache Block Size: 2 words Cache Access Time: 1 cycle Calculate the total number of bits required for the cache listed above, assuming a 32-bit address. Given that total size, find the total size of the closest direct-mapped cache with 16-word blocks of equal size or greater. Explain why the second cache, despite its larger data size, might provide slower performance than the first cache. You must show your work

1 Answer

4 votes

Answer:

1. 2588672 bits

2. 4308992 bits

3. The larger the data size of the cache, the larger the area of ​​memory you will need to "search" making the access time and performance slower than the a cache with a smaller data size.

Step-by-step explanation:

1. Number of bits in the first cache

Using the formula: (2^index bits) * (valid bits + tag bits + (data bits * 2^offset bits))

total bits = 2^15 (1+14+(32*2^1)) = 2588672 bits

2. Number of bits in the Cache with 16 word blocks

Using the formula: (2^index bits) * (valid bits + tag bits + (data bits * 2^offset bits))

total bits = 2^13(1 +13+(32*2^4)) = 4308992 bits

3. Caches are used to help achieve good performance with slow main memories. However, due to architectural limitations of cache, larger data size of cache are not as effective than the smaller data size. A larger cache will have a lower miss rate and a higher delay. The larger the data size of the cache, the larger the area of ​​memory you will need to "search" making the access time and performance slower than the a cache with a smaller data size.

User Arbil
by
5.4k points