ALCOMFT-TR-01-72

ALCOM-FT
 

Petra Berenbrink, Tom Friedetzky and Leslie Ann Goldberg
The Natural Work-Stealing Algorithm is Stable
Warwick. Work packages 1, 2 and 4. May 2001.
Abstract: In this paper we analyse a very simple dynamic work-stealing algorithm. In the work-generation model, there are n generators which are arbitrarily distributed among a set of n processors. The distribution of generators is arbitrary - generators may even move at the beginning of each time step. During each time-step, each generator may generate a unit-time task which it inserts into the queue of its host processor. It generates such a task independently with probability lambda. After the new tasks are generated, each processor removes one task from its queue and services it. Clearly, the work-generation model allows the load to grow more and more imbalanced, so, even when lambda<1, the system load can be unbounded. The natural work-stealing algorithm that we analyse is widely used in practical applications and works as follows. During each time step, each empty processor (with no work to do) sends a request to a randomly selected other processor. Any non-empty processor having received at least one such request in turn decides (again randomly) in favour of one of the requests. The number of tasks which are transferred from the non-empty processor to the empty one is determined by the so-called work-stealing function f. In particular, if a processor that accepts a request has \ell tasks stored in its queue, then f(\ell) tasks are transferred to the currently empty one. A popular work-stealing function is f(\ell)=\floor{ \ell/2}, which transfers (roughly) half of the tasks. We analyse the long-term behaviour of the system as a function of lambda and f. We show that the system is stable for any constant generation rate lambda<1 and for a wide class of functions f. Most intuitively sensible functions are included in this class (for example, every function f(\ell) which is omega(1) as a function of \ell is included). We give a quantitative description of the functions f which lead to stable systems. Furthermore, we give upper bounds on the average system load (as a function of f and n). Our proof techniques combine Lyapunov function arguments with domination arguments, which are needed to cope with dependency.
Postscript file: ALCOMFT-TR-01-72.ps.gz (79 kb).

System maintainer Gerth Stølting Brodal <gerth@cs.au.dk>