Since CAS operates on a single pointer-sized memory location, while most lock-free and wait-free algorithms need to modify multiple locations, several extensions have been implemented.
- Double compare-and-swap compares two unrelated memory locations with two expected values, and if they're equal, sets both locations to new values. This operation only exists on Motorola 680x0 processors, but in early papers was often required.
- Double-wide compare-and-swap operates on two adjacent pointer-sized locations (or, equivalently, one location twice as big as a pointer). On later x86 processors, the CMPXCHG8B and CMPXCHG16B instructions serve this role, although early 64-bit AMD CPUs did not support CMPXCHG16B (modern AMD CPUs do).
- Single compare, double swap compares one pointer but writes two. The Itanium's cmp8xchg16 instruction implements this, where the two written pointers are adjacent.
- Multi-word compare-and-swap is a generalisation of normal compare-and-swap. It can be used to atomically swap an arbitrary number of arbitrarily located memory locations. Usually, multi-word compare-and-swap is implemented in software using normal double-wide compare-and-swap operations. The drawback of this approach is a lack of scalability.
Read more about this topic: Compare-and-swap
Other articles related to "extensions, extension":
... is being extended beyond Conca d'Oro to Piazzale Jonio (and then to Bufalotta), another future extension has been planned beyond Rebibbia with 2 stations San Basilio and ...
... As with group extensions, if we fix F and H, then all (equivalence classes of) possible extensions of H by F form an abelian group ... is isomorphic to the Ext group, where the identity element in corresponds to the trivial extension ... In the case where H is the structure sheaf, we have, so the group of extensions of by F is also isomorphic to the first sheaf cohomology group with coefficients in F ...
... Competitive extensions-Nash differential games Empirical testing of the Sethi model and extensions Stackelberg differential games The Sethi durable goods model ...
... Extensions of conjunctive queries capturing more expressive power include unions of conjunctive queries, which are equivalent to positive (i.e ... The formal study of all of these extensions is justified by their application in relational databases and is in the realm of database theory ...
Famous quotes containing the word extensions:
“If we focus exclusively on teaching our children to read, write, spell, and count in their first years of life, we turn our homes into extensions of school and turn bringing up a child into an exercise in curriculum development. We should be parents first and teachers of academic skills second.”
—Neil Kurshan (20th century)
“The psychological umbilical cord is more difficult to cut than the real one. We experience our children as extensions of ourselves, and we feel as though their behavior is an expression of something within us...instead of an expression of something in them. We see in our children our own reflection, and when we dont like what we see, we feel angry at the reflection.”
—Elaine Heffner (20th century)