Domanda

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 .

È stato utile?

Soluzione

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.

Altri suggerimenti

Have a look at this article - number 2 in Google search results for "False Sharing in Parallel Programming" (number 1 is this page)

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top