work

**Work Stealing Load Balancing** is **a dynamic load balancing strategy where idle processors take (steal) work from busy processors' queues, automatically redistributing computation without centralized scheduling** — enables efficient utilization on heterogeneous systems and irregular workloads. Work stealing eliminates static load prediction requirements. **Work Stealing Mechanism** maintains per-processor deques (double-ended queues) of ready tasks. Worker processes tasks from its deque. When deque empty, processor becomes thief, selects victim processor and steals half of victim's deque. Stealing from end opposite worker's processing minimizes contention. **Cilk Model and Semantics** defines processor semantics: P processors executing P-adic (branching factor P) task DAG takes O(T1/P + T∞) time, where T1=sequential time, T∞=critical path length. Work stealing ensures this bound: with high probability, O(T1/P) parallel time plus O(T∞ log P) overhead. **Cache Affinity** maintains tasks on processors where they previously ran, exploiting cache warming. Stealing from remote processor requires cache miss but distributes computation. Trade-off: cache affinity versus load balancing—excessive migrations reduce cache effectiveness. **Randomized Stealing** selects victim randomly, avoiding contention on popular processors. Probability of stealing from overloaded processor scales with load difference, achieving equilibrium. **Hierarchical Stealing** on NUMA systems: local stealing within socket before socket-level stealing, reducing remote memory access. **Distributed Work Stealing** for clusters sends steal requests to peers, steals larger chunks to amortize communication. Peer selection uses locality hints or gossip protocols. **Adaptive Parameters** tune steal chunk size (small for fine-grained tasks, large for coarse) and retry policies (immediate retry vs. exponential backoff). **Analysis and Guarantees** prove O(P) total steals in work-stealing execution of O(T1) work graph, enabling O(log P) overhead prediction. **Implementation** in OpenMP (guided schedules approximate work stealing), Cilk, Java parallel streams, and Intel TBB demonstrates practical effectiveness. **Work stealing's simplicity and strong theoretical guarantees make it preferred for shared-memory parallel scheduling** enabling efficient execution of dynamically-sized workloads.

Go deeper with CFSGPT

Get AI-powered deep-dives, save terms, and run advanced simulations — free account.

Create Free Account