What to Learn Next & Final Checklist

Where to go after this course, and a checklist to confirm you have mastered every topic.

Glossary

Why it matters Multiple tasks making progress in overlapping time periods

Structures programs that juggle many activities One server handling many clients

Simultaneous execution on separate hardware Needed to speed up CPU-bound work Two cores computing different halves

Starting an operation and handling its completion later Overlaps waiting without blocking threads await fetch(url)

An operation that suspends the calling thread until it can proceed Blocked threads cannot do other work time.sleep, synchronous read non-blocking I/O

I/O that returns immediately with data or "not ready" Basis of scalable event loops Socket recv raising BlockingIOError

A running program with its own address space Isolation and crash containment A worker process in a pool

A flow of control inside a process sharing its memory Shared-memory parallelism; needs synchronization pthread_create, std::thread

A unit of work scheduled by a runtime (meaning varies by runtime) Cheaper than threads.NET Task, asyncio.Task Modules 2, 10, 15 A function that can suspend and resume

Cooperative concurrency with little memory async def, generators

Loop that dispatches ready callbacks and waits for events Runs async code; must never be blocked Node.js, asyncio, browsers Component deciding what runs next Determines interleavings and fairness OS scheduler, work-stealing pool

Saving one thread's state and restoring another's Costs microseconds plus cache effects Preemption on a timer tick

Outcome depends on timing of concurrent operations Causes rare, severe bugs

Unsynchronised conflicting accesses (language-defined) Undefined behavior in C/C++ Two threads doing counter++

Indivisibility with respect to other threads Read-modify-write must be atomic Code needing mutual exclusion Code under with lock: Lock allowing one owner at a time Basic mutual exclusion std::mutex, threading.Lock Counter with blocking acquire, no owner Limits concurrent access Wait until notified, releasing a mutex Efficient waiting for state changes

Object combining data, lock and conditions Java synchronized + wait Cyclic waiting where no one can proceed Threads active but making no progress A thread never gets a needed resource Unfairness, missed work Writer starved by readers

High priority effectively waits for lower priority Breaks real-time deadlines

Indivisible operation with defined concurrent semantics compare-and-swap (CAS)

Update only if the current value equals the expected one Building block of lock-free code

Ordering that makes one thread's writes visible to another Core of memory models

Rules defining which values reads may return Explains reordering bugs Java Memory Model

Memory orders that consume/publish prior writes ready.store(true, release)

All operations in one global order respecting program order Simplest model to reason about seq_cst atomics Independent data sharing a cache line Adjacent per-thread counters Some thread always makes progress No blocking on suspended threads Every thread completes in bounded steps Strongest progress guarantee Handle to a result available later Carries value or error

Write side that completes a future (JS: the whole object) Completes async results

Function called when an operation completes Simple async notification Node (err, data) =>

The rest of a computation after a result How awaits resume Syntax to suspend until a future settles Readable async code await asyncio.gather(...) Task lifetimes bound to lexical scopes No orphans; propagation

Object carrying a cooperative cancellation request Stops unwanted work CancellationToken, AbortSignal Absolute time by which work must finish Bounds latency end-to-end Modules 14, 20

Slowing or refusing producers when consumers lag Bounded queue blocking Queue with fixed capacity Makes overload explicit

Idle workers take tasks from others' deques Modules 15, 19 Reusable worker threads with a queue Bounds threads, amortises creation Reusable worker processes CPU parallelism with isolation

Entities with private state processing messages one at a time Concurrency without shared mutation Modules 18, 26

Typed conduit for sending values between tasks Producers and consumers decoupled by a buffer

Operations appear atomic within their duration Correctness of concurrent objects ConcurrentHashMap ops

Repeating an operation has the same effect as once PUT with the same body

Fails fast while a dependency is unhealthy Stops cascading failures Isolated resources per dependency

High-priority JS callback run after each task Explains promise ordering CPython's global interpreter lock

Limits CPU parallelism of Python threads Standard CPython builds Modules 16, 17 Send / Sync

Rust traits for moving/sharing across threads Compile-time race freedom Arc<Mutex<T>> is both

