False Sharing Alignment | Monoidal Tranformation
What is false sharing What is false sharing? When CPUs and their cores read and update atomic variables, special hardware protocols make it correct and efficient, while keeping each core’s caches consistent. The coordination doesn’t happen per-address: these protocols work on cache-line-sized chunks. What happens when two atomic variables happen to reside on the same cache line? For example: an array of atomics where each atomic is used by a separate thread (e.g. per-thread counters); a queue wi





