Concurrency vs Parallelism: Core Distinction
The Chef Analogy
One chef managing three dishes by switching between them is concurrency. Three chefs each cooking one dish simultaneously is parallelism. The single chef handles multiple tasks but only does one thing at any instant. The three chefs actually work at the same instant.
A single core CPU achieves concurrency through time slicing: it switches between tasks so fast that they appear simultaneous. But only one instruction executes at any moment. True parallelism requires multiple cores executing different instructions at the same clock cycle.
Why The Distinction Matters
Concurrency improves responsiveness without requiring more hardware. A web server handling 10,000 connections on one core uses concurrency. It switches between connections while waiting for I/O. Adding cores enables parallelism, where multiple requests process simultaneously.
The distinction affects system design decisions. CPU bound work benefits from parallelism because there is actual computation to distribute. I/O bound work benefits from concurrency because most time is spent waiting, not computing. A task waiting for a database response gains nothing from more cores. It gains everything from efficient task switching.
Measuring The Difference
Concurrency metrics focus on how many tasks are in progress: connections open, requests in flight, goroutines active. Parallelism metrics focus on utilization: CPU cores busy, threads actively executing, instructions per cycle.
A system with 10,000 concurrent connections but 1% CPU utilization is highly concurrent but not parallel. A system with 4 threads at 100% CPU on 4 cores is highly parallel but with low concurrency. Production systems need both: enough concurrency to handle many users, enough parallelism to process requests quickly.