I have a question about MESI.

My question isn't about atomic operations; but about an ordinary write to 
the same cacheline done by 2 cores.

If a CPU does a write, the write is placed on the store buffer.

Then the CPU will send a invalidation request to the other cores (RFO)  for 
the given cacheline if the cacheline isn't in Exclusive or Modified state, 
and once acknowledgement of the other cores have been received, the write 
is allowed to move from the store buffer into the L1 cache.

My confusion is about the 'atomic' behavior of requesting ownership till 
writing the change on the cacheline in the L1 cache. What prevents another 
core directly after the first core has requested ownership to do the same? 
So what prevents another core getting lucky and yanking away the cacheline 
after the acknowledgements to the first core have been received, but before 
the first cores write to the L1 cache  (so the first core ending up with a 
write on a cacheline he owned for a short time, but before you could 
complete his action got yanked from under his feet).

I guess that the first CPU will just ignore any competing bus transactions 
as long as it has not completed the write. There is a ton of information 
about MESI, but I could not found a lot of sensible information about this 
behavior.

-- 
You received this message because you are subscribed to the Google Groups 
"mechanical-sympathy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web, visit 
https://groups.google.com/d/msgid/mechanical-sympathy/64a40287-3e44-4b83-9971-dc04814e4ae8%40googlegroups.com.

Reply via email to