Boost logo

Boost :

Subject: Re: [boost] [lockfree] review
From: Gordon Woodhull (gordon_at_[hidden])
Date: 2011-07-30 12:44:34


On Jul 30, 2011, at 8:40 AM, Dave Abrahams <dave_at_[hidden]> wrote:

>
> on Fri Jul 29 2011, Gordon Woodhull <gordon-AT-woodhull.com> wrote:
>
>> On Jul 29, 2011, at 7:36 PM, Dave Abrahams <dave_at_[hidden]> wrote:
>>
>>> Personally I never understood how sequential consistency could be much
>>> of a help in reasoning about multithreaded programs... but that's just
>>> me.
>>
>> True, it's bad enough with sequential consistency, but without it
>> there's no hope of understanding at all IMO.
>
> I think I meant the opposite, or nearly so. How does not having
> sequential consistency make reasoning worse?

I must be missing something. Without it you can't depend on the order of operations even within one block and one thread, right?

E.g. we were talking about translating concurrent pseudocode to real code. Without sequential consistency it might require inserting memory barriers and it's never clear where, or if some other architecture is going to need different ones.

How is it not better to at least understand that a single piece of code will do what it says in the same order?


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