Work-Stealing Scheduler: Parallel Task Load Balancing
Interactive 3D simulation of a work-stealing scheduler: N worker cores each drain a local task deque, and any core that runs dry steals a task from a random busy neighbour, keeping every core loaded without a central queue.
Parallel computing splits one big job into many independent tasks — but handing those tasks out efficiently is its own algorithmic problem. This simulation renders a bank of worker cores, each holding its own local task deque as a stack of glowing blocks. Every core pops and executes its own tasks at its own pace; the moment a core's stack runs dry it becomes a thief, picks another core at random, and steals a task straight off the bottom of that core's deque — visualised as an arcing steal event between columns. Tune the core count, the total task pool and the average task duration, flip stealing on or off to see cores starve instead, and watch throughput, steal count and load imbalance update live as the run drains to completion.
This simulation demonstrates the concept of parallel computing and its benefits for solving complex problems. It illustrates how dividing a task into smaller parts can be executed simultaneously to speed up computation.
2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install