[concurrency-interest] Why is happens-before order a partial order?

Aleksey Shipilev shade at redhat.com
Sat Oct 7 10:45:06 EDT 2017

On 10/07/2017 04:36 PM, thurstonn wrote:
> Well, yes that's my understanding (as is clear from the OP).
> So, just for clearing up the semantics, would it be correct to say that the
> JMM is saying there is exactly *one* happens-before order (for a given
> execution), just as there is only one synchronization order?

By definition in 17.4.6, execution is the tuple that contains exactly one synchronization order, and
exactly one happens-before order, among other things. I.e. these are the orders over the set of
actions present in that execution.

But this does not say how many executions can relate to a particular program.

> And if so, the single happens-before order of the above execution would be:
> A <= B <= C <= D <= E <= F, G <= H

Yes, assuming no other actions are synchronization actions, except for C and D. The missing
relations to G and H forbid us from calling that partial order total.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://cs.oswego.edu/pipermail/concurrency-interest/attachments/20171007/25740c1b/attachment-0001.sig>

More information about the Concurrency-interest mailing list