Go's lightweight runtime-scheduled thread Modules 12, 17 JVM thread multiplexed over carrier threads Cheap blocking-style code

Thread scheduled by a real-time OS by priority Deterministic embedded scheduling Interrupt service routine Reacts to hardware events Worst-case execution time Needed for deadline guarantees Modules 21, 26 Speedup limit from the serial fraction 5% serial → ≤ 20× Modules 16, 22 L = λW for stable systems

Relates concurrency, throughput, latency 200/s × 50 ms = 10 in flight High-percentile latency (p99, p999) Dominates user experience at scale Modules 20, 22 Load testers hiding stalls by waiting

Tool reporting unsynchronised conflicting accesses Finds data races go run -race, TSan

Stop intake, drain with a deadline, cancel, release Clean exits without lost work Modules 13, 15, 27

Resources and Further Reading

Maurice Herlihy, Nir Shavit, Victor Luchangco & Michael Spear, *The Art of Multiprocessor Programming*, 2nd ed.

Brian Goetz et al., *Java Concurrency in Practice*.

Anthony Williams, *C++ Concurrency in Action*, 2nd ed.

Mara Bos, *Rust Atomics and Locks*.

Katherine Cox-Buday, *Concurrency in Go*.

Stephen Cleary, *Concurrency in C# Cookbook*, 2nd ed.

Martin Kleppmann, *Designing Data-Intensive Applications*.

Paul McKenney, *Is Parallel Programming Hard, And, If So, What Can You Do About It?* (free).

Allen Downey, *The Little Book of Semaphores* (free).

Papers and talks Leslie Lamport, "Time, Clocks, and the Ordering of Events in a Distributed System" (1978).

Herlihy & Wing, "Linearizability" (1990); Boehm & Adve, "Foundations of the C++ Concurrency Memory Model" (2008).

Nathaniel J. Smith, "Notes on structured concurrency" (2018); Rob Pike, "Concurrency is not Parallelism" (2012).

Dean & Barroso, "The Tail at Scale" (2013); Gil Tene, "How NOT to Measure Latency".

Official documentation Python threading, asyncio, concurrent.futures, multiprocessing; Java java.util.concurrent and JEPs 444/453;.NET "Parallel programming" and "Asynchronous programming"; MDN event loop, Promises, Web Workers; Node.js "Event Loop", "Worker threads"; Go memory model and blog; The Rust Book ch. 16 and async book; Kotlin coroutines guide; Swift concurrency chapter; cppreference thread support library; POSIX pthreads(7).

Final Checklist

You have mastered this course when you can:

[ ] Explain concurrency, parallelism and asynchrony precisely, with examples of each without the others.

[ ] Describe processes, threads, tasks, coroutines, schedulers and event loops, and choose among them.

[ ] Write correct threaded, async and multiprocess programs with results, errors and shutdown handled.

[ ] Identify race conditions and data races, and fix them by atomicity, synchronization or removing sharing.

[ ] Use mutexes, semaphores, condition variables, read/write locks, barriers and atomics appropriately.

[ ] Prevent and diagnose deadlock, livelock, starvation and priority inversion.

[ ] Explain memory models, happens-before and safe publication, and the meaning of volatile per language.

[ ] Build producer-consumer systems with bounded queues, channels and backpressure.

[ ] Use futures, promises, async/await, event loops and coroutines correctly — without blocking loops.

[ ] Apply structured concurrency, cancellation, timeouts, deadlines, retries, circuit breakers and bulkheads.

[ ] Size thread and process pools and predict speedup and latency with Amdahl's and Little's laws.

[ ] Use the concurrency APIs of at least three languages idiomatically.

[ ] Design with actors, pipelines, single-flight, batching and rate limiting; use concurrent data structures safely.

[ ] Handle distributed concerns: idempotency, duplicates, fencing, optimistic concurrency and tail latency.

[ ] Apply concurrency correctly in GUIs, servers and embedded RTOS systems.

[ ] Debug with dumps, profilers, race detectors and tracing; test with fake clocks, stress and exhaustive exploration.

[ ] Review concurrent code for security and resource safety.

[ ] Complete a capstone assessed against the rubric.