What is false sharing in a multicore system?
Correct answer D. Different cores write different variables that happen to share a cache line, causing needless coherence traffic
Coherence works on whole lines, so if core 0 updates x and core 1 updates y in the same 64-byte line, the line bounces between their caches even though no data is truly shared. Performance suffers although the results are correct. Padding or aligning per-thread data to separate lines cures it. Unsynchronised access to one variable is a data race, a different problem.
Answer checked How we write and check questions
Discussion