an overview of some results for reordering buffers

7
Comput Sci Res Dev (2012) 27:217–223 DOI 10.1007/s00450-011-0180-2 SPECIAL ISSUE PAPER An overview of some results for reordering buffers Matthias Englert Published online: 23 June 2011 © Springer-Verlag 2011 Abstract Lookahead is a classic concept in the theory of online scheduling. An online algorithm without lookahead has to process tasks as soon as they arrive and without any knowledge about future tasks. With lookahead, this strict as- sumption is relaxed. There are different variations on the exact type of information provided to the algorithm under lookahead but arguably the most common one is to assume that, at every point in time, the algorithm has knowledge of the attributes of the next k tasks to arrive. This assumption is justified by the fact that, in practice, tasks may not always strictly arrive one-by-one and therefore, a certain number of tasks are always waiting in a queue to be processed. In recent years, so-called reordering buffers have been studied as a sensible generalization of lookahead. The basic idea is that, in problem settings where the order in which the tasks are processed is not important, we can permit a scheduling algorithm to choose to process any task waiting in the queue. This stands in contrast to lookahead, where the algorithm has knowledge of all the tasks in the queue but still has to process them in the order they arrived. We dis- cuss some of the results for reordering buffers for different scheduling problems. Keywords Online algorithms · Reordering buffers · Competitive analysis · Survey M. Englert supported by EPSRC grant EP/F043333/1 and DIMAP (the Centre for Discrete Mathematics and its Applications). M. Englert ( ) DIMAP and Department of Computer Science, University of Warwick, Coventry, UK e-mail: [email protected] 1 Introduction Online algorithms suffer from a lack of knowledge about the future. Exploiting lookahead is a common technique to reduce this effect. Models incorporating lookahead provide the online algorithm with limited information about the fu- ture. In typical scheduling problems, where the input con- sists of a sequence of tasks, jobs, or requests for service, this is usually done by providing not only the information about the job that has to be processed next, but about the next k jobs, for some fixed k . One motivation behind this is that, in practice, tasks may be generated by several concurrently running processes and may arrive in bursts. Unprocessed tasks are stored in a buffer and have to wait in line until they are processed. The char- acteristics of the tasks waiting, that is, the contents of the buffer is now available to the algorithm and can be used to influence scheduling decisions. In this scenario, the next k jobs are known but they are still served in a first-in-first-out (FIFO) fashion. In many ap- plications however, all or at least part of the tasks waiting may be independent from each other and can be processed in any order. This freedom can potentially be used to improve the scheduling even further. In this case, the FIFO restriction on the buffer is relaxed and the buffer is used to reorder the incoming stream of tasks before they are processed further. We will discuss several results dealing with this extension of lookahead and its effect on the results of a competitive analysis. 1.1 The algorithmic framework The reordering buffer model to process a sequence of re- quests works as follows: Initially, the first k requests of the input sequence are stored in the buffer. Then, until all re- quests are processed, the following steps are repeated:

Upload: matthias-englert

Post on 26-Aug-2016

215 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: An overview of some results for reordering buffers

Comput Sci Res Dev (2012) 27:217–223DOI 10.1007/s00450-011-0180-2

S P E C I A L I S S U E PA P E R

An overview of some results for reordering buffers

Matthias Englert

Published online: 23 June 2011© Springer-Verlag 2011

Abstract Lookahead is a classic concept in the theory ofonline scheduling. An online algorithm without lookaheadhas to process tasks as soon as they arrive and without anyknowledge about future tasks. With lookahead, this strict as-sumption is relaxed. There are different variations on theexact type of information provided to the algorithm underlookahead but arguably the most common one is to assumethat, at every point in time, the algorithm has knowledge ofthe attributes of the next k tasks to arrive. This assumptionis justified by the fact that, in practice, tasks may not alwaysstrictly arrive one-by-one and therefore, a certain number oftasks are always waiting in a queue to be processed.

In recent years, so-called reordering buffers have beenstudied as a sensible generalization of lookahead. The basicidea is that, in problem settings where the order in whichthe tasks are processed is not important, we can permit ascheduling algorithm to choose to process any task waitingin the queue. This stands in contrast to lookahead, where thealgorithm has knowledge of all the tasks in the queue butstill has to process them in the order they arrived. We dis-cuss some of the results for reordering buffers for differentscheduling problems.

