Correct Answer - Option 1 : 160 Kbits
The correct answer is option 1
Data:
Physical address space = 232 bytes
Block size = 32 B = 25 B
Number of bits for block size = 5
cache size =256 KByte = 218 B
set associative = 4 -way
Calculation:
number of bits = ⌈log2 n⌉
Number of blocks = \(\frac{cache\;size}{block\; size}\) =\({2^{18} B\over 2^5B}=2^{13}\)
Number of sets in cache = \({\frac{number\; of\; blocks}{set\; associativity}} = {2^{13}\over 2^2}=2^{11}\)
Number of bits in set =11
Virtual address = tag + set + Byte offset (in bits)
32 = tag + 11+ 5
∴ tag = 16 bits
16 bit address 2 valid bits, 1 modified bit and 1 replacement bit
So, total bits =20
So, Each cache tag directory entry contains = 20 × Number of blocks = 20 × 213 bits
∴ 213 = 8 K bits
So, Each cache tag directory entry contains = 20 × 8 K bits=160 Kbits
So, the size of the cache tag directory is 160 Kbits