What is false sharing in the context of multi-threading?

Solution:

On multi-core systems, false sharing is one of the well-known performance issues. Here each process has its local cache. When threads on a different processor, modify variables false sharing occurs, that resides on the same cache line as shown in the following images

Core Java Interview Questions

As the thread may access different global variables completely, false sharing can be hard to detect.

0 answers