What is "false sharing" in the context of multi-core cache coherence, and why is it a performance problem?
Correct! Well done.
Incorrect.
The correct answer is A) It occurs when two threads on different cores modify independent variables that happen to reside on the same cache line, causing unnecessary cache invalidation traffic as if they were sharing the same data
Correct Answer
It occurs when two threads on different cores modify independent variables that happen to reside on the same cache line, causing unnecessary cache invalidation traffic as if they were sharing the same data
Because cache coherence operates at the granularity of cache lines, two unrelated variables placed on the same line can cause cores to repeatedly invalidate each other's cached copies even though there's no actual data dependency, degrading performance — mitigated by padding/alignment.