Keywords Online algorithms · Reordering buffers ·Competitive analysis · Survey

M. Englert supported by EPSRC grant EP/F043333/1 and DIMAP(the Centre for Discrete Mathematics and its Applications).

M. Englert (�)DIMAP and Department of Computer Science, Universityof Warwick, Coventry, UKe-mail: [email protected]

1 Introduction

Online algorithms suffer from a lack of knowledge aboutthe future. Exploiting lookahead is a common technique toreduce this effect. Models incorporating lookahead providethe online algorithm with limited information about the fu-ture. In typical scheduling problems, where the input con-sists of a sequence of tasks, jobs, or requests for service, thisis usually done by providing not only the information aboutthe job that has to be processed next, but about the next k

jobs, for some fixed k.One motivation behind this is that, in practice, tasks may

be generated by several concurrently running processes andmay arrive in bursts. Unprocessed tasks are stored in a bufferand have to wait in line until they are processed. The char-acteristics of the tasks waiting, that is, the contents of thebuffer is now available to the algorithm and can be used toinfluence scheduling decisions.

In this scenario, the next k jobs are known but they arestill served in a first-in-first-out (FIFO) fashion. In many ap-plications however, all or at least part of the tasks waitingmay be independent from each other and can be processed inany order. This freedom can potentially be used to improvethe scheduling even further. In this case, the FIFO restrictionon the buffer is relaxed and the buffer is used to reorder theincoming stream of tasks before they are processed further.

We will discuss several results dealing with this extensionof lookahead and its effect on the results of a competitiveanalysis.

1.1 The algorithmic framework

The reordering buffer model to process a sequence of re-quests works as follows: Initially, the first k requests of theinput sequence are stored in the buffer. Then, until all re-quests are processed, the following steps are repeated:

Page 2: An overview of some results for reordering buffers

218 M. Englert

1. Process one of the requests in the buffer and remove itfrom the buffer. At this point the buffer has at least oneempty slot.

2. If there are requests left in the input sequence, read thenext requests from the input and store it in the buffer.

In other words: At each point in time, the buffer containsthe first k requests of the input sequence that have not beenprocessed so far. If there are less than k unprocessed requestsin the input sequence, the buffer contains all of them. In eachstep, a scheduling algorithm picks one of the requests in thebuffer, processes it, and removes it from the buffer.

Therefore, a strategy for a problem utilizing a reorderingbuffer can be seen as consisting of three components.

1. Selection: A strategy to pick the next request to process,from the full buffer, i.e., a buffer containing k requests.

2. Scheduling: A strategy to schedule the picked request.Obviously, the precise meaning of this depends on theconcrete scheduling problem considered.

3. Clean-up: A strategy to schedule the last k − 1 requestsremaining in the buffer once requests stop arriving, i.e.,once all yet unprocessed requests are stored in the buffer.

Of course, the strategies may depend on each other. Itis not necessary to specify the third strategy if we do nottake complexity theoretic issues into account. At the timethe third strategy is applied, all requests have arrived andare known to the algorithm. Therefore it is, at least in princi-ple, possible to schedule the remaining requests in the bufferoptimally.

We focus on the performance of online algorithms ex-ploiting a reordering buffer measured in a worst-case com-petitive analysis in which the cost of the solution givenby the online algorithm is compared to the optimal costachieved by an optimal offline algorithm. The competitiveanalysis was formally established by Sleator and Tarjan [27]and is the predominant method to evaluate the performanceof online algorithms today.

For a given input sequence σ , let CA(σ) denote the costof a solution produced by a specific algorithm A. A deter-ministic online algorithm onl for a minimization problem iscalled r-competitive if there is a constant κ such that, forevery input sequence σ , Conl ≤ r · Copt(σ ) + κ , where optdenotes an optimal offline algorithm. If κ = 0, the onlinealgorithm onl is called strictly r-competitive. All online al-gorithms discussed in this article are strictly competitive.

It is important to note that, if we allow the online al-gorithm to reorder the incoming stream of requests by themeans of a reordering buffer, it is reasonable to provide theoptimal offline algorithm with the same capability. Other-wise, there are scheduling problems, e.g., the distance re-duction problem described in Sect. 3, for which an onlinealgorithm with a reordering buffer might perform even betterthan any offline algorithm. However, even an optimal offline

