This course delves into the core concepts of C++ concurrency. It covers synchronization mechanisms, including atomic operations and mutexes. Students will learn about the C++ Memory Model, inter-thread communication using condition variables, lock-free programming with atomic variables, and how to avoid common concurrency issues like deadlocks and race conditions.
Overview
Syllabus
- Unit 1: Synchronization Primitives with std::atomic
- Flexible Atomic Increments
- Debugging Atomic Counter in C++
- Complete the Atomic Counter Code
- Building a Synchronized Award Counter
- Master Atomic Operations in Threads
- Unit 2: Exploring Inter-thread Communication with Condition Variables
- Synchronize with Multiple Conditions
- Switch to Notify One Method
- Fix Thread Synchronization Issues
- Synchronizing Threads with Signals
- Synchronize Threads with Condition Variables
- Synchronization with Condition Variables
- Unit 3: Exploring Deadlocks and Avoiding Them
- Prevent Deadlocks by Changing Lock Order
- Fixing Mutex Lock Order Issues
- Prevent Deadlocks Using Consistent Locks
- Preventing Deadlocks with Consistent Locking
- Preventing Deadlocks from Scratch
- Unit 4: Understanding Compare-and-Swap (CAS) Operations
- Enhance the Lock-Free Counter
- Debugging CAS in Multithreaded Environment
- Conquer Atomic Operations with CAS
- Boosting Superpower Level with CAS
- Build a Lock-Free Complex Counter