How does a lost update happen?
What three steps make up an increment?
What is a critical section?
Which lines belong inside the lock for the balance example?
Balance 10, two threads each add 5, and one update is lost. Give the final balance.
Answer: ______________
Locking the whole program is the recommended fix for one race.
Circle one: True False
Locking the check together with the act fixes check-then-act races.
Circle one: True False
A thread checks balance above 10, then withdraws, but the money is gone. Both lines look right. What is wrong?