algorithm usually should not be allowed to perform arbitraryreorderings (that is, not just the ones that are admissible bya reordering buffer) of the input stream.

We should also note that for some problems, allowingan optimal offline algorithm to perform reorderings doesnot affect its performance. This is, for instance, the casein the minimum makespan scheduling problem discussed inSect. 2. For other problems however, it makes a differenceand changes the nature of the problem fundamentally.

Providing an offline algorithm with a reordering buffer ofsize k is equivalent to allow the algorithm to perform a par-tial reordering of the input stream before the actual schedul-ing takes place. More precisely, it is easy to see that this isequivalent to allow the algorithm to first choose a permu-tation π with π(i) < i + k for every i and afterwards toprocess the sequence σπ = σπ(1), . . . , σπ(n) instead of theoriginal input sequence σ = σ1, . . . , σn (see [15]).

2 Minimum makespan scheduling

In the minimum makespan scheduling problem for identi-cal machines we are given a sequence of n jobs J1, . . . , Jn

with processing times (in the following also referred to assizes) p1, . . . , pn. The jobs have to be scheduled on m iden-tical machines. The goal is to minimize the makespan of theschedule, which is the time it takes until all jobs are com-pletely processed. In the offline variant of the problem alljobs are known in advance whereas in the online variant thejobs arrive one by one, that is, each job of the input sequenceis only revealed to the algorithm after the previous job hasbeen scheduled irrevocably. If preemption is permitted, theprocessing of a job may be done by more than one machine.No two machines, however, are allowed to process parts ofthe same job at the same time. In the non-preemptive caseeach job has to be assigned to only one machines.

As one of the classic scheduling problems, minimummakespan scheduling is an obvious testing ground to studythe effect of a reordering buffer as an extension of looka-head. For this problem, lookahead alone is not sufficient toimprove the performance of an online algorithm in a worst-case competitive analysis (as long as the lookahead bufferhas fixed size, i.e., a size that does only depend on the num-ber of machines m but not on the number or characteristicsof jobs in the input sequence). The reason is that any inputsequence can be easily modified by inserting an arbitrarynumber of jobs of size 0 (or of arbitrarily small size) be-tween any two of the jobs in the original sequence. The newjobs do not change the optimal solution but always fill thelookahead buffer entirely and prevent the online algorithmto see any of the “real” future jobs.

The situation is different for reordering buffers. If thejobs do not have to be scheduled in the order in which

Page 3: An overview of some results for reordering buffers

An overview of some results for reordering buffers 219

they arrive, an algorithm can remove jobs of size 0 fromthe buffer and schedule them whenever the buffer containssuch jobs. The “real” jobs are accumulated in the buffer untilthere are no jobs of size 0 stored in the buffer.

The question here is by how much the achievable compet-itive ratio improves, when we use a reordering buffer. Natu-rally, the answer to this question depends on the size of thebuffer used. The achievable competitive ratio is a functionof the size of the buffer.

Ideally we would like to know the precise relation be-tween competitive ratio and buffer size, i.e., for any numberof machines and every buffer size, we would like to havetight bounds on the competitive ratio. Allowing no buffer isjust a special case of this relation. Already for this specialcase, we do not always have tight bounds on the competitiveratio. For instance, no tight bounds on the competitive ra-tio are known for non-preemptive makespan scheduling onidentical machines.

However, it turns out that for many machine schedulingproblems it is possible to achieve good or even tight boundsin a different sense. Often there is a threshold t (m) such thatany reordering buffer of fixed size greater than t (m) does notadmit a better competitive ratio than a buffer of size t (m).In other words, there is a certain point at which a furtherincrease in the size of the buffer does not give any additionalbenefit. We concentrate on finding bounds on t (m) as wellas on the competitive ratio achievable with a buffer of sizet (m).

About a decade ago, some initial results about reorderingbuffers for non-preemptive minimum makespan schedulingwhere obtained [11, 21, 23, 28]. These results are mainlyconcerned with only two machines. Recently, the case ofnon-preemptive [13] and shortly afterwards the preemptivecase [12] was finally well-understood for an arbitrary num-ber of machines.

2.1 Non-preemptive scheduling

