>
> A related question. What happens if 2 threads do a plain write in the same 
> cache line but independent locations.
>
> If this happens concurrently, can the system run into a 'lost update'? I'm 
> sure it can't and I guess the cache coherence protocol takes care it. But 
> would like to get confirmation anyway.
>

If the writes are to independent, non-overlapping, addresses then no update 
will be lost even if in the same cache line. This will result in false 
sharing which is a performance issue but not a correctness issue.

-- 
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].
For more options, visit https://groups.google.com/d/optout.

Reply via email to