Article 5F8M7 [$] Lockless patterns: an introduction to compare-and-swap

[$] Lockless patterns: an introduction to compare-and-swap

by
corbet
from LWN.net on (#5F8M7)
In the first part of this series, I showed you the theory behindconcurrent memory models and how that theory can be applied tosimple loads and stores. However, loads and stores alone are nota practical tool for the building of higher-level synchronization primitivessuch as spinlocks, mutexes, and condition variables.Even though it is possible to synchronize two threads using thefull memory-barrier pattern that was introduced last week (Dekker'salgorithm), modern processors provide a way that iseasier, more generic, and faster-yes, all three of them-thecompare-and-swap operation.
External Content
Source RSS or Atom Feed
Feed Location http://lwn.net/headlines/rss
Feed Title LWN.net
Feed Link https://lwn.net/
Reply 0 comments