Non-preemptive scheduling appears to be more difficult thanpreemptive scheduling in almost every sense. As an of-fline problem the former is strongly NP-hard whereas thelater can be easily solved optimally in polynomial time(see [24]). The online version of preemptive scheduling wascompletely solved by Chen et al. in 1995 [10]. The compet-itive ratio for this problem is mm/(mm − (m − 1)m) whichapproaches e/(e − 1) as m tends to infinity. Despite majorefforts, the exact competitive ratio for the non-preemptivecase is still an open problem, but since Rudin [26] gave alower bound of 1.880, it is clear that the competitive ratiois significantly worse than the one for preemptive schedul-ing. The best upper bound on the competitive ratio of non-preemptive scheduling known so far is 1.920 due to Fleis-cher and Wahl [19].

Somewhat surprisingly, this difference in difficulty doesnot carry over if we add a reordering buffer to the problem.In this case the optimal competitive ratio for non-preemptivescheduling is known and can even be achieved by an ef-ficient online algorithm. In particular, let rm be the small-est positive solution to �m − m/rm� · rm/m + (rm − 1) ·∑m−1

i=�m−m/rm� 1/i = 1. Then, r2 = 4/3 and for i ≥ 2, ri ≤ri+1 ≤ limm→∞ rm ≈ 1.4659. Englert, Özmen, and Wester-mann [13] show that

– no online algorithm can achieve a competitive ratio of lessthan rm for non-preemptive scheduling on m identical ma-chines and a reordering buffer whose size only dependson the number of machines m but not on the number orcharacteristics of jobs in the input sequence,

– there is an efficient algorithm matching this lower boundwith a reordering buffer of size O(m), and

– a buffer of size Ω(m) is necessary to achieve this com-petitive ratio.

Hence, the optimal competitive ratio is known for everyvalue m as well as the fact that a buffer of size Θ(m) is nec-essary and sufficient to achieve this competitive ratio. Whatis not known, however, is the exact size of the buffer nec-essary, i.e., the exact function hidden in the big-O notation.The difficulty of determining the optimal competitive ratioin the problem without a reordering buffer is substituted bythe difficulty of finding the minimum buffer size t (m) ad-mitting a competitive ratio of rm.

The strategy for picking the next request from a fullbuffer is very simple: always choose a job of smallest sizefrom the buffer. In the following we will explain the strategyfor placing this job.

In every step, we order the machines with respect theirload and define a threshold value for every machine. Let T

be the sum of all loads on the machines and p the size of thejob that is about to be assigned, then the threshold of the ithmachine is defined to be ti := min{rm/m, (rm −1)/i} · (T +m ·p)−p. The job is assigned to an arbitrary machine whoseload does not exceed its threshold. Such a machine alwaysexists, since rm is chosen such that

∑mi=1 min{rm/m, (rm −

1)/i} = 1, and hence, the sum over all thresholds equals thesum over all machines’ loads.

The purpose of this is to keep the load on the machinessomewhat unbalanced in order to be prepared to assign asmall number of relatively large jobs in the end, withoutharm.

As mentioned before, we do not need to specify a strat-egy for the clean-up step, if efficiency is not of importance.For the minimum makespan scheduling problem on iden-tical machines, however, the following efficient algorithmcan be used: Take m empty virtual machines, consider theremaining jobs in descending order of their size, and assigneach job to a virtual machine with minimum load. Abort this

Page 4: An overview of some results for reordering buffers

220 M. Englert

process if the makespan on the virtual machines is at leastthree times the size of the smallest job assigned so far. Then,the smallest job assigned so far is removed from the virtualschedule. Now, place the jobs that were assigned to the high-est loaded virtual machine, on the least loaded real machine,the jobs from the second highest loaded virtual machine, onthe second least loaded real machine, and so on. Finally, weschedule all jobs that were not assigned so far on the realmachines. For this, we use the standard greedy algorithmthat considers the remaining jobs in an arbitrary order andschedules each one on a machine with minimum load.

2.2 Preemptive scheduling

For preemptive online scheduling the augmentation of theonline algorithm with a reordering buffer significantly de-creases the optimal competitive ratio as well. Without areordering buffer the competitive ratio of the problem ismm/(mm − (m − 1)m). However, similar to the result fornon-preemptive scheduling with reordering, Dósa and Ep-stein [12] show that

– no online algorithm can achieve a competitive ratio of lessthan 4/3 for even m and to 4m2/(3m2 + 1) for odd m

