Atomic Test And Set
Test a value to see if it indicates “available”
Set the value to indicate available
Must execute indivisibly
TestAndSet x
int current = x;
if (current == FREE)
x = BUSY;
return current;
Previous slide
Next slide
Back to first slide
View graphic version