[cpp-threads] Sequential Consistency redux

Alan Stern stern at rowland.harvard.edu
Mon Nov 21 21:12:33 GMT 2011


On 21 Nov 2011, N.M. Maclaren wrote:

> On Nov 21 2011, Paul E. McKenney wrote:
> >
> >> Amusingly, this case shows that the note in 1.10p12 is misleading, and
> >> is therefore inappropriate!  Notes are there for clarification, and
> >> that one doesn't clarify ....
> >
> >What would you suggest as an alternative?  If I recall correctly,
> >the history is that one of the Cambridge guys (Mark Batty, I believe)
> >came up with a litmus test that was permitted in absence of 1.10p12.
> >This litmus test motivated the addition of 1.10p12.
> 
> 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?

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.

(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".)

Alan Stern




More information about the cpp-threads mailing list