for preemptive scheduling on m identical machines and areordering buffer whose size does not depend on the inputsequence,

– there is an efficient algorithm matching this lower boundwith a reordering buffer of size �m/2 − 1�, and

– a buffer of size Ω(m) is necessary to achieve this com-petitive ratio.

The strategy for picking the next request from a fullbuffer is the same as for non-preemptive scheduling. We al-ways choose a job of smallest size from the buffer. In thefollowing we will roughly explain the strategy for placingthis job.

In each step i, it is possible to compute the makespanof an optimal solution for all jobs that have arrived so far(including the jobs stored in the buffer) as this is simplythe maximum of the average size of these jobs divided bym and the maximum size among these jobs [24]. Let thismakespan of an optimal solution for the first i jobs be de-noted by OPTi . If we wish to achieve a competitive ra-tio of r , it is clear that no machine should receive a to-tal load of more than r · OPTi . The strategy now simplyplaces the job on the heaviest machines in such a way thatno machine’s load exceeds this bound. More precisely, letthe loads of the machines be L1 ≥ L2 ≥ · · · ≥ Lm. We placer · OPTi − L1 of the job to be assigned on the heaviest ma-chine and Lj −Lj+1 on the (j +1)th heaviest machine (con-sidering the machines in decreasing order of their load andcontinuing until the whole job is assigned or the least loadedmachine is reached). This successfully assigns the job aslong as the size of the job does not exceed r · OPTi − Lm.

It is obvious that this algorithm achieves a competitive ra-tio of r , if each job is successfully assigned. Hence, the cru-cial (and mainly technical) part of the argument is to showthat, in each step and for the right value of r , the smallestjob in the buffer can be successfully assigned.

2.3 More general machine models

Several generalization of the identical machine model havebeen studied. Instead of attributing each job with a singleprocessing time or size, we describe each job Ji by a vector(pi,1, . . . , pi,m), where pi,j is the processing time of job Ji

if the job is assigned to machine Mj . As before, the load Lj

of a machine Mj is the sum of the processing times of thejobs assigned to that machine.

For identical machines the processing time of a job is thesame on every machine, i.e., for each i, pi,1 = · · · = pi,m.The uniformly related machines model is an extension of theidentical machine case in which the machines have differentspeeds. There are positive constants α1, . . . , αm such that,for each i, there is a positive pi such that for each j , pi,j =pi/αj . The constant αj can be seen as the speed of machineMj and pi as the size of job Ji . Another extension of theidentical machine model is the restricted assignment case.Machines are essentially identical but not every job can beassigned to every machine. In this case, for each i and j ,pi,j ∈ {pi,∞}, for some pi . Finally, the unrelated machinemodel is the most general one in which the pi,j are arbitrarynon-negative numbers.

For uniformly related machines, Berman, Charikar, andKarpinski [8] give a 5.828-competitive online algorithm anda general lower bound of 2.438 is known for the problemwithout a reordering buffer. However, there is a simple 2-competitive algorithm which utilizes a reordering buffer ofsize m [13].

The best upper bound for the restricted assignment caseis �log2 m� + 1 and the best lower bound is �log2 m�, bothdue to Azar, Naor, and Rom [7]. Using a similar lowerbound construction, it can be shown that using a reorderingbuffer does not improve the upper bound beyond constantfactors [6]. The lower bound is as follows.

For simplicity assume that the number of machines m isof the form 2i . For a fixed online algorithm, we construct theinput in rounds. In round � ∈ [0, i]:– Let F� be the set of the fullest m/2� machines in F�−1 at

this time (or the set of all machines if � = 0).– Release m/(2�ε) jobs of size ε which can be scheduled

on any machine in F�.

Let x� be the total load on machines in F� after round �. Itis easy to check that x� ≥ x�−1/2 + (m/2� − kε). Hence,xi ≥ i · m/2i − kε(2i − 1)/2i−1 = log2 m − 2kε(m − 1)/m,which is a lower bound on the makespan of the online algo-rithm. An optimal offline strategy would distributed the jobs

Page 5: An overview of some results for reordering buffers

An overview of some results for reordering buffers 221

released in round � equally among the machines that are inF� but not in F�+1. The resulting makespan is 2. As ε tendsto 0, the competitive ratio approaches log2 m/2.

