Open this lesson in your favourite AI. It'll walk you through the why, explain the demo, and quiz you on the try-it list.
Concurrency and parallelism describe fundamentally different things, and conflating them leads to architecture decisions that are impossible to reason about. Concurrency is a structural property: work arranged so multiple tasks can make progress in overlapping time windows. Parallelism is an execution property: two instructions literally running simultaneously on separate hardware. A single-core event loop is concurrent but not parallel; a GPU multiplying matrices runs thousands of threads in parallel. The distinction matters because the bugs they introduce and the fixes they require are completely different — a race condition is a concurrency problem, a serial bottleneck is a parallelism problem.
Concurrency is a structure: you arrange work so progress can overlap in time. Parallelism is an execution: two instructions literally run at the same wall-clock instant on two cores.
You can be concurrent without being parallel (one core, alternating tasks via an event loop). You cannot be parallel without being concurrent — parallelism is a special case where the scheduler chose to use more than one core.
GOMAXPROCS=1 on a quad-core machine, is it concurrent? Is it parallel? Verify by checking how many OS threads runtime.NumCPU() vs. runtime.GOMAXPROCS(0) report.Use these three in order. Each builds on the one before.
Give me the textbook definition of concurrency and parallelism. Define each in one sentence, then give one everyday non-code analogy for each.
Explain the mechanism that makes concurrency without parallelism possible on a single CPU core. Cover time-slicing, context switches, and why the user perceives simultaneity.
When does it matter whether my program is concurrent vs. parallel? Give me three real workloads (one where it doesn't matter, one where it does, one where getting it wrong causes a production bug) and what I'd look for.