Skip to main content
grasp.study
About
Explore
Pricing
Log in
Try it for free
Back to course
👋
Welcome to a Grasp lesson
Create a free account
to keep studying and create your own study path.
C programming with threads
·
Module 3
Advanced Synchronization Primitives
1
Read-Write Locks for Read-Heavy Workloads
Initialize, use, and destroy read-write locks (pthread_rwlock) for read-heavy workloads.
2
Implementing Read-Write Locks for Enhanced Concurrency
Apply a read-write lock to a data structure to improve concurrency over a standard mutex.
3
Resource Counting with Unnamed Semaphores
Initialize and use unnamed semaphores (sem_t) for resource counting.
4
Semaphore-Protected Resource Pool
Implement a simple resource pool protected by a semaphore.
5
Coordinating Multi-Stage Computations with `pthread_barrier`
Synchronize the start of a multi-stage computation using a pthread_barrier.
6
Spinlock Critical Sections
Implement a critical section using a pthread_spinlock and describe its use case.
7
Choosing the Right Synchronization Primitive
Identify the appropriate synchronization primitive (mutex, rwlock, semaphore, barrier) for a given concurrency problem.
Previous module
Condition Variables and a Bounded Buffer
Next module
Deadlock: Analysis and Prevention