This lower bound carries over to the unrelated machinemodel, for which Aspnes et al. [4] show an upper boundwithout a reordering buffer that is in O(logm) as well.

3 Distance reduction

In the previous section, we discussed reordering buffers inthe context of classic scheduling problems. On the otherhand, reordering buffers also give rise to entirely new prob-lems. One such problem is the following:

We are given an input sequence of requests for serviceeach of which corresponds to a point in a metric space(V , d), where V is a set of points and d is a distance func-tion. The cost of serving the requests depends on the pro-cessing order. Serving a request p ∈ V following the serviceto a request q ∈ V induces cost d(p,q), i.e., the distancebetween these two requests.

The reordering buffer can be used to reorder the input se-quence in a restricted fashion so as to construct an outputsequence with lower service cost. This means that at eachpoint in time, the reordering buffer contains the first k re-quests of the input sequence that have not been processedso far. A scheduling strategy has to decide which requestto serve next. Upon its decision, the corresponding requestis removed from the buffer and appended to the output se-quence, and thereafter the next request in the input sequencetakes its place.

Since metric spaces correspond to graphs, we can alsogive the following, equivalent problem description. A con-nected undirected weighted graph G and an input sequenceof requests which correspond to vertices in G is given. Ateach point in time, the first k unprocessed requests fromthe input sequence are located at their respective vertices inthe graph. The scheduling algorithm controls one server thatmoves through the graph. The initial position of the servercan be chosen arbitrarily from the vertices that contain atleast one of the first k requests from the input sequence with-out cost. Thereafter, to serve a request, the server has to bemoved to the vertex containing that request. The cost of thismovement is given by the length of the chosen path. If a re-quest is served, it is removed from the graph and the next re-quest from the input sequence is placed at its correspondingvertex. The objective is to process all requests from the in-put sequence while minimizing the total distance the servermoves.

The offline variant of this problem is NP-hard, since ifthe size of the buffer is equal to the length of the input se-quence, it corresponds to the minimum weight Hamiltonianpath problem. Chan et al. [9] and independently Asahiro,

Kawahara, and Miyano [3] show that the offline problem iseven NP-hard for the uniform metric, in which two points x

and y are either at distance 0 (if x = y) or at distance 1 (ifx = y).

Englert, Räcke, and Westermann [14] gave a random-ized O(log |V | · log2 k)-competitive online algorithm forthis problem. To achieve this, it is sufficient to give anO(log2 k)-competitive algorithm for hierarchically well-separated trees (HSTs). Such an algorithm can be trans-formed into a randomized algorithm for general graphs,since Fakcharoenphol, Rao, and Talwar [17] show howgeneral graphs can be O(log |V |)-probabilistically approxi-mated by HSTs.

For the distance reduction on trees, it is sufficient to spec-ify the selection component of the strategy, i.e., an algorithmto decide which request to remove from the buffer next. Forthe scheduling itself we then simply move the server from itscurrent position to the position of the chosen request, usingany shortest path. For trees, it is easy to efficiently preformthe clean-up optimally.

Instead of choosing only one request to be served in everystep, the O(log2 |V |)-competitive online algorithm for pro-cessing a sequence of requests in an HST works in phasesand in each phase a set of request may be selected at once.

We assign a variable pay(e) to each edge e of the tree,which at any given point in time has a value between 0 andthe length �(e) of the edge. We call an edge e a paid edge ifpay(e) = �(e), and otherwise we call e an unpaid edge.

During the selection process, the requests currentlystored in the buffer are buying edges towards v, where v

denotes the current position of the server in the tree. This isdone in the following continuous process. In a time interval[t, t +dt) each request at each node u increases the paymentpay(e) by dt , where e denotes the first unpaid edge on thepath from u to v. This process continues, until there exist aconnected component induced by paid edges that contains v.

All requests in this connected component are served andremoved from the buffer. The order in which these requestsare visited is not important. The online algorithm only en-sures that each edge of the component is traversed at mosttwice and that the final position, i.e., the new position of theonline server for the next phase, is the node in the compo-nent that is farthest away from v.

Then, the payment counter pay(e) on edges of the com-ponent is reset to 0, and this ends the phase. Note howeverthat the payment counter of edges not in the component isnot reset and that this payment will influence the selectionstep in future phases.

