Question: Race conditions are possible in many computer systems. Consider a banking system that maintains an account balance with two functions: deposit(amount) withdraw(amount) These two functions
Race conditions are possible in many computer systems. Consider a banking system that maintains an account balance with two functions:
deposit(amount) withdraw(amount)
These two functions are passed the amount that is to be deposited or withdrawn from the bank account balance. Unfortunately, these functions are not designed to run atomically.
Assume that a husband and wife share a bank account with an initial balance of $250.00. Assume that, concurrently the husband calls withdraw($50) and the wife calls deposit($100). What would be a possible account balance at the end of withdrawal and deposit operations?
choose one or more answers from below
$250
$200
$350
$300
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
