Multiprogramming and multiprocessing imply synchronization
Locking
- Critical sections
- Mutual exclusion
- Used for exclusive access to shared resource or shared data for some period of time
- Efficient update of a shared (work) queue
Barriers
- Process synchronization -- All processes must reach the barrier before any one can proceed (e.g., end of a parallel loop).