categories.language Basic
Concurrency vs Parallelism: What Is the Difference?
Concurrency vs Parallelism
Definitions
Concurrency Multiple tasks appear to run simultaneously but may interleave (possible on single core)
- Focus: managing and switching between tasks
- Analogy: one chef handling multiple dishes by switching attention
Parallelism Multiple tasks truly run simultaneously (requires multiple cores)
- Focus: actual simultaneous computation
- Analogy: multiple chefs each making one dish
Relationship
- Parallelism is a subset of concurrency
- You can be concurrent without being parallel, but not parallel without being concurrent
- Concurrency is a design concern; parallelism is a hardware concern
Implementation by Language/Framework
| Language | Concurrency | True Parallelism |
|---|---|---|
| Node.js | Event Loop + async/await | Worker Threads |
| Python | asyncio / threading | multiprocessing |
| Go | Goroutines + Channels | Yes (GOMAXPROCS) |
| Java | Threads | Yes |
| Rust | async/await + tokio | Yes |
Interview bonus: Rob Pike (Go designer): "Concurrency is about dealing with lots of things at once. Parallelism is about doing lots of things at once."
✦ AI Mock Interview
Type your answer and get instant AI feedback
Sign in to use AI scoring
