Previous | Next --- Slide 28 of 57
Back to Lecture Thumbnails
rbandlam

Updating only cache line and allowing processor to proceed without acquiring exclusive access violates coherence because if some other processor needs data from same cache line, it does not know about earlier change since it is only updated in that particular processor cache. Acquiring exclusive access makes other processors know that some particular processor has latest copy and accordingly change the state of cache line. Since we are not doing here, this violates cache coherence because reads on other processor after earlier write can see different copies of data.

Whereas writeback buffer does not violate coherence because all the processor know of this change and if any other processor needs data, checking in write back buffer of each processor is involved in critical path. Writeback buffer is only delaying writing to memory.

Azerty

@rbandlam I am not too sure why/how the other processors would know of some cache line being written in the write-back buffer of some processor(s)?

top

@Azerty Other processors will not necessarily know if a cache line is in a certain processors write-back buffer but now we are just adding another step in the critical path that says we must check anyways to be sure. The overhead of this check is probably a lot more preferable than going back out to memory.

yuel1

I like to think of it this way: the advantage of the write back buffer is we're guaranteed that the line was in a dirty state prior to being added to the write-back buffer (this means it is invalid or non-existent in all the other caches). Because of this fact, and the fact that all other cache snoops will consider the write-back buffer, we are guaranteed that this line is the only up to date version of the line, and that it will be the line any cache snoop will find first.