Question: Caches are classified as either write - through or write - back. In a writethrough cache, the data written to a cache block is simultaneously
Caches are classified as either writethrough or writeback. In a writethrough cache, the data written to a cache block is simultaneously written to main memory. In a writeback cache, a dirty bit D is associated with each cache block. D is when the cache block has been written and otherwise. Dirty cache blocks are written back to main memory only when they are evicted from the cache. A writethrough cache requires no dirty bit but usually requires more main memory writes than a writeback cache. Modern caches are usually writeback because main memory access time is so large. Suppose a cache has a block size of four words. How many main memory accesses are required by the following code when using each write policy: write through or writeback?
addi t zero,
sw tt
sw tt
sw tt
sw tt
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
