Imagine you have several jobs to get done, but only a limited number of hands to do them. Some parts of a job take active effort, and other parts just need time to run on their own, like something baking, a file downloading, or water boiling.
If you sit and wait for each job to fully finish before starting the next one, you waste all the moments where nothing needed your attention. But if you juggle your attention across jobs, or bring in more hands to work alongside you, you can get more done.
Let's play a shift at a busy food truck and see exactly how that plays out. You'll be in charge of the kitchen.
Let's see what this looks like through a story π
The queue outside hasn't shrunk, so the owner calls in two more cooks: Maya and Arjun.
The same three orders are waiting: Pizza, Burger, and Juice.
This time there are three cooks. Ravi takes the pizza, Maya takes the burger, and Arjun takes the juice.
π‘ Click Auto to sit back and watch the shift run itself. Use Pause whenever you want to take a break.
Sit with these for a moment, there's no single correct wording, just think them through in your own words.
You ran the same three orders two different ways. Here's what each strategy is called, and what makes them different.
Press Replay to watch Ravi's shift one more time.
That's exactly the habit you built by hand during the first rush:
That behavior has a name: Concurrency. It means handling multiple tasks during the same period, without necessarily doing them at the exact same instant.
Press Replay to watch the three cooks work together.
In the second rush, the strategy changed completely:
That is Parallelism. It means multiple tasks genuinely running at the same time, because there are multiple workers to run them.
The two aren't rivals. A kitchen could have three cooks and let each one juggle several dishes, using both ideas together.
One worker switches between tasks, using the waiting time on one to make progress on another.
Multiple workers act at the same time, each one truly executing their own task simultaneously.
Waiting time, like something baking, doesn't have to be wasted time. Concurrency makes use of it with a single worker, and parallelism goes further by adding more workers.
Operating systems, web servers, multi-core processors, and everyday multitasking all lean on these same two ideas.
New situations to think through using what you just discovered.