ATM Example
Suppose each cash machine transaction is controlled by a separate process, and the withdraw code is:
cur_balance=get_balance (acct_ID)
withdraw_amt=read_amount_from_ATM()
if withdraw_amt>curr_balance then error
curr_balance=curr_balance - withdraw_amt
put_balance (act_ID,curr_balance)
deliver_bucks(withdraw_amt)
Now, suppose that you and your s.o. share an account. You each to to separate cash machines and withdraw $100 from your balance of $1000.