RE: JavaMemoryModel: volatile arrays

From: David Holmes (
Date: Mon Dec 20 1999 - 17:13:07 EST

Sorry for the delayed response - I've been on "vacation".

> -----Original Message-----
> From: David F. Bacon []
> > Accesses to different volatiles require sequential consistency to be
> > enforced
> where in the JMM does it say that?

The JMM states that actions on volatiles for any given thread are totally
ordered. The assumed intention of this is to allow mutual exclusion
algorithms, such as Dekkers algorithm, to be implemented using volatiles.
Re-reading what is said in Ch17 I'm less convinced that what it says is a
strong as what I said.
As Doug mentioned there are different views on what it does and should say.

> let's assume that accesses to volatiles must be SC wrt each
> other. i still don't understand why you would need the read barrier.

You are right - my apologies. I was confusing the interaction of volatiles
and non-volatiles with interactions between volatiles.

Thanks for the (*very*) detailed description of the way things work on PPC.

David Holmes

JavaMemoryModel mailing list -

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