4 ms·
I don't think this bit is right: > In modern computers with memories that are very slow in comparison with the CPUs and with complex cache hierarchies, the ato
by _a_a_a_ 3y ago
I don't think this bit is right:
> In modern computers with memories that are very slow in comparison with the CPUs and with complex cache hierarchies, the atomic read-modify-write instructions have a very high overhead and using any of them inside a wait loop is a big mistake
AFAIK what looks like a memory write to you just get pushed into cache, then for any other processors accessing that location, it goes through the cache coherency mechanism which is independent from the RAM and vastly faster. So my understanding is that there won't be the speed cost you expect. (But I am not an expert)