|
|
|
|
|
by chrisseaton
3381 days ago
|
|
> CAS is "lock free" only in the sense that it doesn't require the processor to stop the world in order to flip the mutex boolean No, CAS is lock free in the sense that a process or thread that freezes for whatever reason while doing a CAS operation cannot cause the entire system to stop making progress (provided your hardware is working as intended). That's the only thing that matters to say if something is 'lock free' or not, and CAS meets that definition. If you want some other property that's fine, but that's not what anyone understands by 'lock free'. |
|
> I don't like usage of the term "lock free" to mean "locks that are less costly".
There's a difference between being formally "lock free" meaning "the system is guaranteed to not globally deadlock", and this informal use of "lock free" meaning "CAS is more efficient because it doesn't block execution of other threads in obtaining a mutex"
This article's intro:
is talking about performance, not termination guarantees, and that muddles the meaning of "lock free".