[jmm-dev] Specifying VarHandle acquire/release without ill effects

Hans Boehm boehm at acm.org
Tue Jun 28 00:20:20 UTC 2016


I would probably define synchronization actions to include acquire and
release operations, and rename synchronization order to something else (SC
order?), and ensure that it includes only SC operations.  That's what C++
currently does, effectively.

On Mon, Jun 27, 2016 at 4:50 PM, Martin Buchholz <martinrb at google.com>
wrote:

> (I'm not qualified to revise the memory model, but I can handwave ...)
>
> On Sat, Jun 25, 2016 at 12:48 AM, Hans Boehm <boehm at acm.org> wrote:
>
>> I think C++'s definitions of acquire/release, as refined by the work by
>> Mark Batty et al, are in pretty good shape.  But I strongly suspect they
>> are incompatible with Java's notion of a total synchronization order.
>
>
> https://docs.oracle.com/javase/specs/jls/se8/html/jls-17.html#jls-17.4.6
> Current memory model has:
>
> - synchronization order, which is a total order over all synchronization
> actions
> - synchronizes-with, a partial order over synchronization actions
> - happens-before, a partial order over actions
>
> and (hand-waving) "all we need to do" is allow synchronizes-with to also
> apply to actions that are not synchronization actions (acquires and
> releases)
>
>


More information about the jmm-dev mailing list