Re: JavaMemoryModel: Question about the semantics of volatile

From: Bill Pugh (pugh@cs.umd.edu)
Date: Thu Mar 18 2004 - 12:28:42 EST


A number of people have stated that they have a preference for
the weak interpretation.

But the JSR-133 public review document clearly describes the
strong interpretation.

> Synchronization actions also induce happens-before edges:
> \begin{itemize}
> \item There is
> a happens-before edge from an unlock action on monitor $m$ to all
> subsequent lock actions on $m$
> (where subsequent is defined
> according to the synchronization order).
> \item There is
> a happens-before edge from a write to a volatile variable $v$
> to all subsequent reads of $v$ by any thread
> (where subsequent is defined
> according to the synchronization order).

And in 2001, I recommended code idioms that would only work
under the strong interpretation.

So it seems to me that if we are going to make a change
here from what was described in the public review document,
we need to have something stronger than a preference by some people
for the weaker model.

An understanding that software DSM's could not efficiently implement
the stronger model might be that something stronger.

So we'll look at the software DSM issue more closely.

Can anyone verify if the IA-64 semantics for ld.acq and st.rel
implement the strong or weak interpretation?

        Bill

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



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