Account
← Courses
⧉
C2 · C++ Foundations

C++ Concurrency, Atomics & Lock-Free Systems

Reason about thread safety, the memory model and concurrent progress.

9 modules64 lesson outlines3 C++ practice topics per lesson
₹799Planned introductory price · Not on sale yet
Start lesson 01 →
01Threads, Lifetimes & Concurrency Foundations6 lessons
  1. 01Concurrency vs Parallelism: Latency, Throughput & ProgressOutline
  2. 02std::thread Lifecycle: Join, Detach and RAII2 runnable
  3. 03Passing Arguments Safely into Threads1 runnable
  4. 04Transferring Thread Ownership1 runnable
  5. 05Hardware Concurrency, Thread IDs and Topology2 runnable
  6. 06thread_local Storage and Initialization1 runnable
02Shared Data, Mutexes & Deadlock Avoidance6 lessons
  1. 07Race Conditions vs C++ Data RacesOutline
  2. 08Mutexes, std::lock_guard and std::unique_lockOutline
  3. 09Deadlock Causes, Lock Ordering and AvoidanceOutline
  4. 10Protecting Shared State and Escaping References1 runnable
  5. 11std::shared_mutex and Reader–Writer Locking1 runnable
  6. 12Recursive Mutexes and Alternative Synchronization1 runnable
03Condition Variables, Futures & Coordination6 lessons
  1. 13Condition Variables, Predicates and Spurious Wakeups1 runnable
  2. 14Implementing a Blocking Producer–Consumer QueueOutline
  3. 15std::promise, std::future and std::packaged_task1 runnable
  4. 16std::async: Launch Policies and Deferred ExecutionOutline
  5. 17Waiting with Deadlines, Timeouts and CancellationOutline
  6. 18Callbacks, Handoff and Continuation PatternsOutline
04Memory Ordering, Atomics & Progress Guarantees12 lessons
  1. 19Happens-Before, Modification Order and Data-Race Freedom1 runnable
  2. 20std::atomic Types, Operations and Initialization1 runnable
  3. 21Relaxed, Acquire, Release and Sequential Consistency1 runnable
  4. 22Release Sequences, Fences and Synchronizes-With1 runnable
  5. 23Compare-and-Exchange: Weak, Strong and Failure OrderingOutline
  6. 24Atomic Costs, Coherence Traffic and Lock-FreedomOutline
  7. 25Formal Memory Ordering: Acquire/Release/Acq_Rel/Seq_CstOutline
  8. 26Publication, Transitive Happens-Before and FencesOutline
  9. 27CAS Retry Loops and Failure OrderingOutline
  10. 28Obstruction-Free, Lock-Free and Wait-Free ProgressOutline
  11. 29Linearizability, Linearization Points and HistoriesOutline
  12. 30False Sharing, Cache-Line Padding and BackoffOutline
05Thread-Safe Containers & Lock Granularity4 lessons
  1. 31Exception-Safe Thread-Safe StackOutline
  2. 32Fine-Grained Concurrent QueueOutline
  3. 33Concurrent Hash Maps and Striped LockingOutline
  4. 34Lock Granularity in Concurrent Linked StructuresOutline
06Task Scheduling, Cancellation & Parallel Performance6 lessons
  1. 35Task Decomposition and Dependency Graphs1 runnable
  2. 36False Sharing, Cache Contention and ScalabilityOutline
  3. 37Thread Pools and Work-Stealing Schedulers1 runnable
  4. 38Cooperative Cancellation and std::stop_tokenOutline
  5. 39Parallel Algorithms and Execution PoliciesOutline
  6. 40std::jthread, Latches, Barriers and SemaphoresOutline
07Lock-Free Stacks, Ring Buffers & Queues8 lessons
  1. 41SPSC Fixed-Capacity Ring Buffer: Invariants and Implementation1 runnable
  2. 42SPSC Queue Padding and Benchmark DesignOutline
  3. 43MPSC Bounded Queue: Contention and PublicationOutline
  4. 44MPMC Bounded Queue with Sequence CountersOutline
  5. 45Lock-Free Stack with Pointer Compare-and-SwapOutline
  6. 46Memory-Ordering Bugs in Concurrent QueuesOutline
  7. 47Blocking vs Spin-Wait vs Adaptive WaitingOutline
  8. 48Batching, Backpressure and Bounded Queues1 runnable
08ABA, Reclamation & Advanced Lock-Free Design11 lessons
  1. 49The ABA Problem and Tagged PointersOutline
  2. 50Hazard Pointers: Memory Reclamation and SafetyOutline
  3. 51Epoch-Based Reclamation and Quiescent StatesOutline
  4. 52Read-Copy-Update and Read-Mostly DataOutline
  5. 53Seqlocks, Versioned Reads and Consistent Snapshots1 runnable
  6. 54Double Buffering and Snapshot PublicationOutline
  7. 55Michael–Scott Queue: Algorithm and Proof ObligationsOutline
  8. 56Lock-Free Hash Tables and ResizingOutline
  9. 57Litmus Tests and Concurrent Model CheckingOutline
  10. 58ThreadSanitizer Limitations for Atomic Correctness1 runnable
  11. 59Production Lock-Free Code ReviewOutline
09Testing, Debugging & Proving Concurrent Correctness5 lessons
  1. 60ThreadSanitizer and Data-Race DetectionOutline
  2. 61Deadlock Diagnostics and Lock InstrumentationOutline
  3. 62Deterministic Schedule Testing and Model-Based FuzzingOutline
  4. 63Parallel Benchmarking and Scalability LawsOutline
  5. 64Concurrency Design Interview and Correctness DefenseOutline

Course material is being developed; lesson outlines do not indicate published video availability.