Synchronization
#
Scope
#
- The Critical Section problem
- Three correctness conditions: Mutual Exclusion, Progress, Bounded Waiting
- Peterson’s Algorithm
- Memory view inconsistency (Cache, Store Buffers)
- Hardware instruction reordering
- Hardware memory models
- Impact of the compilation process
- C11+ memory model
- Memory barriers
- Hardware synchronization support: Read-Modify-Write operations
- Atomic Swap (XCHG)
- Test-and-Set (TAS)
- Compare-and-Swap (CAS / cmpxchg)
- Spinlocks and the busy-waiting problem
- Dijkstra’s system semaphores
- Linux Futex (Fast Userspace Mutex)
Reference
#
- Lecture Slides
- Code samples
- Textbook: chapters: Process Synchronization, Deadlocks.
- Old slides: Sync_2.pdf