CAS (Compare-And-Swap) is a hardware support for concurrent processors for multiprocessor designed to operate in a special command for managing concurrent access to shared data.
CAS is to achieve non-blocking algorithm for a lock-free;
CAS includes three operands, V needs to read memory values, comparison values A, B intends to write a new value;
If and only if the value is equal to V A, CAS B with a new value by updating the value of V atomic manner, it would not do anything;