3 ms·
Modern processors use something like https://en.m.wikipedia.org/wiki/MOESI_protocol https://en.m.wikipedia.org/wiki/MOESI_protocol to share data between process
by flaviut 4y ago
Modern processors use something like https://en.m.wikipedia.org/wiki/MOESI_protocol https://en.m.wikipedia.org/wiki/MOESI_protocol to share data between processors.
So basically, writing a shared line is expensive. Atomic reads are free, as are atomic writes to a cache line that no one else is using.
- tialaramex 4y agoIt's never truly free but on some CPUs (e.g. x86 and x86-64) you're always paying for it anyway and so you might as well use it.