[concurrency-interest] Programming language-independent memory models

Andrew Haley aph at redhat.com
Wed Aug 9 05:54:00 EDT 2017


On 08/08/17 20:10, Hans Boehm wrote:
> IMHO, the closest we have that is actually solid and understandable
> is the basic DRF model, with undefined semantics for data races.
> e.g. sections 2+3 from http://dl.acm.org/citation.cfm?id=1375581.1375591 .
> This was never actually that expensive on x86, and it seems to be getting
> more affordable on ARM as well. But my impression is that it'll never fly
> on a GPU.
> 
> We know how to correctly add acquire/release atomics, though that
> mixed model becomes far more complicated and unintuitive.
> 
> But almost everyone seems to feel the need to throw in some kind
> of relaxed atomics or defined behavior for data races, at which point
> things get flaky, and a universal design seems unlikely to me.

Mmm, okay.  I was guessing that might be the situation, and it's very
useful to have it confirmed.  I'm sure that undefined behaviour (in
the unconstrained sense) for data races isn't going to be acceptable
for most programming languages.  The problem is, I suppose, that
specifying exactly what may occur in the presence of data races is
necessarily dependent on the semantics of each programming language.

There are some opportunities for research here.

Thanks.

-- 
Andrew Haley
Java Platform Lead Engineer
Red Hat UK Ltd. <https://www.redhat.com>
EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671


More information about the Concurrency-interest mailing list