Compare-and-swap
en.wikipedia.org · 2,728 words · saved by 1 readers
Couldn't find lead section for Compare-and-swap
Compare-and-swap - Wikipedia Jump to content From Wikipedia, the free encyclopedia Atomic computer processor instruction In computer science , compare-and-swap ( CAS ) is an atomic instruction used in multithreading to achieve synchronization. It compares the contents of a memory location with a given (the previous) value and, only if they are the same, modifies the contents of that memory location to a new given value. This is done as a single atomic operation. The atomicity guarantees that the new value is calculated based on up-to-date information; if the value had been updated by another t
related reading
- False sharing - Wikipediaen.wikipedia.org
- A very concrete explanation of how a cache worksparksb.github.io
- What Every Programmer Should Know About Memorypeople.freebsd.org
- Context switch - Wikipediaen.wikipedia.org
- C++11 Memory Modelpeople.cs.pitt.edu
- Inter-process communication in Linux: Shared storage | Opensource.comopensource.com
- Cache coherence - Wikipediaen.wikipedia.org
- A Concurrency Cost Hierarchytravisdowns.github.io
- std::sync::atomic - Rustdoc.rust-lang.org
- The Go Memory Model - The Go Programming Languagego.dev
- Memory Barriers Are Like Source Control Operationspreshing.com
- Multithreading (computer architecture) - Wikipediaen.wikipedia.org