[cpp-threads] Sequential Consistency redux

N.M. Maclaren nmm1 at cam.ac.uk
Tue Nov 22 08:55:53 GMT 2011


On Nov 21 2011, Alan Stern wrote:
>> 
>> Oh, it's not the normative text I am talking about, but just the Note.
>> I would just drop the Note.
>
>In what respect is the note misleading?

Because the mutex example does not use an overt consume operation, there
is no reference to 'consume' in section 30, and the note says that it is
needed only for consume operations!

>It's worth mentioning that even before the "litmus test" was devised 
>and 1.10p12 was added, it was felt that the text would rule out the 
>sort of non-sequentially-consistent behavior of mutexes you asked 
>about.

Was it?  Because I don't think that is actually true.  In the absence
of any evidence that is the case, I think that we have to regard it as
one of the many misapprehensions in this area.  Many got removed; many
didn't.  Mixing parallelism and serial libraries is an ancient evil.

>(On the other hand, even now I think the text could stand a little more
>clarification.  1.10p8 says "All operations on a given mutex occur in a
>single total order", but it doesn't say explicitly that this order must
>be consistent with "happens before".  Contrast this with the way 1.10p6 
>talks about the relation between an atomic object's modification order 
>and "happens before".)

That's true, but not enough.  It's only a Note, anyway, and not normative.
Note that it says a GIVEN mutex, I was using two, and both were operated
on (individually) in a single total order.  What they were not was
sequentially consistent, in the absence of the normative text in 1.10p12.


Regards,
Nick Maclaren.






More information about the cpp-threads mailing list