Problem 4.23 [Stal10 and Stal06]
(--
[Stal03])
Consider a cache with a line size of 64 bytes. Assume that on average
30% of the lines in the cache are dirty. A word consists of 8 bytes. Assume also, that 32% of the instructions are writes.
- Assume there is a 3% miss rate (0.97 hit ratio). Compute the amount
of main memory traffic, in terms of bytes per instruction for both
write-through and write-back policies. Memory is read into cache one line
at a time.
- Repeat part a for a 5% rate.
- Repeat part a for a 7% rate.
- What conclusion can you draw from these results?
NOTE: The calculation is easier if you think about a set of 100 instructions. Each instruction must be read and during its execution it will access (read or write) the memory again. Once you get the count of average bytes needed for 100 instructions, it is easy to count number of bytes needed for 1 instruction.