Re: JavaMemoryModel: JMM and caches.

From: Martin Trotter (martin_trotter@uk.ibm.com)
Date: Thu Oct 30 2003 - 04:01:46 EST


I think that what you need is not a barrier of some sort in each thread but
a way for a
single updating thread to force all the other threads to look at its
changes. Very like
the garbage collector thread in fact. The way that the GC thread does this
is to stop all the other threads in some way either by forcing them to
cooperate or
simply by getting the OS to suspend them forcibly. In either case the GC
thread ends
up with a view of the other threads state and the other threads are forced
to reread
everything from main memory on resume. The Thread.suspend and
Thread.resume
methods, although deprecated, are exactly what you need in these
situations. Perhaps
we should look at undeprecating them ?

Martin Trotter

-------------------------------
JavaMemoryModel mailing list - http://www.cs.umd.edu/~pugh/java/memoryModel



This archive was generated by hypermail 2b29 : Thu Oct 13 2005 - 07:00:52 EDT