[concurrency-interest] Double Checked Locking in OpenJDK

Ulrich Grepel uli at grepel.de
Fri Aug 17 03:04:43 EDT 2012


On 17.08.2012 02:01, concurrency-interest-request at cs.oswego.edu wrote:
> Date: Thu, 16 Aug 2012 20:00:57 -0400
> From: Vitaly Davidovich <vitalyd at gmail.com>
>
> NUMA and faster interconnects between the nodes (e.g Intel's QPI) seem to
> be hw manufacturers' strategy at the moment.  I have a hard time imagining
> that someone like Intel will ditch cache coherence to support hugely
> parallel machines - seems like they'll need to continue finding
> new/improved ways to scale within it.  Will definitely be interesting to
> see ...
>
Large scale parallel systems can be found in the supercomputing field. 
The single most important hardware issue there is interconnect speed and 
the single most important software issue is to try to minimize 
communication between all those threads.

If you've got hundreds of thousands or even millions of cores, all with 
local RAM, there's just no way to quickly synchronize caches or even 
RAM, so you won't have a synchronized memory model there, at least not 
across all cores. So with massive parallelism, the problem is will 
remain: syncing is expensive, so avoid it.

Transferring this into the Java world of the future we either hit a 
hardware wall - more cores aren't providing any additional performance - 
or a software wall - we need some extended NUMA concepts for Java 
threads. And this in a language which is somewhat still supposed to 
fulfill the "write once, run everywhere" paradigm.

What I could imagine for example is something akin to Thread Local 
Storage, but on a Cache Coherency Group ("CCG") level, something like 
"get me the CCG's instance of the cache". And some guarantee that, if 
desired, a thread remains in the CCG of the thread that started the 
second thread.

Syncing the various CCGs is a challenge however. If you're updating one 
of the CCG caches and want to propagate this to the other CCGs, you 
might run into the same kind of problems that distributed databases run 
into. See the CAP theorem - you can have two out of the following three: 
Consistency, Availability and Partition Tolerance.

Uli


More information about the Concurrency-interest mailing list