Chapter 5: 4 (page 485)
Recall that we have two write policies and write allocation policies, and their combinations can be implemented either in L1 or L2 cache. Assume the following choices for L1 and L2 caches:
L1 | L2 |
Write through, non-write allocate | Write back, write allocate |
5.4.1 Buffers are employed between different levels of memory hierarchy to reduce access latency. For this given configuration, list the possible buffers needed between L1 and L2 caches, as well as L2 cache and memory.
5.4.2 Describe the procedure of handling an L1 write-miss, considering the component involved and the possibility of replacing a dirty block.
5.4.3 For a multilevel exclusive cache (a block can only reside in one of the L1 and L2 caches), configuration, describe the procedure of handling an L1 write-miss, considering the component involved and the possibility of replacing a dirty block
Consider the following program and cache behaviors.
Data Reads per 100 Instructions | Data writes per 1000 Instructions | Instruction Cache Miss Rate | Data Cache Miss Rate | Block Size(byte) |
250 | 100 | 0.30% | 2% | 64% |
5.4.4 For a write-through, write-allocate cache, what are the minimum read and write bandwidths (measured by byte per cycle) needed to achieve a CPI of 2?
5.4.5 For a write-back, write-allocate cache, assuming 30% of replaced data cache blocks are dirty, what are the minimal read and write bandwidths needed for a CPI of 2?
5.4.6 What are the minimal bandwidths needed to achieve the performance of CPI=1.5?
Short Answer
5.4.1
Buffers needed between the L1 and L2 cache is write buffer
Buffer needed L2 cache and memory is write buffer
5.4.2
If the result in in L2 cache the block must be brought into the L2 cache
5.4.3
The block will reside in L2 but not in L1 if L1 write misses. The block in L2 will be required to be written back to memory if a subsequent read miss on the same block, transferred to L1, and invalidated in L2.
5.4.4
The total read bandwidth requirement is = 0.33 bytes/cycle
The data write bandwidth requirement = 0.2 bytes/cycle.
5.4.5
The data read bandwidth is = 0.23 bytes/cycle
Now, the data write bandwidth = 0.067 bytes/cycle
5.4.6
For the write-through cache
The total read bandwidth = 0.35 byte/cycle
For the write-back cache
Data write bandwidth = 0.091 byte/cycle