1The Orders
2The Shift
3The Rush
4Order Notes
5The Method
6New Cases
Chapter 1 · The Orders

πŸ• Doing More With Less

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 πŸ‘‡

Chapter 2 · Campus Bites

The Fest-Day Rush

Chapter 3 · Scenario 2 · Three Cooks

Reinforcements Arrive

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.

πŸŽ‰

Order's up, all three are ready!

0
Score
0
Steps Done
Chapter 4 · Order Notes

What did you notice?

Sit with these for a moment, there's no single correct wording, just think them through in your own words.

1 · Choosing What's NextWhen a step needed baking, grilling, or blending, what did you do instead of waiting for it to finish?
2 · Handling the WaitWhat told you it was a good moment to switch to a different order?
3 · Juggling Three OrdersHow did you decide which order to work on when more than one was ready for Ravi's attention?
4 · Keeping TrackHow did you keep track of which step each order was on? What would you do if there were ten orders instead of three?
5 · Explaining Your StrategyImagine another cook has to take over your shift. What instructions would you give them about how to juggle the three orders?
Chapter 5 · The Method

How the two shifts really worked

You ran the same three orders two different ways. Here's what each strategy is called, and what makes them different.

🍳

You Discovered: Concurrency & Parallelism!

Scenario 1 · One Cook

Concurrency

πŸ‘¨β€πŸ³Ravi
πŸ•
Pizza
πŸ”
Burger
πŸ§ƒ
Juice

Press Replay to watch Ravi's shift one more time.

That's exactly the habit you built by hand during the first rush:

  • Ravi starts a step, and if it needs the oven, grill, or blender, he moves to a different order instead of standing there.
  • He keeps circling back, checking what's ready and starting the next step.
  • Every order keeps inching forward, even though Ravi is only touching one thing at any instant.
  • The trick is using the waiting time on one task to make progress on another.

That behavior has a name: Concurrency. It means handling multiple tasks during the same period, without necessarily doing them at the exact same instant.

Scenario 2 · Three Cooks

Parallelism

πŸ‘¨β€πŸ³Ravi
πŸ‘©β€πŸ³Maya
πŸ§‘β€πŸ³Arjun
πŸ•
Pizza
πŸ”
Burger
πŸ§ƒ
Juice

Press Replay to watch the three cooks work together.

In the second rush, the strategy changed completely:

  • Ravi, Maya, and Arjun each took one order and stayed with it from start to finish.
  • All three were working at the same instant. Nobody had to switch dishes or wait for a turn.
  • The shift finished far sooner, because the work was split across three pairs of hands.

That is Parallelism. It means multiple tasks genuinely running at the same time, because there are multiple workers to run them.

βš–οΈ Concurrency vs Parallelism

🍳 Concurrency (Scenario 1)

  • One worker: Ravi.
  • Tasks take turns, switching whenever one is waiting.
  • Only one thing is being touched at any instant.
  • About managing many tasks at once.

⚑ Parallelism (Scenario 2)

  • Several workers: Ravi, Maya, and Arjun.
  • Each task has its own worker.
  • Many things are truly happening at the same instant.
  • About doing many tasks at once.

The two aren't rivals. A kitchen could have three cooks and let each one juggle several dishes, using both ideas together.

πŸ”‘ Key Learnings

🍳
Concurrency

One worker switches between tasks, using the waiting time on one to make progress on another.

⚑
Parallelism

Multiple workers act at the same time, each one truly executing their own task simultaneously.

βœ…
Why It Works

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.

🌍
Where You'll See It

Operating systems, web servers, multi-core processors, and everyday multitasking all lean on these same two ideas.

Chapter 6 · New Cases

Put the idea to the test

New situations to think through using what you just discovered.

1 · Decision-makingCampus Bites receives six orders at once. The owner can assign one cook to handle tasks in turns or assign three cooks to prepare different orders simultaneously. What factors would you consider before choosing either arrangement? Could the three-cook arrangement still fail to finish orders faster?
2 · Recognize the PatternA single support agent handles chats with three different customers, replying to each one while the others are typing. Is this closer to concurrency or parallelism? Explain your reasoning.
3 · Spot the MisconceptionSomeone says, "Concurrency just means using one CPU, and parallelism just means using more than one." What is wrong with this reasoning?
4 · Resource constraintsThree cooks are available, but the kitchen has only one oven. Which activities can the cooks perform concurrently while one order is baking? What would happen if all three orders needed the oven at the same time? Explain why adding more cooks might not reduce the total preparation time proportionally.
5 · Unfamiliar ApplicationA laptop with a single processor core appears to run a browser, a music player, and a chat app all "at once." How might concurrency explain what's really happening?
6 · Optimize the WorkflowCampus Bites receives several orders at once. Chopping vegetables, preparing sauces, and baking food take different amounts of time. How would you organize these activities to finish all the orders as quickly as possible? Would adding more cooks always help? Explain your approach.
7 · Choose the Better StrategyA food delivery app must process hundreds of orders. Some tasks involve waiting for payment confirmation, while others involve calculating bills. Would you handle all these tasks concurrently, execute some of them in parallel, or use a combination of both? How would you decide which approach offers the best performance?
8 · Timeline analysis
πŸ• πŸ” πŸ§ƒ
Suppose the three cooks can prepare three orders independently, but all orders must use the same oven. Draw a timeline showing when each cook is actively working and when each order is waiting or baking. Compare it with the original timeline shown here. Which tasks can overlap, and which resource limits the improvement in total completion time?
Ravi actively working Cooking on its own
Back CSE Concept Laboratory

⏸ Paused

Take a breath. The orders aren't going anywhere.

πŸ† Achievement unlocked