What is the advantage of LL / SC compared to CAS (comparison and exchange)?

What is the advantage of LL / SC over CAS (comparison and swap) in computer architecture? I think LL / SC can use livelock on a multi-core system and a problem with ABA, but CAS does not. I cannot find out about the benefits of LL / SC compared to CAS. Can anyone tell me?

+4
source share
1 answer

Since no one answered, LL / SC does not suffer from an ABA problem, since the condition of the conditional storage will not be fulfilled if the address referenced by LL is changed. In addition, it cannot work because one or more LL / SC pairs do not match, and others succeed. CAS can also potentially be more expensive, as you may need to reset the invalid queue.

+2
source

All Articles