From 4529942307166053089
X-Google-Thread: f78e5,edf2eb1d3f0f9755
X-Google-Attributes: gidf78e5,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: terekhov@web.de (Alexander Terekhov)
Newsgroups: comp.std.c++
Subject: Re: Multithreaded programming: is the C++ standardization 
 committeelistening?
Date: Sat, 21 Aug 2004 22:18:49 GMT
Lines: 49
Sender: mail2news@demon.net
Approved: fjh@cs.mu.oz.au (Fergus Henderson , moderator of comp.std.c++)
Message-ID: <41279FFB.5D570142@web.de>
References: <2ofbepFa2tpoU1@uni-berlin.de> <6uh6i0tbr0j0urbnocg5t9ucb5gfpr8gr3@4ax.com> <2ohmmiFavqsiU1@uni-berlin.de> <4123BD01.BCF1DC67@web.de> <2oig7mFb30cmU1@uni-berlin.de> <cg33nf$k48$1@news.cistron.nl> <412533CA.82703A04@web.de> <cg3v7s$ll0$1@news.astound.net>
NNTP-Posting-Host: news.news.demon.net
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Trace: news.demon.co.uk 1093126733 7239 158.152.254.254 (21 Aug 2004 22:18:53 GMT)
X-Complaints-To: abuse@demon.net
NNTP-Posting-Date: Sat, 21 Aug 2004 22:18:53 +0000 (UTC)
X-Robomod: STUMP, ichudov@algebra.com (Igor Chudov)
X-Spam-Checker-Version: SpamAssassin 2.64-mulga_r1 (2004-01-11) on 
	mulga.cs.mu.OZ.AU
X-Orig-X-Trace: news.uni-berlin.de wQ0rqvlgXPmNHI93SZ8tNw5XYhgmhgjk8ZvJ5wsjEYvg4Nii7t
X-Spam-Status: No, hits=-4.8 required=5.0 tests=AWL,BAYES_00 autolearn=ham 
	version=2.64-mulga_r1
X-Accept-Language: en
X-Reply-To: terekhov@web.de
X-Received: (from fjh@localhost)
	by mulga.cs.mu.OZ.AU (8.12.10+Sun/8.12.9/Submit) id i7LMInAr015872;
	Sun, 22 Aug 2004 08:18:49 +1000 (EST)
X-Path: comp-std-cpp-robomod!not-for-mail
X-Delivered-To: std-c++@ucar.edu
X-Authentication-Warning: mulga.cs.mu.OZ.AU: fjh set sender to devnull@stump.algebra.com using -f
X-Newsgroups: comp.std.c++
Path: g2news1.google.com!news2.google.com!proxad.net!fr.ip.ndsoftware.net!216.196.110.149.MISMATCH!border2.nntp.ams.giganews.com!nntp.giganews.com!news.zanker.org!news.amigo.co.uk!news.clara.net!wagner.news.clara.net!194.159.246.34.MISMATCH!peer-uk.news.demon.net!kibo.news.demon.net!news.demon.co.uk!demon!stump.algebra.com!devnull
Xref: g2news1.google.com comp.std.c++:1986


"David B. Held" wrote:
> 
> Alexander Terekhov wrote:
> > [...]
> > Well, LL/SC is actually superior to CAS (LL/SC is ABA-proof), but
> > is less portable than CAS. And i386 doesn't have CAS, BTW.
> > [...]
> 
> That's interesting, because:
> 
> http://www.research.ibm.com/people/m/michael/ieeetpds-2004.pdf
> 
> claims that LL/SC is fairly watered down in practice.  

Well, Alpha and MIPS aside for a moment, see

http://www.ibm.com/developerworks/eserver/pdfs/archpub2.pdf
(1.7.3 Atomic Update)

<quote>

One use of lwarx and stwcx. is to emulate a "Compare and Swap" 
primitive like that provided by the IBM System/370 Compare and 
Swap instruction; see Section B.1, "Atomic Update Primitives" 
on page 39. A System/370-style Compare and Swap checks only 
that the old and current values of the word being tested are 
equal, with the result that programs that use such a Compare 
and Swap to control a shared resource can err if the word has 
been modified and the old value subsequently restored. The 
combination of lwarx and stwcx. improves on such a Compare and 
Swap, because the reservation reliably binds the lwarx and 
stwcx. together. The reservation is always lost if the word is 
modified by another processor or mechanism between the lwarx 
and stwcx., so the stwcx. never succeeds unless the word has 
not been stored into (by another processor or mechanism) since 
the lwarx. 

</quote>

regards,
alexander.

---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.jamesd.demon.co.uk/csc/faq.html                       ]



