UP | HOME
| ../../

Concurrency Fundamentals

1 Concurrency Problems

  1. Mutual Exclusion
  2. (Asynchronous) Message Passing
  3. Synchronization

1.1 Concurrency Folk Theorems

  1. Folk Theorem: Given any one mechanism for the above, the others cannot be built
  2. Folk Theorem: Given any two of the above, the third can be built.

2 Elementary Constructs

2.1 ./semicolon-par-fat-bars.html

  1. Semantics of Semicolon ;
  2. Semantics of Parallel Bar ||
  3. Semantics of Fat Bar []

2.2 <> statements

  1. Angular-brackets: The enclosed statements are performed atomically.
  2. Defining the semantics of "atomic" is a goal of this course.
  3. For now: No interleaving of other processes/ threads.

2.3 <await> statements

  1. <await B => S> B is a side-effect-free Boolean expression. S is a code segment.
  2. Semantics, first cut:
    1. {Wait until B is true. Execute S. Atomically. Once.}
  3. Semantics, more to come.

2.4 Semaphores

  1. An Abstract Data Type with two methods: P and V.
    1. Some literature uses "wait" instead of P, and "signal" instead of V.
    2. Uses await-statements.
  2. Semaphores

2.5 Send + Recv Primitives

  1. In process Q: P ! msg to process P send message msg
  2. In process P: Q ? v from process Q receive a message and store it in v
  3. The send from Q and the recv by P appear as a single event to an external observer.
  4. No "buffering".
  5. The primitives of distributed computing.

2.6 Shared Tuple Space

  1. A tuple is an ordered sequence of values, not necessarily of the same type.
    1. Ex: ("hello", true, 0.123, 50)
  2. T, a shared tuple space, a bag of tuples. Collection possibly with dupes. For now, assume just one T.
  3. read from a shared tuple space T: read("hello", ?bl, ?rn, ?in); item read remains in T.
  4. input("hello", ?bl, ?rn, ?in); T loses the item input. Atomically.
  5. write into a shared tuple space T: output("there", 44); T gains the item written. Atomically.

3 Distributed Computing Architectures

4 End


Copyright © 2016 • www.wright.edu/~pmateti