The purpose of this lab is to provide you with some experiencing seeing how various synchronization primitives play out in practice. It will take the form of playing four versions of a simple competitive online game.

1 Getting with a group

In the lab, create groups of 3–5 people each. TAs should help you form appropriate groups.

You will then go through the four game variants together.

2 The Game

You’ll be presented with

Your goal is to reach your target dollar amount before anyone else you are playing with does so.

3 The Variants

  1. Variant 1 (link) has atomic money moves and no other synchronization. It is possible (even likely) that other players’ plays will occur between you looking at the table and your play being acted on.

  2. Variant 2 (link) uses locks to prevent plays if someone else has made a play between your looking and acting.

  3. Variant 3 (link) places arriving players in a queue and only lets them play in order. It is otherwise like Variant 1.

  4. Variant 4 (link) uses voting to make plays; only if a majority of players agree to an action does it occur.

Each variant allows arbitrary game names. Your group should

  1. for each variant
    1. repeat until you agree on how the variant feels in play
      1. pick a name
      2. all enter that game (make sure no one plays before all are in the game)
      3. play until someone wins (we encourage conversation during play)
  2. agree on how to describe how the different synchronization models changed how the game feels; you’ll need to share this with a TA for check-off.
  3. call a TA to come and share what you found

4 Passing Off

Explain to a TA how the different games felt different. They will be looking for evidence that you understood how the synchronization model impacted the game.