The natural work-stealing algorithm is stable

被引:32
作者
Berenbrink, P [1 ]
Friedetzky, T
Goldberg, LA
机构
[1] Simon Fraser Univ, Sch Comp Sci, Burnaby, BC V5A 1S6, Canada
[2] Univ Warwick, Dept Comp Sci, Coventry CV4 7AL, W Midlands, England
关键词
work-stealing; dynamic; stability;
D O I
10.1137/S0097539701399551
中图分类号
TP301 [理论、方法];
学科分类号
081202 ;
摘要
In this paper we analyze a very simple dynamic work-stealing algorithm. In the work-generation model, there are n (work) generators. A generator-allocation function is simply a function from the n generators to the n processors. We consider a fixed, but arbitrary, distribution D over generator-allocation functions. During each time step of our process, a generator-allocation function h is chosen from D, and the generators are allocated to the processors according to h. Each generator may then generate a unit-time task, which it inserts into the queue of its host processor. It generates such a task independently with probability.. After the new tasks are generated, each processor removes one task from its queue and services it. For many choices of D, the work-generation model allows the load to become arbitrarily imbalanced, even when. lambda < 1. For example, D could be the point distribution containing a single function h which allocates all of the generators to just one processor. For this choice of D, the chosen processor receives around lambda n units of work at each step and services one. The natural work-stealing algorithm that we analyze 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 nonempty processor having received at least one such request in turn decides ( again randomly) in favor of one of the requests. The number of tasks which are transferred from the nonempty 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 l tasks stored in its queue, then f(l) tasks are transferred to the currently empty one. A popular work-stealing function is f(l) = [l/2], which transfers (roughly) half of the tasks. We analyze the long-term behavior of the system as a function of. and f. We show that the system is stable for any constant generation rate. < 1 and for a wide class of functions f. Most intuitively sensible functions are included in this class ( for example, every monotonically nondecreasing function f which satisfies 0 less than or equal to f(l) less than or equal to l/2 and f(l) = omega(1) as a function of l is included). 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.
引用
收藏
页码:1260 / 1279
页数:20
相关论文
共 35 条
[1]  
ADLER M, 1998, LCT NOTES COMPUT SCI, P417
[2]  
ADLER M, 1995, P 27 S THEOR COMP ST, P234
[3]   An improved stability bound for binary exponential backoff [J].
Al-Ammal, H ;
Goldberg, LA ;
MacKenzie, P .
THEORY OF COMPUTING SYSTEMS, 2001, 34 (03) :229-244
[4]  
[Anonymous], 1992, Stochastic Stability of Markov chains
[5]  
[Anonymous], 1996, THESIS U CALIFORNIA
[6]  
[Anonymous], 1993, P 5 ANN ACM S PAR AL, DOI DOI 10.1145/165231.165252
[7]   Balanced allocations [J].
Azar, Y ;
Broder, AZ ;
Karlin, AR ;
Upfal, E .
SIAM JOURNAL ON COMPUTING, 1999, 29 (01) :180-200
[8]  
Berenbrink P., 2000, Proceedings of the Thirty Second Annual ACM Symposium on Theory of Computing, P745, DOI 10.1145/335305.335411
[9]  
BERENBRINK P, 1999, P 11 S PAR ALG ARCH, P175
[10]  
BERENBRINK P, 1998, P 10 ANN ACM S PAR A, P192