Question: Which is better to implement spin locks: the test-and-set instruction or the compare- and-swap instruction? Explain

Which is better to implement spin locks: the test-and-set instruction or the compare- and-swap instruction? Explain
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
