Welcome to the Multithreading and Thread Synchronization in UNIX repository! This project covers various concepts and implementations related to multithreading and thread synchronization using Pthreads in UNIX.
Multithreading involves running multiple threads concurrently within a process to achieve parallelism and improve performance. Thread synchronization is crucial to avoid race conditions and ensure the correctness of data when multiple threads access shared resources.
This project is based on the following resources:
- Udemy Courses:
- "Part A - Multithreading & Thread Synchronization - Pthreads"
- "Part B (ADVANCE) Multithreading Design Patterns (pthreads)"
- Codevault YouTube Channel
- Jacob Sorber YouTube Channel
- Neso Academy YouTube Channel
- Udacity YouTube Channel
-
Intro to Multithreading
- Introduction to multithreading concepts
- Creating and managing threads
-
Joinable and Detached Threads
- Managing thread lifecycles: joinable and detached threads
-
Notification Chains
- Implementing notification chains for thread communication
-
Asynchronous Thread Cancellation
- Mechanisms for asynchronous thread cancellation
-
Deferred Thread Cancellation
- Methods for deferred thread cancellation
-
Thread Synchronization via Mutexes
- Basic synchronization techniques using mutexes
-
Condition Variables
- Using condition variables for thread synchronization
-
Thread Barriers
- Implementing barriers to synchronize threads
-
Spinlocks
- Using spin locks for busy-wait synchronization
-
Semaphores
- Implementing semaphores for controlling access to resources
-
Recursive Mutexes and Locks
- Understanding and using recursive mutexes
-
Read-Write Locks
- Using read-write locks for efficient data access
This project draws from the following books:
- "The Linux Programming Interface" by Michael Kerrisk
- "Linux Kernel Development" by Robert Love
- "Multithreaded Programming Guide" by Oracle
Special thanks to the creators of the Udemy courses and the authors of the referenced books for providing valuable insights and knowledge.
Feel free to explore the code, contribute, and enhance your understanding of multithreading and thread synchronization in UNIX!