Understanding of CAS and some interview questions

CAS definition: The full name of CAS is compare and swap. It is a CPU concurrency primitive. Its function is to judge whether the value of a location in memory is the expected value. If so, it will be changed to a new value. This process is atomic. The CAS operation contains three operands: memory location (V), expected value (A), and new va ...

Posted on Tue, 02 Nov 2021 23:46:52 -0400 by wizkid