Home | Projects | Notes > Multi-Threading (POSIX Threads) > Thread Synchronization - Condition Variables

Thread Synchronization - Condition Variables

 

Introduction to Condition Variables

 

Condition Variables vs. Mutex

 

condition-variables-wait-and-signal

 

 

Using Condition Variables - Wait & Signal

Wait

Signal

 

Producer & Consumer Problem

producer-and-consumer-problem

 

 

Spurious Wakeup

 

Generic Solution to the Producer & Consumer Problem

 

Thread Specific CV vs. Resource Specific CV

Thread Specific CV

Resource Specific CV

 

Signaling Multiple Condition Variables

 

References

Sagar, A. (2022). Part A - Multithreading & Thread Synchronization - Pthreads [Video file]. Retrieved from https://www.udemy.com/course/multithreading_parta/