[cpp-threads] Causality on more than two processors, write atomicity
Doug Lea
dl at cs.oswego.edu
Mon Sep 5 20:56:43 BST 2005
Alexander Terekhov wrote:
>
>>
>>That probably depends on the framework. Y = 1 (and Z = 1) are
>>writes in progress, so to speak.
>>
>>P1: Y = 1; Y = 2;
>>P2: if( Y == 2 ) { Z = 1; }
>>P3: if( Z == 1 ) { assert( Y >= 1 ); }
>>
>>won't abort legitimately.
>
>
> And I just wonder how revised Java volatiles (which supposedly meant to
> provide SC semantics)
The JMM doesn't promise this. Somewhere in the JMM archives is a
discussion about this kind of lack of transitivity. It is one
ot the reasons that the formal models are more complicated than
you'd wish.
-Doug
More information about the cpp-threads
mailing list