Write Back Vs Write Through

Write-Through cache: In this, once the writing is done in the cache memory, the main memory is also updated immediately to maintain the reliability.
Write-Back cache: In this, once the writing is done in the cache memory, a flag bit known as dirty bit is set. It write the data back to the main memory after a period of time or when the data is swapped out of the cache.

The differences between the Write-through and Write-back cache can be based on two factors (i.e Performance and Integrity of Data). The write-through has a better integrity and it will also flush for each writes. The write-back will hold up the write till the same cache line has to be used up for a read. Thus, write-back will proivde good performance, as it save many memory write cycles

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License