Synchronization Patterns
#
Scope
#
- POSIX Semaphores
- Basic API revisited
- Placing in shared memory
- Awaiting others
- Named semaphore implementation (small shm)
- Bounded buffer problem
- Readers-Writers problem
- Solution favorizing readers
- Solution prioritizing writers
- PThread Mutex
- Basic API revisited
- Placing in shared memory
- Error checking mutexes
- Recursive mutexes
- Robust mutexes
- PThread CV
- Basic API revisited
- Placing in shared memory
- Awaiting others
- Bounded buffer problem solution using CV
- Monitors
- PThread reader-writer lock
Reference
#
- Lecture Slides
- Code samples
- Slides: IPC_2en.pdf
- Section 27.1 of the GNU C library
documentation: Semaphores
- Supplementary reading: W.R. Stevens, Unix Network Progamming, Vol. 2, 2nd Ed.
Chapters: 7 (Mutexes and Condition Variables), 8 (Read-Write Locks), 10 (Posix semaphores), 11 (System V Semaphores).