Summary of Thursday, January 16

Summary of Thursday, January 16

  1. Characterize interactions which may jeopardize consistency of concurrent systems
  2. Describe two basic forms of synchronization required to control these interactions
  3. Identify classical concurrent programming problems (illustrate why there are 2 forms)
  4. Illustrate synchronization via Java

Characterize Interactions Which May Jeopardize Consistency: Interference

Interference

Bernstein's condition allows us to identify which threads and objects will interfere

(R1 and W2) or (W1 and R2) or (W1 and W2)
Read/Write or Write/Read or Write/Write

Notice that the only condition missing from Berstein's condition is Read/Read. Thus, according to Berstein, this is the only condition in which there is no interference.


Read/Read No Interference
Read/Write Interference
Write/Write Interference

Note that Berstein's condition does not tell us how to fix the interference.


Two Basic Forms of Synchronization

Mutual Exclusion

Condition Synchronization


Classical Concurrent Programming Problems

Exclusive Use Producer-Consumer and the ``Bounded Buffer'' Reader-Writer Dining Philosophers


Illustrate Synchronization via Java

Java Support for Synchronization -- Threads Problem Set 1



CS5204
Joey Gabbard
Sat Jan 25 15:55:54 EST 1997