Archive for the ‘ 好文推荐 ’ Category

False Sharing && Java 7

原文: (因为被墙移动到墙内)

In my previous post on False Sharing I suggested it can be avoided by padding the cache line with unused longfields.  It seems Java 7 got clever and eliminated or re-ordered the unused fields, thus re-introducing false sharing.  I’ve experimented with a number of techniques on different platforms and found the following code to be the most reliable.

Read more

原创文章,转载请注明: 转载自并发编程网 – ifeve.com本文链接地址: False Sharing && Java 7

CPU Cache Flushing Fallacy

原文地址: (因有墙移动到墙内)

作者:Mechanical Sympathy

Even from highly experienced technologists I often hear talk about how certain operations cause a CPU cache to “flush”.  This seems to be illustrating a very common fallacy about how CPU caches work, and how the cache sub-system interacts with the execution cores.  In this article I will attempt to explain the function CPU caches fulfil, and how the cores, which execute our programs of instructions, interact with them.  For a concrete example I will dive into one of the latest Intel x86 server CPUs.  Other CPUs use similar techniques to achieve the same ends. Read more

原创文章,转载请注明: 转载自并发编程网 – ifeve.com本文链接地址: CPU Cache Flushing Fallacy

return top