Module 7: Synchronization
  Lecture 13: Introduction to Atomic Primitives
 


Synchronization

Types

  • Mutual exclusion
    • Synchronize entry into critical sections
    • Normally done with locks
  • Point-to-point synchronization
    • Tell a set of processors (normally set cardinality is one) that they can proceed
    • Normally done with flags
  • Global synchronization
    • Bring every processor to sync
    • Wait at a point until everyone is there
    • Normally done with barriers

Synchronization

  • Normally a two-part process: acquire and release; acquire can be broken into two parts: intent and wait
    • Intent: express intent to synchronize (i.e. contend for the lock, arrive at a barrier)
    • Wait: wait for your turn to synchronization (i.e. wait until you get the lock)
    • Release: proceed past synchronization and enable other contenders to synchronize
  • Waiting algorithms do not depend on the type of synchronization