A familiar problem

You've seen this before

On a normal road, an ambulance's siren makes everyone pull over. That is fair, because seconds matter. At a busy counter, a VIP or a staff member gets served first, and the queue waits a little longer.

Now imagine the VIPs never stop coming. Each time you are about to be served, someone more important arrives. Nobody refuses you. You are just never next.

Picture that at a city crossroads in wartime: ambulances, fire trucks, bomb-disposal squads and army trucks go first, and ordinary drivers wait at the side. What happens to the driver at the front of that line?

How to play

You are the traffic controller

Goal: keep emergency vehicles quick without leaving any ordinary driver waiting too long. One vehicle crosses per turn.

  1. Watch: emergency vehicles always go first.
  2. Challenge 1: tap who crosses each turn. Ordinary drivers can wait 9 turns at most, emergency vehicles 4.
  3. Challenge 2: pick a waiting bonus rule and let it run.

Run the crossroads

Every vehicle has a go-first score: emergency vehicles start at 5 and ordinary cars at 1, and the highest score crosses next. A waiting bonus adds points for every turn a vehicle has waited. Example: with a bonus of 1, a taxi that has waited 4 turns scores 1 + 4 = 5, the same as a brand-new ambulance.
🚨 Emergency vehicles πŸš— Ordinary drivers
⬆ Ordinary drivers leave this way
Ordinary drivers wait on the side road ➜
⬆ Emergency vehicles leave this way
No vehicle has crossed yet

Live status

Turn0 / 15
Emergency vehicles crossed0
Ordinary crossed0
Longest ordinary wait0
Longest emergency wait0
Reflect

Think back on what just happened

No right answers here. Just sit with these for a moment.

The reveal

You were fixing starvation

Your crossroads was a computer. Vehicles were tasks waiting for one shared resource, such as the processor, and the green light was a turn to use it. Emergency vehicles were high-priority tasks, and ordinary cars were low-priority ones.

When high-priority tasks keep arriving, a low-priority task can wait forever. That is starvation. In your shift, a few ordinary drivers slipped through between rounds, but one was left behind every time. In a real computer the high-priority work may never stop, and then the waiting task never runs. The fix is aging: the longer a task waits, the higher its priority grows, until its turn finally comes. In Challenge 1 you did this by hand, and in Challenge 2 the waiting bonus did it for you. Urgent work still goes first, but nothing waits forever.

Score = base priority + (bonus Γ— turns waited)Base priority is the starting score, and the bonus is your aging dial.

Longest waits in the same 15-turn shift

🚫
-Always serving the highest priority lets low-priority tasks wait with no limit.
⏳
-Aging gives every task a turn in the end, while urgent tasks still stay quick.
Checkpoint

Test what you learned

Think through each exercise and apply what you learned.

Home

Go back?

Going back will lose your progress on this page. Are you sure?