Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started