3.1 Special metric spaces

Apart from this algorithm for general metric spaces, severalalgorithm with improved performance guarantees are known

Page 6: An overview of some results for reordering buffers

222 M. Englert

for more restricted classes of metric spaces. Khandekar andPandit [22] gave a randomized O(log2 n)-competitive algo-rithm for n uniformly spaced points on a line. This was im-proved to a deterministic O(logn)-competitive strategy byGamzu and Segev [20].

For the uniform metric, Räcke, Sohler, and Wester-mann [25] gave a O(log2 k)-competitive algorithm. Thishas subsequently been improved by Englert and Wester-mann [15] to a competitive ratio of O(log k), which alsoholds for a slightly more general class of metrics, the classof so-called star metrics, that correspond to weighted treesof height one. Currently, the best upper bound known forstar metrics is O(log k/ log logk) due to Avigdor-Elgrabliand Rabani [5].

4 Further research

A number of obvious questions arise from the gaps betweenupper and lower bounds. For the non-preemptive machinescheduling problem this is mainly the question of obtainingthe precise buffer size necessary to achieve the presentedcompetitive ratio. For the distance reduction problem dis-cussed in Sect. 3, the only known lower bound on the com-petitive ratio was given by Gamzu and Segev [20] and isabout 2.154. This lower bounds holds for the line metric.Hence, for this problem, the question is whether we can findimproved upper bounds for some non-trivial metric.

Reordering buffers can be studied in the context of a vari-ety of existing online problems. Machine scheduling, for in-stance, has also been studied with objective functions otherthan makespan. In minimum makespan scheduling, the aimis to minimize the maximum load on any machine. Anotherexample of an objective function is to maximize the mini-mum load on any machine. Epstein, Levin, and van Stee [16]give a comprehensive study of the use of reordering buffersfor this max-min objective function.

Apart from this, a number of different variants of theproposed reordering buffer model could be considered. Themain drawback of the proposed approach is that requestsmay be stored in the buffer for an indefinite amount of time.To avoid this starvation, additional constraints can be intro-duced that, for example, require a request to be processedafter a fixed number of time steps. Something along theselines was studied by Albers [1] and Federer et al. [18] forthe paging model. Albers [1] presents a deterministic algo-rithm that achieves an optimal competitive ratio of k + 1,where k denotes the cache size. Feder et al. [18] introduce arandomized algorithm that achieves an asymptotically opti-mal competitive ratio of Θ(log k).

A motivation to study reordering buffers as a way to gen-eralize lookahead was that requests may be released fromseveral parallel threads, possibly in bursts. Having this in

mind we may like to consider a model in which the size ofthe buffer is not static. For instance, let the size of the bufferbe unbounded. Now allow an arbitrary number of requeststo arrive in each time step (possibly following some randomdistribution) but, at the same time, keep the property thatexactly one request is processed.

Another point of view, which puts more explicit empha-sis on the existence of parallel threads, is taken by Alborzi etal. [2]. They introduce the k-client problem in which we aregiven k clients, each of which generates an input sequenceof requests. In each step, every client presents its first out-standing request to the algorithm and the algorithm can de-cide which of these k requests to serve. The k-client conceptis closely related to the concept of a reordering buffer, inthe sense that in each time step a scheduling strategy hasto choose between k requests. At least for the online algo-rithm both problems look more or less identical as in eachtime step it chooses a request and a new request appears. Acrucial difference however may be that in the k-client prob-lem an optimal offline algorithm can take into account thatprocessing different requests results in different requests tobe released next. The offline algorithm can leverage this toits advantage, and therefore bounds on the competitive ratiocan be larger than for reordering buffers. Alborzi et al. [2]study the k-client model for the distance reduction problemand give, among other things, a (2k − 1)-competitive strat-egy and a lower bound of Ω(log k) on the competitive ratioof any deterministic algorithm.

References

1. Albers S (2004) New results on web caching with request reorder-ing. In: Proceedings of the 16th ACM symposium on parallel al-gorithms and architectures (SPAA), pp 84–92

2. Alborzi H, Torng E, Uthaisombut P, Wagner S (2001) The k-clientproblem. J Algorithms 41(2):115–173

3. Asahiro Y, Kawahara K, Miyano E (2010) NP-hardness ofthe sorting buffer problem on the uniform metric. Unpublishedmanuscript

