Course contentsShow
← Computer Science
Lesson 2546 of 2,87257. Concurrency FundamentalsFree lesson

The Key Distinction: Dealing vs Doing

Master the core difference: concurrency is about structure (dealing with multiple things), parallelism is about execution (doing multiple things).

The Key Distinction: Dealing vs Doing

What you'll learn: You'll master the fundamental difference between concurrency (structure) and parallelism (execution) — a distinction that clarifies how systems handle multiple tasks.

The Core Idea

Concurrency and parallelism sound similar but represent different aspects of multi-tasking systems:

  • Concurrency is about dealing with multiple things — it's a structural property. Your program is designed to manage multiple tasks that overlap in time, even if only one executes at any given moment.

  • Parallelism is about doing multiple things — it's an execution property. Multiple tasks literally run at the same instant, typically requiring multiple processor cores.

Think of concurrency as the architecture, parallelism as the performance boost.

The Coffee Shop Analogy

Imagine a single barista (one CPU core) taking orders from multiple customers:

  • Concurrency: The barista switches between customers — takes order A, starts brewing, switches to take order B while A brews, returns to finish A. The barista deals with multiple orders by interleaving work. Only one action happens at a time, but multiple orders are "in progress."

  • Parallelism: Two baristas work simultaneously. They literally do two things at once — one brews coffee while the other takes an order.

Why It Matters

A concurrent program can run on a single core (dealing with multiple tasks through context switching). A parallel program requires multiple cores (doing multiple tasks simultaneously). You can have concurrency without parallelism, but parallelism typically requires concurrent program structure.

Key Takeaway: Concurrency is about the structure of dealing with multiple tasks; parallelism is about the execution of doing multiple tasks simultaneously. One is design, the other is implementation.