False sharing is the condition, where in parallel programs, memory cache lines are shared by two or more threads and writes on one cache line would force other cores working on the same line to re-validate their cache. This is a concurrency anti-pattern.
Questions with this tag should be about a suspected or actual false sharing problem.
False sharing is the condition in which in parallel programs, in which memory cache lines which are shared by two or more threads. Writes on one cache line would force other cores working in the same line to re-validate their cache. This is a concurrency anti-pattern.
Note that in the diagram above, Thread 1 writes to A and never B, yet Thread 2 must re-validate its cache to continue computation.
Common ways to alleviate false sharing include storing a thread local result to update to a shared spaced once the computation is completed, and/or spacing contiguous memory blocks that are shared, so they are not on the same cache line.
More information: