RE: JavaMemoryModel: New Unified JMM Description

From: Sylvia Else (
Date: Thu Apr 15 2004 - 20:40:05 EDT

At 09:53 AM 16/04/2004 +1000, David Holmes wrote:
>Sylvia wrote:
> > If you want to make some assertion in your lock free algorithm
> > you need to find a combination of happens-before and synchronization
> > orderings that supports it.
>But that is not sufficient. Identifying the happens-before relationships
>doesn't guarantee that A will happen before B. The system is allowed to
>reorder actions in a happens-before relationship as long as it is not
>detectable by anything that happens-after. So to determine that A will
>actually happen before B you have to show that A happening after B would be
>detectable by something that happens-after, and so the reordering would not
>be allowed.

I suppose I'm approaching this from a somewhat different direction. My
starting point is that actions have no order to them at all, so the notion
of reordering them is meaningless to me. All I'm interested in is what my
program can see, which is the only thing that can affect the program's
behaviour. I deduce this from the happens-before relationships and
synchronisation orders.

Before you can say that actions A and B have been reordered, that is,
performed, or becoming visible, in some order that it is different from
what you expected, you first have to identify some order that you think
they should have been performed or become visible in. But the model doesn't
let you do that.

This is a bit difficult to talk about in the abstract. Do you have a
concrete example?


JavaMemoryModel mailing list -

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