[cpp-threads] Alternatives to SC

Hans Boehm Hans.Boehm at hp.com
Fri Jan 12 06:22:11 GMT 2007



On Thu, 11 Jan 2007, Paul E. McKenney wrote:

> Since we don't have SC now, a more appropriate answer is "what would SC
> buy us?".  Thus far, your answers have not been convincing to me.
>
I'm not sure we're all talking about the same thing here.  I think
we're only talking about SC for specially marked atomics.  We are all
assuming that for C++ races on ordinary variables are disallowed,
with perhaps minor disagreements about the semantics of "disallowed".
Thus the hardware and compiler are allowed to implement operations
on ordinary variables essentially as they do now.

We do clearly have sufficient hardware support to support such as SC atomics
adequately on some platforms.  (Amusingly, Alpha is probably one of those?)
We have issues, or at least lack of clarity, on others.

(As far as I know, there even seem to be a few platforms that provide full SC
for all loads and stores, namely current hardware PA-RISC processors,
and possibly MIPS.  This suggests to me that at least empirically the
hardware tradeoffs are not obvious.  But I don't think anyone wants to
restrict us to fully SC hardware, certainly not I.)

Hans



More information about the cpp-threads mailing list