Is all this Invarient **** er... stuff, premature optimisation?
Me Here
p9e883002 at sneakemail.com
Tue Apr 29 12:25:16 PDT 2008
Sean Kelly wrote:
> == Quote from Walter Bright (newshound1 at digitalmars.com)'s article
> > Me Here wrote:
> > > If that describes copy-swap then yes. Else no :)
> > copy-swap is what lock free algorithms rely on for updating a data
> > structure. It's at the root of STM, and even has its own TLA, CAS (Copy
> > And Swap).
>
> I believe CAS actually stands for "compare and swap" or "compare and set"
> depending on who you talk to. RCU is probably a more popular algorithm
> for copy and swap--it's used in the Linux kernel quite a bit. It stands for
> "read, copy, update," I believe.
>
>
> Sean
>From the litrature I found, CAS is (was originally) the name of the opcode
used on a Sun microprocessor to conditionally and atomically swap the contents
of two words of memory (or maybe memory and register).
It also mentions a CASX opcode, and a LL/SC (Load Linked / Store
Conditional) pairing that can be used as alternatives.
Cheers, b.
--
More information about the Digitalmars-d
mailing list