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 .
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With