January 2019
Intermediate to advanced
384 pages
11h 50m
English
On the lower, but all-important level of CPU caches we have one more problem to deal with, namely so-called false sharing.
This problem surfaces when threads on different processors or cores modify variables that reside on the same cache line. It is called false sharing because the threads are not consciously sharing any data, but are instead sharing the underlying unit of information exchange between processor caches, that is the cache line. Look at the following picture for visualization:

We see now why false sharing is also known as cache-line ping-ponging. The first core is repeatedly invalidating the caches ...
Read now
Unlock full access