CS 5220

Applications of Parallel Computers

Discrete Event Simulations

Prof David Bindel

Please click the play button below.

Discrete event systems

May be discrete or continuous time

  • Game of life, logic-level circuit simulation
  • Network simulation

Discrete events

  • Finite set of variables, updated via transition function
  • Synchronous case: finite state machine
  • Asynchronous case: event-driven simulation
  • Synchronous example: Game of Life
  • Nice starting point — no discretization concerns!

Game of Life

Game of Life (John Conway):

Picture of game of life rules

Game of Life

Game of Life (John Conway):

  1. Live cell dies with < 2 live neighbors
  2. Live cell dies with > 3 live neighbors
  3. Live cell lives with 2–3 live neighbors
  4. Dead cell becomes live with exactly 3 live neighbors

Game of Life

Easy to parallelize by domain decomposition.

Picture of game of life rules
  • Update work involves volume of subdomains
  • Communication per step on surface (cyan)

Game of Life: Pioneers and Settlers

Some areas are more eventful than others!

Glider gun image (By Lucas Vieira - Own work, CC BY-SA
            3.0,
            https://commons.wikimedia.org/w/index.php?curid=101736)

Game of Life: Pioneers and Settlers

What if pattern is “dilute”?

  • Few or no live cells at surface at each step
  • Think of live cell at a surface as an “event”
  • Only communicate events!
    • This is asynchronous
    • Harder with message passing — when to receive?

Asynchronous Game of Life

How do we manage events?

  • Speculative — assume no communication across boundary for many steps, back up if needed
  • Conservative — wait when communication possible
    • possible \(\not \equiv\) guaranteed!
    • Deadlock: everyone waits for a send
    • Can get around this with NULL messages

Asynchronous Game of Life

How do we manage load balance?

  • No need to simulate quiescent parts of the game!
  • Maybe dynamically assign smaller blocks to processors?