I was watching this Stanford Course and I was intrigued when the lecturer gave the example of ATMs — https://youtu.be/Ps8jOj7diA0?t=550 (9:00)
My question is lets say you have a shared resource (bank) and two processes (ATMs) and they are all synced time wise. There is $100 and at the EXACT time I execute a withdraw of $100 from both ATMs how is the bank able to determine the validity of the request? I understand you can lock, do transaction, and unlock but what happens if the transaction is exactly at the same time.
I know in the real world there is slippage in time but this is more of a theoretical question.