Question: new Cache Write If CPU wants to write to memory: 1) Write Hit: Cache contains the block: i.e. cache contains the block that we want

new
new Cache Write If CPU wants to write to memory: 1) Write

Cache Write If CPU wants to write to memory: 1) Write Hit: Cache contains the block: i.e. cache contains the block that we want to write a byte of data on . On data-write hit (e.g. swinst.), could just update the block in cache . But then cache and memory would be inconsistent bcos they have diff. values Write-Through cache immediately writes modified block to memory It takes longer time Solutions: Write buffer Holds data waiting to be written to memory CPU continues immediately . Only stalls on write if write buffer is already full Write back . On data-write hit, just update the block in cache Cache waits, write block to memory when the block is replaced Keep track of whether each block is dirty using a dirty bit field (1=modified, O=not modified) Cache Write If CPU wants to write to memory: 1) Write Hit: Cache contains the block: i.e. cache contains the block that we want to write a byte of data on . On data-write hit (e.g. swinst.), could just update the block in cache . But then cache and memory would be inconsistent bcos they have diff. values Write-Through cache immediately writes modified block to memory It takes longer time Solutions: Write buffer Holds data waiting to be written to memory CPU continues immediately . Only stalls on write if write buffer is already full Write back . On data-write hit, just update the block in cache Cache waits, write block to memory when the block is replaced Keep track of whether each block is dirty using a dirty bit field (1=modified, O=not modified)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!