Online Scheduling on Identical Machines using SRPT
aa r X i v : . [ c s . D S ] N ov Online Scheduling on Identical Machines using SRPT ∗ Kyle Fox † Benjamin Moseley ‡ Abstract
Due to its optimality on a single machine for the problem of minimizing average flow time, Shortest-Remaining-Processing-Time (SRPT) appears to be the most natural algorithm to consider for the prob-lem of minimizing average flow time on multiple identical machines. It is known that SRPT achievesthe best possible competitive ratio on multiple machines up to a constant factor. Using resource aug-mentation, SRPT is known to achieve total flow time at most that of the optimal solution when givenmachines of speed − m . Further, it is known that SRPT’s competitive ratio improves as the speedincreases; SRPT is s -speed s -competitive when s ≥ − m .However, a gap has persisted in our understanding of SRPT. Before this work, the performance ofSRPT was not known when SRPT is given (1 + ǫ ) -speed when < ǫ < − m , even though it hasbeen thought that SRPT is (1 + ǫ ) -speed O (1) -competitive for over a decade. Resolving this questionwas suggested in Open Problem 2.9 from the survey “Online Scheduling” by Pruhs, Sgall, and Torng[PST04], and we answer the question in this paper. We show that SRPT is scalable on m identicalmachines. That is, we show SRPT is (1 + ǫ ) -speed O ( ǫ ) -competitive for ǫ > . We complement thisby showing that SRPT is (1 + ǫ ) -speed O ( ǫ ) -competitive for the objective of minimizing the ℓ k -normsof flow time on m identical machines. Both of our results rely on new potential functions that capturethe structure of SRPT. Our results, combined with previous work, show that SRPT is the best possibleonline algorithm in essentially every aspect when migration is permissible. ∗ This paper contains results that appeared in the preliminary version [FM11]. † Department of Computer Science, University of Illinois, 201 N. Goodwin Ave., Urbana, IL 61801. [email protected] . This work was done while the author was at Google Inc. (Mountain View). ‡ Department of Computer Science, University of Illinois, 201 N. Goodwin Ave., Urbana, IL 61801. [email protected] . This work was done while the author was at Yahoo! Labs (Santa Clara).
Introduction
Scheduling jobs that arrive over time is a fundamental problem faced by a variety of systems. In the simplestsetting there is a single machine and n jobs that arrive online. A job J i is released at time r i where i ∈ [ n ] .The job has some processing time p i . This is the amount of time the scheduler must devote to job J i tocomplete the job. The goal of the scheduler is to determine which job should be processed at any given timewhile optimizing a quality of service metric. In the online setting the scheduler is not aware of a job until itis released. Thus, an online scheduler must make scheduling decisions without access to the entire probleminstance. Having the scheduler be online is desirable in practice since most systems are not aware of theentire jobs sequence in advance.The most popular quality of service metric considered in online scheduling theory is total flow time, orequivalently, average flow time [PST04]. The flow time of a job is the amount of time it takes the schedulerto satisfy the job. Formally, the flow time of job J i is C i − r i where C i is the completion time of job J i .The completion time of a job J i is defined to be the earliest time t such that the scheduler has devoted p i units of time to job J i during ( r i , t ] . The total flow time of the schedule is P i ∈ [ n ] C i − r i . By focusing onminimizing the total flow time, the scheduler minimizes the total time jobs must wait to be satisfied.On a single machine, the algorithm Shortest-Remaining-Processing-Time (SRPT) always schedules thejob whose remaining processing time is the smallest, breaking ties arbitrarily. It is well known that SRPTis optimal for total flow time in this setting. A more complicated scheduling model is where there are m identical machines. Minimizing the flow time in this model has been studied extensively in schedulingtheory [LR07, AALR02, CGKK04, AA07, BL04, CKZ01, TM08]. When there is more than one machine thescheduler must not only chose which subset of jobs to schedule, but it must also decide how to distribute jobsacross the machines. Naturally, it is assumed that a job can only be processed by one machine at a time. Forthis scheduling setting, it is known that there there is a Ω(min { log P, log n/m } ) lower bound on any onlinerandomized algorithm in the oblivious adversary model [LR07]. Here P is the ratio of maximum processingtime to minimum processing time. The algorithm SRPT in the m identical machine setting always schedulesthe m jobs with least remaining processing time. SRPT has competitive ratio O (min { log P, log n/m } ) foraverage flow time, making SRPT the best possible algorithm up to a constant factor in the competitive ratio.The strong lower bound on online algorithms has led previous work to use a resource augmentationanalysis. In a resource augmentation analysis the adversary is given m unit-speed processors and the algo-rithm is given m processors of speed s [KP00]. We say that an algorithm is s -speed c -competitive if thealgorithm’s objective is within a factor of c of the optimal solution’s objective when the algorithm is given s resource augmentation. An ideal resource augmentation analysis shows that an algorithm is (1 + ǫ ) -speed O (1) -competitive for any fixed ǫ > . Such an algorithm is called scalable . A scalable algorithm is O (1) -competitive when given the minimum amount of extra resources over the adversary. Given the strong lowerbound on flow time in the identical machines model, finding a scalable algorithm is essentially the bestpositive result that can be shown using worst case analysis.Given that SRPT is an optimal algorithm on a single machine and achieves the best possible competitiveratio on multiple machines without resource augmentation, it was widely thought that SRPT would be ascalable algorithm in the multiple machine case. However, the competitive ratio of SRPT when given ǫ speed had been unresolved for about a decade when < ǫ < − m . Instead, another algorithm was shownto be scalable [CGKK04]. This algorithm geometrically groups jobs according to their size. It uses thesegroupings to assign each job to exactly one machine. The algorithm then runs the single machine version ofSRPT separately on each machine.Although the competitiveness of SRPT was not known when given speed less than − m , it was knownthat SRPT achieves total flow time at most that of the optimal solution’s flow time when given machines of Flow time is also referred to as response time or waiting time. − m [PSTW02]. In fact, this has been extended to show that SRPT is s -speed s -competitivewhen s ≥ − m [TM08]. This result shows that SRPT ‘efficiently’ uses the faster processors it is given. Inthe fairly recent online scheduling survey of Pruhs, Sgall, and Torng it was suggested in Open Problem 2.9that an important question is to resolve whether or not SRPT is a scalable algorithm [PST04]. In this paperwe answer this question in the affirmative by showing the following theorem. Theorem 1.1.
The algorithm
SRPT is (1 + ǫ ) -speed ǫ -competitive for average flow time on m identicalparallel machines for ǫ > . Unfortunately, algorithms which are optimal for average flow time can starve individual jobs of process-ing power for an arbitrary finite amount of time. For example, suppose we are given a single machine. Jobs J and J arrive time and at every unit time step another job arrives. All jobs have unit processing time.Using average flow time as the objective, an optimal algorithm for this problem instance is to schedule J and then schedule jobs as they arrive, scheduling J after the last of the other jobs is completed. Althoughthis algorithm is optimal, it can be seen that the algorithm is not ‘fair’ to job J .Algorithms which are fair at the individual job level are desirable in practice [Tan07, SG94]. In fact,algorithms that are competitive for total flow time are sometimes not implemented due to the possibilityof unfairness [BP03]. To overcome the disadvantage of algorithms that merely optimize the average flowtime, the objective of minimizing the ℓ k -norms of flow time for small k was suggested by Bansal andPruhs [BP03, BP04]. This objective tries to balance overall performance and fairness. Specifically, the ℓ k -norm objective minimizes (cid:16)P i ∈ [ n ] ( C i − r i ) k (cid:17) /k . Notice that optimizing the ℓ -norm is equivalent tooptimizing the average flow time. For the ℓ k -norm objective when k > , the previous example has oneoptimal solution. This solution schedules jobs in the order they arrive, which can be seen to be ‘fair’ to eachjob.For the ℓ k -norm objective it is known that every online deterministic algorithm is n Ω(1) -competitiveeven on a single machine when < k < ∞ [BP03]. This is quite different from the ℓ -norm where SRPTis an optimal algorithm. In the single machine setting, it was shown that SRPT is a scalable algorithm forthe ℓ k -norm objective for all k [BP03]. The competitiveness of SRPT in the multiple machine setting wasnot known for the ℓ k -norms even when SRPT is given any constant amount of resource augmentation. Thepreviously discussed algorithm that was analyzed in [CGKK04] was shown to be scalable for the problem ofminimizing the ℓ k -norms of flow time on identical machines for all k > . It was suggested in [PST04] thatdetermining whether or not SRPT is scalable for the ℓ k norms of flow time on identical machines is anotherinteresting open question. In this paper we analyze SRPT and show that it is a scalable algorithm for the ℓ k -norm objective on multiple machines. This shows that not only is SRPT essentially the best possiblealgorithm for the objective of average flow time in almost all aspects in the worst case model, SRPT willalso balance the fairness of the schedule when given a small amount of resource augmentation. Theorem 1.2.
The algorithm
SRPT is (1 + ǫ ) -speed ǫ -competitive for the ℓ k -norms of flow time on m identical parallel machines for k ≥ , / ≥ ǫ > . To prove both of these results, we introduce novel potential functions that we feel capture the structureof SRPT. SRPT is a natural algorithm to consider in many other scheduling models where potential func-tion analysis is commonly found. We believe that the potential functions introduced here will be useful foranalyzing SRPT and similar algorithms in these other settings.
Related Work:
As mentioned, SRPT is an optimal algorithm for minimizing average flow time on a singlemachine. SRPT was the first algorithm to be analyzed in the worst case model when there are m identicalmachines. It was shown by Leonadi and Raz that SRPT is O (min { log P, log n/m } ) -competitive and there2s a matching lower bound on any randomized algorithm [LR07]. A simpler analysis of SRPT in the multi-ple machine setting can be found in [Leo03]. SRPT is (cid:0) − m (cid:1) -speed -competitive and SRPT is the onlyalgorithm known to be -competitive with any resource augmentation in the multiple machine setting. No-tice that SRPT in the multiple machine setting could schedule a job on one machine and then later schedulethe job on another machine. That is, SRPT migrates jobs between the machines. To eliminate migrationAwerbuch et al. introduced an algorithm that processes each job on exactly one machine and showed that thisalgorithm is O (min { log P, log n } ) -competitive [AALR02]. A related algorithm was developed by Chekuri,Khanna, and Zhu that does not migrate jobs and it was shown to be O (min { log P, log n/m } ) -competitive[CKZ01]. Each of the previously discussed algorithms hold the jobs in a central pool until they are sched-uled. Avrahami and Azar introduced an algorithm which does not hold jobs in a central pool, but ratherassigns a job to a unique machine as soon as the job arrives [AA07]. They showed that their algorithmis O (min { log P, log n } ) -competitive. Chekuri et al. showed that the algorithm of Avrahami and Azar is ascalable algorithm [AA07, CGKK04]. For the ℓ k -norms of flow time Chekuri et al. also showed that thealgorithm of Avrahami and Azar is scalable [CGKK04].The analysis in [CGKK04], which shows a scalable algorithm for average flow time on multiple ma-chines, uses a local competitiveness argument. In a local argument, it is shown that at any time, the increasein the algorithm’s objective function is bounded by a constant factor of the optimal solution’s objective.From the lower bound given above, we know this property does not hold when SRPT is not given resourceaugmentation. With resource augmentation, it is unclear whether or not this can be shown for SRPT onevery input. In this paper, we avoid a local analysis by using a potential function argument which we discussfurther in the following section. Before giving our analysis, we introduce a fair bit of notation. Let Q S ( t ) and Q O ( t ) be the set of jobsalive (released but unsatisfied) at time t in SRPT’s and OPT’s schedules, respectively. Let W S ( t ) be theset of jobs scheduled for processing at time t in SRPT’s schedule. Let p Si ( t ) and p Oi ( t ) be the remainingprocessing times at time t for job J i in SRPT’s and OPT’s schedules, respectively. Finally, let C Si and C Oi be the completion time of job J i in SRPT’s and OPT’s schedules, respectively.Throughout this paper, we will concentrate on bounding SRPT’s k th power flow time , P i ∈ [ n ] (cid:0) C Si − r i (cid:1) k ,as this is the ℓ k -norm of flow time without the outer root. We will proceed to use SRPT and OPT asfunctions of t that return their respective algorithm’s accumulated k th power flow time. In other words,SRPT ( t ) = P i ∈ [ n ] ,t ≥ r i (min (cid:8) C Si , t (cid:9) − r i ) k , and OPT ( t ) is defined similarly. When SRPT or OPT is usedas a value without a time specified, it is assumed we mean their final objective value.For any job J i and time t , we let R S ( i, t ) be the total volume of work remaining at time t for everyreleased job with completion time at most C Si in SRPT’s schedule. Precisely, R S ( i, t ) = X J j ∈Q S ( t ) ,C Sj ≤ C Si p Sj ( t ) . We also define V O ( i, t ) to be the volume of work in OPT’s schedule at time t for a subset of those samejobs, except we only include those jobs with original processing time at most p i . Precisely, V O ( i, t ) = X J j ∈Q O ( t ) ,C Sj ≤ C Si ,p j ≤ p i p Oj ( t ) . We will assume without loss of generality that all arrival and completion times are distinct by breaking tiesarbitrarily but consistently. 3he following lemma will help us to characterize the current status of SRPT compared to OPT at anypoint in time. This is a modification of a lemma given in [MRSG04, PST04].
Lemma 2.1.
At any time t ≥ r i , for any sequence of requests σ , and for any i ∈ [ n ] , it is the case that R S ( i, t ) − V O ( i, t ) ≤ mp i . Proof . Define X ( i, t ) to be the sum of the remaining processing times in SRPT’s schedule at time t forjobs with remaining processing time at most p i while also contributing to R S ( i, t ) . In other words, X ( i, t ) = X J j ∈Q S ( t ) ,C Sj ≤ C Si ,p Sj ( t ) ≤ p i p Sj ( t ) . Every job contributing to R S ( i, t ) must have remaining processing time at most p i in order for SRPT toschedule it ahead of J i , so we see X ( i, t ) = R S ( i, t ) whenever t ≥ r i . Thus is suffices to show that X ( i, t ) − V O ( i, t ) ≤ mp i . If there are m or fewer jobs contributing to X ( i, t ) at time t in Q S ( t ) then thelemma follows easily. Now consider the case where there are more than m jobs contributing to X ( i, t ) .Let t ′ ≥ be the earliest time before time t such that SRPT always had at least m jobs contributingto X ( i, t ) during ( t ′ , t ] . We will show X ( i, t ) − V O ( i, t ) ≤ mp i . Let T = P r j ∈ ( t ′ ,t ] ,C Sj ≤ C Si ,p j ≤ p i p j bethe total processing time of jobs that arrive during ( t ′ , t ] that are completed by SRPT before J i and haveoriginal processing time at most p i . It can be seen that X will increase by T during ( t ′ , t ] due to the arrivalof jobs. However, V O will also increase by T during ( t ′ , t ] by definition of V O .The only other change that occurs to X and V O during ( t ′ , t ] is due to the processing of jobs by thealgorithm SRPT and OPT. Knowing that OPT has m machines of unit speed, V O can decrease by at most m ( t − t ′ ) during ( t, t ′ ] . We also know that during ( t ′ , t ] , there always exists at least m jobs with remainingprocessing time at most p i unsatisfied by SRPT that will be completed by SRPT before job J i . SRPTalways works on the m available jobs with earliest completion time, so this causes X to decrease by at least m ( t ′ − t ) (this even assumes SRPT is not given resource augmentation). Combining these facts we havethe following: X ( i, t ) − V O ( i, t ) ≤ (cid:0) X ( i, t ′ ) + T − m ( t ′ − t ) (cid:1) − (cid:0) V O ( i, t ′ ) + T − m ( t ′ − t ) (cid:1) = X ( i, t ′ ) − V O ( i, t ′ ) ≤ mp i For our proofs of the theorems, we will use a potential function argument [Edm00]. In each proof we willdefine a potential function
Φ : [0 , ∞ ) → R such that Φ(0) = Φ( ∞ ) = 0 . We will proceed to bound discreteand continuous local changes to SRPT + Φ . These changes may come from the following sources: Job Arrival : Arriving jobs will not affect SRPT but they will make a change to Φ . The total increase in Φ over all jobs arrivals will be bounded by δ OPT where δ is a non-negative constant which may depend on k and ǫ . Job Completion : Again, job completions will not affect SRPT, but they will make a change to Φ . We willbound these increases by γ OPT where γ is a non-negative constant which may depend on k and ǫ .4 unning Condition : This essentially captures everything else. We will show a bound on the continuouschanges in SRPT + Φ due to the change in time as well as the changes to each job’s remaining processingtime. Surprisingly, we find ddt SRPT + ddt Φ ≤ , meaning we can ignore the running condition in our finalcalculations.Knowing that Φ( ∞ ) = Φ(0) = 0 , we have that SRPT = SRPT ( ∞ ) + Φ( ∞ ) . This is bounded by thetotal increase in the arrival and completion conditions, thus we will have SRPT ≤ ( δ + γ ) OPT, which willcomplete our analysis.
We consider any job sequence σ and assume SRPT is given (1 + ǫ ) speed where ǫ > . We proceed byplacing our focus on minimizing the total flow time. To accomplish this, we will define a potential functionwith one term for each job being processed such that the following conditions are met: • Job arrivals and completions do not increase the potential function beyond a strong lower bound onOPT. • Each term has a decreasing component that counteracts the gradual increases in SRPT’s flow time. • There may be components of each term that increase, but we can easily bound these increases by thedecreases from other components.We use the following potential function based on the intuition given above: Φ( t ) = 1 mǫ X J i ∈Q S ( t ) (cid:0) R S ( i, t ) + mp Si ( t ) − V O ( i, t ) (cid:1) Now, consider the different changes that occur to SRPT’s accumulated flow time as well as Φ for anyjob sequence σ . Job Arrival:
The event of a job’s arrival makes no change to the accumulated flow time, but it can change Φ . Consider the arrival of job J i at time t = r i . For any j = i such that J j ∈ Q S ( t ) , consider the term mǫ (cid:0) R S ( j, t ) + mp Sj ( t ) − V O ( j, t ) (cid:1) in the potential function. The arrival of job J i will change both R S ( j, t ) and V O ( j, t ) equally (either by p i or depending on if p j ≤ p Si ( t ) ) creating no net change in the potential function. We do gain a new term inthe summation, but this can be bounded as follows: mǫ (cid:0) R S ( i, t ) + mp i − V O ( i, t ) (cid:1) ≤ mǫ (2 mp i ) By Lemma 2.1 = 2 ǫ p i We use the trivial lower bound of p i on J i ’s total flow time to see that the total increase in Φ from jobarrivals is at most ǫ OPT. 5 ob Completion:
Same as above, job completions make no change to the accumulated flow time. Considerthe completion of a job J i by OPT at time t = C Oi . For any job J j ∈ Q S ( t ) , the term mǫ (cid:0) R S ( j, t ) + mp Sj ( t ) − V O ( j, t ) (cid:1) sees no change as J i is already contributing nothing to V O ( j, t ) .Likewise, consider the completion of job J i by SRPT at time t = C Si . For any j = i such that J j ∈ Q S ( t ) , the term mǫ (cid:0) R S ( j, t ) + mp Sj ( t ) − V O ( j, t ) (cid:1) sees no change as J i is already contributing nothing to R S ( j, t ) . Unfortunately, we need a more sophisticatedargument to bound in the increase in Φ from removing the term mǫ (cid:0) R S ( i, t ) + mp Si ( t ) − V O ( i, t ) (cid:1) . The increase from removing this term is precisely mǫ V O ( i, t ) , because SRPT has completed all jobscontributing to R S ( i, t ) and p Si ( t ) = 0 . We can use the following scheme to charge this and similar increasesto OPT’s total flow time. Consider any job J j contributing volume to V O ( i, t ) . We know that if r j < r i , wehave p j ≤ p i by definition of V O . Further, if r j ≥ r i , we have p j ≤ p Si ( r j ) by definition of R S . In eithercase, SRPT performs at least p j units of work on job J i while J j is sitting in OPT’s queue, and this workoccurs over a period of at least p j / (1 + ǫ ) time units. To pay for J j ’s contribution to mǫ V O ( i, t ) , we chargeto J j ’s increase in flow time during this period at a rate of ǫmǫ .The total charge accrued during this period due to J j is at least ǫmǫ p j ǫ = p j mǫ . Summing over all jobscontributing to V O ( i, t ) , we see that we charge enough. Now we need to bound our total charge. Observethat any one of these charges to a job J j accrues at ǫmǫ times the rate that J j is accumulating flow time.Further, SRPT is working on at most m jobs at any point in time, so our combined charges are accruingat ǫǫ times the rate that J j is accumulating flow time. By summing over all time and jobs, we concludethat we charge at most ǫǫ OPT, giving us an upper bound on Φ ′ s increase due to SRPT’s job completions. Running Condition:
We now proceed to show a bound on ddt
SRPT + ddt Φ at an arbitrary time t ignoring thearrival and completion of jobs. First, note that ddt SRPT = X J i ∈Q S ( t ) . To bound ddt Φ , we fix some i such that J i ∈ Q S ( t ) and consider J i ’s term in Φ ’s summation.We begin by considering the change due to V O ( i, t ) . OPT can only process m jobs at a time, so the i thterm of Φ changes at a rate of at most mǫ m = 1 ǫ . Finally, we consider the change due to both R S ( i, t ) and mp Si ( t ) together and derive a lower bound ontheir combined decrease. Neither term can increase, so we accomplish this by finding a lower bound on thedecrease of one or the other. Suppose SRPT is processing job J i (using (1 + ǫ ) speed) at time t . If this isthe case, mp Si ( t ) decreases at a rate of m (1 + ǫ ) . If job J i is not being processed, then there are m otherjobs in W S ( t ) being processed instead. By definition, these jobs are contributing their volume to R S ( i, t ) ,and we see it decreases at a rate of m (1 + ǫ ) . Considering both terms together, we find an upper bound fortheir contribution to Φ ’s rate of change which is mǫ ( − m (1 + ǫ )) = − ǫ − .
6y summing over the above rates of change, we see everything cancels out to . Summing over all jobsgives us ddt SRPT ( t ) + ddt Φ( t ) ≤ . Integrating the left hand side over all time, we see SRPT and Φ together do not increase if we only consider events other than the arrival and completion of jobs. Final Analysis:
Using the framework described in Section 2 and the above analysis, we see SRPT ≤ ǫ OPT.This concludes the proof of Theorem 1.1. ℓ k -Norms of Flow Time In this section we focus on minimizing the ℓ k -norms of flow time. Consider any job sequence σ and assumethat SRPT is given (1 + ǫ ) -speed where / ≥ ǫ > . We use a somewhat different potential function thatincludes extra components meant to reflect the increasing speed at which alive jobs contribute to k th powerflow time. We use the following potential function to directly bound SRPT’s k th power flow time: Φ( t ) = 1(1 − ǫ ) k X J i ∈Q S ( t ) (cid:18) max (cid:26) t − r i + 1 mǫ (cid:0) R S ( i, t ) + mp Si ( t ) − V O ( i, t ) (cid:1) , (cid:27)(cid:19) k − X J i ∈Q S ( t ) ( t − r i ) k Consider any job sequence σ . Job Arrival:
Consider the arrival of job J i at time t = r i . Again, no change occurs to the objective function.Also, as in the case for standard flow time, no change will occur to the J j th term of the potential functionfor any j = i . However, a new term is added to the summation in the potential function. The increase in Φ due to this new term is at most − ǫ ) k (cid:18) mǫ (cid:0) R S ( i, t ) + mp i − V O ( i, t ) (cid:1)(cid:19) k ≤ − ǫ ) k (cid:18) mǫ (2 mp i ) (cid:19) k By Lemma 2.1 ≤ (cid:18) ǫ (1 − ǫ ) (cid:19) k ( p i ) k . The value ( p i ) k is a trivial lower bound on J i ’s k th power flow time, so we can bound the total increasein Φ due to job arrivals by (cid:16) ǫ (1 − ǫ ) (cid:17) k OPT.
Job Completion:
Again, the only effect of job completion we are concerned with is the increase of eachjob J i ’s term in Φ when SRPT completes J i at time t = C Si . The increase from this occurrence is ( t − r i ) k − − ǫ ) k (cid:18) max (cid:26) t − r i + 1 mǫ V O ( i, t ) , (cid:27)(cid:19) k We will use the following lemmas.
Lemma 4.1.
For any job J i ∈ Q S ( t ) , if V O ( i, t ) ≤ mǫ ( t − r i ) then ( t − r i ) k − − ǫ ) k (cid:18) max (cid:26) t − r i + 1 mǫ V O ( i, t ) , (cid:27)(cid:19) k ≤ . roof . Note that hypothesis cannot apply when t − r i + mǫ (cid:0) R S ( i, t ) + mp Si ( t ) − V O ( i, t ) (cid:1) < . This isbecause t − r i + 1 mǫ (cid:0) R S ( i, t ) + mp Si ( t ) − V O ( i, t ) (cid:1) ≥ (1 − ǫ )( t − r i ) which is non-negative for all t ≥ r i , ǫ ≤ . Given the assumption that V O ( i, t ) ≤ mǫ ( t − r i ) , we have ( t − r i ) k − − ǫ ) k (cid:18) t − r i + 1 mǫ V O ( i, t ) (cid:19) k ≤ ( t − r i ) k − − ǫ ) k ((1 − ǫ )( t − r i )) k = 0 . Lemma 4.2.
For any job J i ∈ Q S ( t ) , if V O ( i, t ) > mǫ ( t − r i ) then ( t − r i ) k − − ǫ ) k (cid:18) max (cid:26) t − r i + 1 mǫ V O ( i, t ) , (cid:27)(cid:19) k ≤ (cid:18) ǫ (cid:19) k (cid:18) m V O ( i, t ) (cid:19) k . Proof . We will ignore the negative term from the expression. Given the assumption that V O ( i, t ) > mǫ ( t − r i ) ,we have ( t − r i ) k ≤ (cid:18) mǫ V O ( i, t ) (cid:19) k = (cid:18) ǫ (cid:19) k (cid:18) m V O ( i, t ) (cid:19) k . Based on these lemmas, we see the total increase to Φ from job completions is bounded by X i ∈ [ n ] (cid:18) ǫ (cid:19) k (cid:18) m V O ( i, C Si ) (cid:19) k . The following lemma, which we will prove later, implies that this bound is at most (cid:0) ǫǫ (cid:1) k OPT.
Lemma 4.3.
We have X i ∈ [ n ] (cid:18) m V O ( i, C Si ) (cid:19) k ≤ (1 + ǫ ) k OPT . Running Condition:
We now ignore the arrival and completion of jobs and consider the change in the k thpower flow time as well as Φ due to other events. Consider any time t . Note that ddt SRPT ( t ) = X J i ∈Q S ( t ) k · ( t − r i ) k − . Now, fix some i such that J i ∈ Q S ( t ) . We will examine the contribution of the J i th term to ddt SRPT.We will begin by assuming t − r i + mǫ (cid:0) R S ( i, t ) + mp Si ( t ) − V O ( i, t ) (cid:1) > and consider the other caselater. 8irst, consider how the change in t affects this term while keeping the dependent variables fixed. Therate of change is at most k (1 − ǫ ) k (cid:18) t − r i + 1 mǫ (cid:0) R S ( i, t ) + mp Si ( t ) − V O ( i, t ) (cid:1)(cid:19) k − − k ( t − r i ) k − . Next we consider the change due to V O ( i, t ) . In the worst case, OPT works on m jobs at time t so therate of increase in Φ due to the change in V O ( i, t ) is at most kmmǫ − ǫ ) k (cid:18) t − r i + 1 mǫ (cid:0) R S ( i, t ) + mp Si ( t ) − V O ( i, t ) (cid:1)(cid:19) k − = kǫ (1 − ǫ ) k (cid:18) t − r i + 1 mǫ (cid:0) R S ( i, t ) + mp Si ( t ) − V O ( i, t ) (cid:1)(cid:19) k − Now consider the change in Φ due to R S ( i, t ) + mp Si ( t ) . As in the average flow time argument, thissum decreases at a rate of at least (1 + ǫ ) m , so these terms cause Φ to change at a rate of at most − k (1 + ǫ ) mmǫ − ǫ ) k (cid:18) t − r i + 1 mǫ (cid:0) R S ( i, t ) + mp Si ( t ) − V O ( i, t ) (cid:1)(cid:19) k − = − kǫ (1 − ǫ ) k (cid:18) t − r i + 1 mǫ (cid:0) R S ( i, t ) + mp Si ( t ) − V O ( i, t ) (cid:1)(cid:19) k − − k (1 − ǫ ) k (cid:18) t − r i + 1 mǫ (cid:0) R S ( i, t ) + mp Si ( t ) − V O ( i, t ) (cid:1)(cid:19) k − . Summing over the above terms shows that J i contributes at most to SRPT + Φ ’s rate of change.We have yet to consider the case when t − r i + mǫ (cid:0) R S ( i, t ) + mp Si ( t ) − V O ( i, t ) (cid:1) ≤ . The abovearguments concerning the running condition and job arrivals show this term to be non-increasing. Further,we see that once the expression max (cid:26) t − r i + 1 mǫ (cid:0) R S ( i, t ) + mp Si ( t ) − V O ( i, t ) (cid:1) , (cid:27) hits , it will never leave that value.We now consider the various sources of change in Φ ’s i th term when the above expression equals by simply plugging into the above inequalities. Changes in t contribute at most − k ( t − r i ) k − . Also,changes in R S ( i, t ) , mp Si ( t ) , and V O ( i, t ) have no effect. Summing, we still get as an upper boundon J i ’s contribution to SRPT + Φ ’s rate of change. Summing over all jobs and integrating over time, we seethis bound holds for the running condition’s overall contribution to SRPT + Φ . Final Analysis:
Using the framework discussed in Section 2 and the arrival, completion, and runningconditions shown in this section, we have thatSRPT ≤ (cid:18) ǫ (1 − ǫ ) (cid:19) k + (cid:18) ǫǫ (cid:19) k ! OPT . By taking the outer k th root of the ℓ k -norm flow time and assuming ǫ < / , we derive Theorem 1.2.9 Proof of Lemma 4.3
In this section, we prove Lemma 4.3. Namely, if SRPT is running m machines of speed (1 + ǫ ) while OPTis running m machines of unit speed, we have X i ∈ [ n ] (cid:18) m V O ( i, C Si ) (cid:19) k ≤ (1 + ǫ ) k OPTfor the metric of k th power flow time. We will use a charging scheme to prove the lemma.Fix some job J i and let S i denote the set of jobs that contribute to V O ( i, C Si ) . We charge the followingto each J j ∈ S i : m V O ( i, C Si ) − X J a ∈S i ,r a We have ǫ ) m V O ( i, C Si ) − X J a ∈S i ,r a We would like to thank the anonymous reviewers for their suggestions on improvingthis paper. References [AA07] Nir Avrahami and Yossi Azar. Minimizing total flow time and total completion time withimmediate dispatching. Algorithmica , 47(3):253–268, 2007.11AALR02] Baruch Awerbuch, Yossi Azar, Stefano Leonardi, and Oded Regev. Minimizing the flow timewithout migration. SIAM J. Comput. , 31(5):1370–1382, 2002.[BL04] Luca Becchetti and Stefano Leonardi. Nonclairvoyant scheduling to minimize the total flowtime on single and parallel machines. J. ACM , 51(4):517–539, 2004.[BP03] Nikhil Bansal and Kirk Pruhs. Server scheduling in the lp norm: a rising tide lifts all boat. In STOC , pages 242–250, 2003.[BP04] Nikhil Bansal and Kirk Pruhs. Server scheduling in the weighted lp norm. In Martin Farach-Colton, editor, LATIN , volume 2976 of Lecture Notes in Computer Science , pages 434–443,2004.[CGKK04] Chandra Chekuri, Ashish Goel, Sanjeev Khanna, and Amit Kumar. Multi-processor schedulingto minimize flow time with epsilon resource augmentation. In L´aszl´o Babai, editor, STOC ,pages 363–372, 2004.[CKZ01] Chandra Chekuri, Sanjeev Khanna, and An Zhu. Algorithms for minimizing weighted flowtime. In STOC , pages 84–93, 2001.[Edm00] Jeff Edmonds. Scheduling in the dark. Theor. Comput. Sci. , 235(1):109–141, 2000.[FM11] Kyle Fox and Benjamin Moseley. Online scheduling on identical machines using srpt. In SODA’11: Proceedings of the Twenty-first Annual ACM -SIAM Symposium on Discrete Algorithms ,2011.[KP00] Bala Kalyanasundaram and Kirk Pruhs. Speed is as powerful as clairvoyance. J. ACM ,47(4):617–643, 2000.[Leo03] Stefano Leonardi. A simpler proof of preemptive total flow time approximation on parallelmachines. Lecture Notes in Computer Science , pages 71–77, 2003.[LR07] Stefano Leonardi and Danny Raz. Approximating total flow time on parallel machines. J.Comput. Syst. Sci. , 73(6):875–891, 2007.[MRSG04] S. Muthukrishnan, Rajmohan Rajaraman, Anthony Shaheen, and Johannes Gehrke. Onlinescheduling to minimize average stretch. SIAM J. Comput. , 34(2):433–452, 2004.[PST04] Kirk Pruhs, Jiri Sgall, and Eric Torng. Handbook of Scheduling: Algorithms, Models, andPerformance Analysis , chapter Online Scheduling. 2004.[PSTW02] Cynthia A. Phillips, Clifford Stein, Eric Torng, and Joel Wein. Optimal time-critical schedulingvia resource augmentation. Algorithmica , 32(2):163–200, 2002.[SG94] Abraham Silberschatz and Peter Galvin. Operating System Concepts, 4th edition . Addison-Wesley, 1994.[Tan07] Andrew S. Tanenbaum. Modern Operating Systems . Prentice Hall Press, Upper Saddle River,NJ, USA, 2007.[TM08] Eric Torng and Jason McCullough. Srpt optimally utilizes faster machines to minimize flowtime.