4. Aspnes J, Azar Y, Fiat A, Plotkin SA, Waarts O (1997) On-linerouting of virtual circuits with applications to load balancing andmachine scheduling. J ACM 44(3):486–504

5. Avigdor-Elgrabli N, Rabani Y (2010) An improved competitivealgorithm for reordering buffer management. In: Proceedings ofthe 21st ACM-SIAM symposium on discrete algorithms (SODA),pp. 13–21

6. Azar Y, Gamzu I, Rabani Y (October 2008) Personal communica-tion

7. Azar Y, Naor J, Rom R (1995) The competitiveness of on-lineassignments. J Algorithms 18(2):221–237

8. Berman P, Charikar M, Karpinski M (2000) On-line load balanc-ing for related machines. J Algorithms 35(1):108–121

9. Chan H-L, Megow N, van Stee R, Sitters R (2010) The sortingbuffer problem is NP-hard. CoRR, arXiv:1009.4355

10. Chen B, van Vliet A, Woeginger GJ (1995) An optimal algorithmfor preemptive on-line scheduling. Oper Res Lett 18(3):127–131

Page 7: An overview of some results for reordering buffers

An overview of some results for reordering buffers 223

11. Dósa G, Epstein L (2008) Online scheduling with a buffer on re-lated machines. Journal of Combinatorial Optimization. doi:10.1007/s10878-008-9200-y

12. Dósa G, Epstein L (2009) Preemptive online scheduling with re-ordering. In: Proceedings of the 17th European symposium on al-gorithms (ESA), pp 456–467

13. Englert M, Özmen D, Westermann M (2008) The power of re-ordering for online minimum makespan scheduling. In: Proceed-ings of the 49th IEEE symposium on foundations of computer sci-ence (FOCS), pp 603–612

14. Englert M, Räcke H, Westermann M (2007) Reordering buffersfor general metric spaces. In: Proceedings of the 39th ACM sym-posium on theory of computing (STOC), pp 556–564

15. Englert M, Westermann M (2005) Reordering buffer managementfor non-uniform cost models. In: Proceedings of the 32nd inter-national colloquium on automata, languages and programming(ICALP), pp 627–638

16. Epstein L, Levin A, van Stee R (2010) Max-min online allocationswith a reordering buffer. In: Proceedings of the 37th internationalcolloquium on automata, languages and programming (ICALP),pp 336–347

17. Fakcharoenphol J, Rao SB, Talwar K (2004) A tight bound onapproximating arbitrary metrics by tree metrics. J Comput SystSci 69(3):485–497

18. Feder T, Motwani R, Panigrahy R, Seiden SS, van Stee R, ZhuA (2004) Combining request scheduling with web caching. TheorComput Sci 324(2–3):201–218

19. Fleischer R, Wahl M (2000) On-line scheduling revisited. J Sched3(6):343–353

20. Gamzu I, Segev D (2007) Improved online algorithms for the sort-ing buffer problem. In: Proceedings of the 24th symposium ontheoretical aspects of computer science (STACS), pp 658–669

21. Kellerer H, Kotov V, Speranza MG, Tuza Z (1997) Semi on-linealgorithms for the partition problem. Oper Res Lett 21(5):235–242

22. Khandekar R, Pandit V (2006) Online sorting buffers on line. In:Proceedings of the 23rd symposium on theoretical aspects of com-puter science (STACS), pp 584–595

23. Li S, Zhou Y, Sun G, Chen F (2007) Study on parallel machinescheduling problem with buffer. In: Proceedings of the 2nd inter-national multi-symposiums on computer and computational sci-ences, pp 278–273

24. McNaughton R (1959) Scheduling with deadlines and loss func-tions. Manag Sci 6(1):1–12

25. Räcke H, Sohler C, Westermann M (2002) Online scheduling forsorting buffers. In: Proceedings of the 10th European symposiumon algorithms (ESA), pp 820–832

26. Rudin JF III (2001) Improved bound for the online schedulingproblem. PhD thesis, University of Texas at Dallas

27. Sleator D, Tarjan R (1985) Amortized efficiency of list update andpaging rules. Commun ACM 28(2):202–208

28. Zhang G (1997) A simple semi on-line algorithm for P 2//Cmaxwith a buffer. Inf Process Lett 61(3):145–148