Re: JavaMemoryModel: Final and Volatile array classes

From: Bill Pugh (pugh@cs.umd.edu)
Date: Fri Mar 24 2000 - 11:54:35 EST


At 7:05 PM -0500 3/23/00, Jan-Willem Maessen wrote:
>This Re: Doug Lea's worries about repeated volatile reads:
>In this particular case we can optimize the first example to the
>second. Why? There exists a legal execution of the program in which
>every single volatile fetch of Foo.a executes before any other node
>gets to muck with Foo.a.
>
>Note that this is not true if total is actually a volatile field,
>though, so this property is rather fragile.
>
>It is also not true if total is a regular field and volatile stores
>are strongly ordered wrt ALL memory stores (condition V6). We're not
>keen on that semantics anyhow.

The important point is that many people assume it is legal to busy
wait on a volatile field.

And I think this is something that we probably should make work.

I'm open to creative solutions as to how we do this.

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



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