Teaching

Here is the material for hands-on sessions and labs to teach concurrency using Synchrobench.
Take a look at the sample labs:

    I. Prerequisites to Synchrobench

      A first step before understanding synchronization techniques is to understand the problem
      of contention, deadlock and livelock illustrated below.

  1. Contention: The first lab is to give an idea of the problem of contention in multi-threaded environements with a simple bank account example.
  2. Deadlock: The second lab is about illustrating a deadlock with a simple bank account example.
  3. Livelock: The third lab is about illustrating a livelock and starvation with a simple bank account example.
    II. Starting with Synchrobench

      Learning how to use synchrobench is easy. Here you will install synchrobench, learn how to
      measure the performance of a concurrent data structures on a multi-core machine, and extends
      Synchrobench with your own concurrent data structures to rapidly compare its performance to
      the state-of-the-art.

  1. Synchrobench setup and test in 10 min: The first session is about configuring Synchrobench Java to use it on the command line in 10 minutes or through Eclipse (material: overview and Java version pages).
  2. Scalability: The second session is about observing performance scalability with the level of concurrency of a multi-core machine.
  3. Extending Synchrobench with a new concurrent data structure.

    III. Comparing the synchronization techniques

  1. Coarse-grained lock: a simple way of protecting a data structure to guarantee that at most one thread accesses it at a time.
  2. Reader-writer lock: allowing threads to share a data structure when they read it to improve performance.
  3. Hand-over-hand locking: allowing threads to access different part of the data structure at the same time to improve performance further.
  4. Optimistic locking: avoiding to lock all the elements except the ones to update, and hoping that these elements were not modified in the meantime, in which case we would have to restart.
  5. Optimal-concurrency: exploiting versioned locking to avoid locking unnecessarily the elements to modify and comparing the result to optimistic (or lazy) locking (material: Versioned list).

    IV. Advanced topics

  1. Lock-free (i.e., non-blocking) data structure: a concurrent linked list that uses compare-and-swap but does not block.
  2. A link to a tutorial used at MIT to reclaim memory allocated in a non-blocking linked list.
  3. A tutorial used at Ecole Polytechnique about Fine-grained locking to lock-freedom provided courtesy of Francesco Zappa Nardelli (material: Ch.9 of Herlihy and Shavit's book).
  4. A tutorial used at Telecom Paris about Coarse-grained to fine-grained locking is provided courtesy of Petr Kuznetsov and explores the performance of lock-based linked list data structures that implement a Set abstraction in Java (material: Ch.9 of Herlihy and Shavit's book).
  5. Transactional memory: This tutorial is about understanding the difference between mutual exclusion and transactions (material).

Feel free to share any hands-on session or lab that uses Synchrobench.


Ċ
lab2.pdf
(60k)
Vincent Gramoli,
Jan 22, 2020, 8:12 AM
Ċ
lab3.pdf
(105k)
Vincent Gramoli,
Jan 22, 2020, 8:13 AM
Ċ
lab5.pdf
(143k)
Vincent Gramoli,
Jan 22, 2020, 8:14 AM
Comments