Answer:
(a) The block size = 16 words (b) the format for the sizes of the tag, block, and word fields are stated below:
Tag Block Offset
11 bits 5 bits 4 bits
(c)The memory address 0DB63 will map to 22nd block and 3 byte of a block. (d) The main advantage of the cache is, when the cache block is made larger or bigger then, there are fewer misses. this occur when the data in the block is used.
One of the disadvantage is that if the data is not used before the cache block is removed from the cache, then it is no longer useful. here there is also a larger miss penalty.
Explanation:
Solution
(a)The Cache of 32 blocks and the memory is word addressable
The main memory size is not stated, so let's consider it as 2^20
The main memory size = 2^20
The block size = 16 words
The Number of blocks = main memory size/ block size = 2^20/16. = 2^16= 64 K words.
(b) The Main memory is 2^20, which says it is 1 M words size and it requires 20 bits
Now,
From which 32 cache block requires 2^5, 5 bits and block size means offset requires 2^4, 4 bits
Thus, the sizes of the tag, block, and word fields are stated below:
Tag Block Offset
11 bits 5 bits 4 bits
(c)The hexadecimal address is 0DB63 , its binary equivalent is
0000 1101 1011 0110 0011
The tag = ( first 11 bits) = 0000 1101 101
block = ( next 5 bits ) = 1 0110
offset = ( next 4 bits ) = 0011
Therefore, the memory address 0DB63 will map to 22nd block and 3 byte of a block.
(d) The main advantage of the cache is that, when the cache block is made larger or bigger then, there are fewer misses. this occur when the data in the block is used.
One of the disadvantage is that if the data is not used before the cache block is removed from the cache, then it is no longer useful. here there is also a larger miss penalty.