Boost logo

Boost :

Subject: Re: [boost] [lockfree] review
From: Alexander Terekhov (terekhov_at_[hidden])
Date: 2011-08-27 07:31:18


"Boehm, Hans" wrote:
[...]
> In my mind, the main way in which sequential consistency differs from the
> cheaper acquire/release semantics that Alexander wants is that

Actually I want even more relaxed 'modes' model.

>
> a) Dekker's algorithm (which by itself isn't that practically interesting),
> plus a number of real lock-free algorithms (which do matter) don't work.
>
> b) In my mind, acquire/release is a far more difficult model to explain to non-
> experts than the model for C++ with only sequentially consistent atomics. You

Difficult model? I view it as job security for those who can understand.

Consider also that

http://www.cl.cam.ac.uk/~pes20/cpp/cpp0xmappings.html
(x86 (including x86-64) part)

"Load Seq_Cst: MOV (from memory)
Store Seq Cst: (LOCK) XCHG // alternative: MOV (into memory),MFENCE"

is an overkill for typical use cases (e.g. see recent "Double checked
locking pattern article on aristeia" thread on comp.lang.c++.moderated),
compared to

http://www.cl.cam.ac.uk/~pes20/cpp/cpp0xmappings.html
(x86 (including x86-64) part)

"Load Acquire: MOV (from memory)
Store Release: MOV (into memory)"

regards,
alexander.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk