Home Knowledge Base Work Stealing

Work Stealing is the dynamic load-balancing scheduling strategy where idle processor threads "steal" tasks from the queues of busy threads — enabling near-optimal parallel utilization for irregular workloads without static partitioning, achieving provably efficient O(T₁/P + T∞) expected time where T₁ is serial work, P is processor count, and T∞ is the critical path length.

How Work Stealing Works

1. Each thread maintains a double-ended queue (deque) of tasks. 2. When a thread spawns new tasks → pushed onto the bottom of its own deque. 3. When a thread finishes a task → pops next task from the bottom of its own deque (LIFO — locality). 4. When a thread's deque is empty → it becomes a thief and steals from the top of a random victim's deque (FIFO — steals largest tasks).

Why LIFO for Self, FIFO for Stealing?

Implementations

SystemLanguageWork Stealing Variant
Cilk/Cilk PlusC/C++Classic randomized work stealing
Intel TBBC++Task arena with work stealing
Java ForkJoinPoolJavaRecursiveTask + deque stealing
Tokio (Rust)RustMulti-threaded async work stealing
Go runtimeGoGoroutine scheduler steals from local queues
.NET ThreadPoolC#Work stealing queue since .NET 4

Theoretical Guarantees

Practical Considerations

Work stealing is the dominant scheduling strategy for task-parallel runtimes — its combination of theoretical efficiency, practical simplicity, and automatic load balancing has made it the default scheduler in nearly every modern parallel computing framework.

work stealingtask scheduling stealcilk work stealdeque schedulingdynamic load balance

Explore 500+ Semiconductor & AI Topics

From EUV lithography to CUDA optimization — search the full knowledge base or chat with our AI assistant.