Module 4_cache Memory Problems (1)
Module 4_cache Memory Problems (1)
Solution-
a. For
the given cache, the number of bits in the address to
determine the byte within the line=
n = 2 5 = 5 bits
b. There are 64K/32= 2048 lines in the given cache. The number
of bits required to select the required line 2 11 = 11 bits
Solution-
We have,
There are 8 blocks in cache memory numbered from 0 to 7.
In fully associative mapping, any block of main memory can be mapped to
any line of the cache that is freely available.
If all the cache lines are already occupied, then a block is replaced in
accordance with the replacement policy.
Thus,
Line-5 contains the block-7.
Hit ratio = 5 / 17
Miss ratio = 12 / 17