aWhat is the average memory access time AMAT if a cache uses
(a)What is the average memory access time (AMAT) if a cache uses write-back strategy and 20% of the data blocks to be swapped out are dirty. Assume that the miss rate is 10%, the hit time of the cache is 1 cycle and the miss penalty is 10 cycles for the data blocks that are not dirty and 30 cycles for those blocks that are dirty.
(b) What is the speedup up if we add a “write-buffer” that eliminates 50% of the stall cycles to write back the dirty blocks?
Solution
AMAT orig = 1 + MissRate Miss Penalty
AMAT orig = 1 + MR (%NotD MP Not + %D MP D)
AMAT orig = 1 + .10 (.8 10 + .2 30)
AMAT orig = 2.4
AMAT writeBuffers = 1 + MR (%NotD MPN otD + %D 50% MPD)
AMAT writeBuffers = 1 + .10 (.8 10 + .2 .5 30)
AMAT writeBuffers = 2.1
Speedup overall = (AMAT original)/(AMAT writeBuffers )
Speedup overall = 2.4/2.1 = 1.142
