Changes

Jump to: navigation, search

GPU621/False Sharing

791 bytes added, 02:22, 26 November 2021
False Sharing
== False Sharing ==
 
=== What is False Sharing? ===
 
Now that we understand the basics of a cache, how does this relate to the concept of false sharing?
 
False sharing occurs when multiple processors modify data that resides on the same cache line. When this data is written back to memory, the shared cache lines are marked as invalid or dirty. Processors must fetch an updated copy introducing significant delays due to memory access speeds. As you increase the number of processors, this quickly spirals out of control as there is an increasing chance the cache line is invalid.
 
The key thing to note is that you do not need to modify the same piece of data. If the modified data happens to belong to the same cache line, the cache will be invalidated, forcing a memory update to maintain cache coherency.
 
=== Analyzing Workshop Example ===
83
edits

Navigation menu