Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is "False Sharing" in Parallel programming .net 4.0

Can any one please share me the knowledge of "False Sharing" in Parallel programming .net 4.0 ? Would be great if you can explain with an example. Thanks in advance . i want the maximum performance for my code .

like image 230
NO Name Avatar asked Aug 11 '11 13:08

NO Name


1 Answers

False sharing is a term used to describe a scenario where the individual processor caches treat distinct sets of data as if they were shared. The reasons for this are related to the details of how the hardware cache lines work and can be different from one architecture to the next. The point is that the cache coherency protocols used to maintain the consistency between main memory the other individual processor caches has to work harder when the contents of individual processor caches are flagged as being shared. The rub is when they are flagged as shared when they really should not. You can read this article for more information.

like image 139
Brian Gideon Avatar answered Nov 11 '22 21:11

Brian Gideon