previous | start | next

Self Check

  1. Give a scenario in which a race condition causes the bank balance to be -100 after one iteration of a deposit thread and a withdraw thread.
  2. Suppose two threads simultaneously insert objects into a linked list. Using the implementation in Chapter 20, explain how the list can be damaged in the process.

previous | start | next