This session starts with a quick recap of POSIX threads and then gives an overview of synchronization. The concept of race condition and critical section problems are discussed. Then the concept of direct and indirect data sharing among threads, threads safety and reentrant functions are described. Introduction to mutex, locking, unlocking and destroying a mutex object. Mutex attributes and mutex types. Introduction to condition variable. The concept of thread cancellation is introduced. Finally problems like producer consumer problem and barber shop problem are discussed.

Email: Example Codes:

One thought on “Lec31 Synchronization among Threads (Arif Butt @ PUCIT)

Leave a Reply

Your email address will not be published. Required fields are marked *