Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.programming.threads > #1038
| Path | csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail |
|---|---|
| From | "aminer" <aminer@videotron.ca> |
| Newsgroups | comp.programming, comp.programming.threads |
| Subject | Re: CAS operations and scalability... |
| Date | Sun, 26 Aug 2012 14:08:14 -0500 |
| Organization | A noiseless patient Spider |
| Lines | 50 |
| Message-ID | <k1domk$s2n$1@dont-email.me> (permalink) |
| References | <k1dira$jt9$1@dont-email.me> <FsqdncaQ9pkkw6fNnZ2dnUVZ_sGdnZ2d@earthlink.com> |
| Injection-Date | Sun, 26 Aug 2012 18:08:20 +0000 (UTC) |
| Injection-Info | mx04.eternal-september.org; posting-host="c43ca82f9e8d62a602307fe9d2e9b807"; logging-data="28759"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/JQCh7JweICSCA2nu47Tg8" |
| X-MimeOLE | Produced By Microsoft MimeOLE V6.00.2900.5512 |
| X-RFC2646 | Format=Flowed; Response |
| X-Newsreader | Microsoft Outlook Express 6.00.2900.5512 |
| Cancel-Lock | sha1:+NStfX7s83r2P4FD/sb5Cr6zXVY= |
| X-Priority | 3 |
| X-MSMail-Priority | Normal |
| Xref | csiph.com comp.programming:2120 comp.programming.threads:1038 |
Cross-posted to 2 groups.
Show key headers only | View raw
Hello, You are right Patricia. Thank you, Amine Moulay Ramdane. "Patricia Shanahan" <pats@acm.org> wrote in message news:FsqdncaQ9pkkw6fNnZ2dnUVZ_sGdnZ2d@earthlink.com... > On 8/26/2012 10:28 AM, aminer wrote: > ... >> When the CAS operation "goes on the bus", use of CAS can impair >> scalability. >> but CAS can be accomplished locally -- that is, with no bus >> transactions -- >> and then it can scale. > ... > > The problem the hardware faces doing CAS in-cache is that it must make > sure that no other processor can write to the cache line containing the > CAS target during the critical period of the cache. > > If multiple processors are attempting CAS operations on the same target > at about the same time there are two costs: > > 1. The bus traffic to ensure that only one processor is writing to the > cache line at any time, and that processor has the latest value of the > cache line. > > 2. Repeated CAS operations, due to changes to the CAS target between > doing whatever reads select the value and doing the CAS itself. > > You can do a couple of things to limit these costs. One is to make sure > each CAS target is by itself in a cache line. That will reduce the risk > of unnecessary bus traffic due to access to other fields in the same > line. The other is to structure your code to minimize contention for any > one CAS target, so that a CAS has a very high probability of the compare > matching. You can instrument your CAS-using code to see how many CAS > attempts you are making per successful CAS. > > Patricia
Back to comp.programming.threads | Previous | Next — Previous in thread | Next in thread | Find similar
CAS operations and scalability... "aminer" <aminer@videotron.ca> - 2012-08-26 12:28 -0500
Re: CAS operations and scalability... "aminer" <aminer@videotron.ca> - 2012-08-26 12:56 -0500
Re: CAS operations and scalability... Patricia Shanahan <pats@acm.org> - 2012-08-26 10:36 -0700
Re: CAS operations and scalability... "aminer" <aminer@videotron.ca> - 2012-08-26 14:08 -0500
Re: CAS operations and scalability... "aminer" <aminer@videotron.ca> - 2012-09-13 19:13 -0500
csiph-web