potential consequences of non-atomic test-and-set!
two implementations of semaphores
concurrent account exchanges avoiding deadlock