A person is trying to transfer money from account a to account b. The most naive and natural single threaded implementation would be using a mutex for respecting atomicity and concurrency.
mutex.wait() a = a -50
b = b +50
mutex.signal()
I am sure this solution does not scale as number of mutex resources are limited and there would be several users of such systems.
What are the ways if any to make it a scalable solution ?