Skip to content

Concurrency & Parallelism

system-architectureconcurrencyparallelism

Concurrency and parallelism are ways to handle multiple tasks, but they are not the same.

How it works

Concurrency is about dealing with many tasks at once, but not necessarily running them at the same time. The system switches between tasks quickly so it feels like they are happening together. Parallelism is when tasks truly run at the same time, usually on different CPU cores, so work finishes faster.

Analogy

concurrency and parallelism Concurrency is like a single cook making many dishes. He chops vegetables, then stirs soup, then flips meat, switching back and forth so all dishes progress together. Parallelism is like having three cooks in the kitchen, each making one dish at the same time.

concurrency and parallelism