Correct Answer - Option 4 : 5376 bits
The correct answer is option 4
Data:
Main Memory size =232 Byte
Cache size = 8KB = 213 Byte
Block size = 25 Byte
Valid = 1 bit
Modified = 1 bit
Formula:cachesizeblockscachesizeblocksizetotallinesl
number of bits = ⌈log2 n⌉
Number of lines in cache = \(\frac{cache\;size}{block\;size}\)totallineslinesinaset
MM = tag + index + block offset .....(in bits)
Total bits required to store meta-data of 1 line = Valid bit + Modified bit + tag bit
Calculation:
Number of cache lines =\({{Cache}\ {size} \over block\ size }=\frac{2^{13}B}{2^5B}= 2^8B\)
So, index bit = 8
MM = tag + index + block offset
32 = tag +8 + 5
tag =19 bits
Tag |
index |
Block Offset |
19bits |
8 bits |
5 bits |
Total bits required to store meta-data of 1 line = Valid bit + Modified bit + tag bit
Total bits required to store meta-data of 1 line = 1 + 1 + 19 =21 bits
Cache memory has 256 lines
So, Total memory required =21 bits × 256 = 5376 bits