Online Makespan Scheduling with Job Migration on Uniform Machines

In the classic minimum makespan scheduling problem, we are given an input sequence of n jobs with sizes. A scheduling algorithm has to assign the jobs to m parallel machines. The objective is to minimize the makespan, which is the time it takes until all jobs are processed. In this paper, we consider online scheduling algorithms without preemption. However, we allow the online algorithm to change the assignment of up to k jobs at the end for some limited number k. For m identical machines, Albers and Hellwig (Algorithmica 79(2):598–623, 2017) give tight bounds on the competitive ratio in this model. The precise ratio depends on, and increases with, m. It lies between 4/3 and ≈1.4659\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\approx 1.4659$$\end{document}. They show that k=O(m)\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$k = O(m)$$\end{document} is sufficient to achieve this bound and no k=o(n)\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$k = o(n)$$\end{document} can result in a better bound. We study m uniform machines, i.e., machines with different speeds, and show that this setting is strictly harder. For sufficiently large m, there is a δ=Θ(1)\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\delta = \varTheta (1)$$\end{document} such that, for m machines with only two different machine speeds, no online algorithm can achieve a competitive ratio of less than 1.4659+δ\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$1.4659 + \delta $$\end{document} with k=o(n)\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$k = o(n)$$\end{document}. We present a new algorithm for the uniform machine setting. Depending on the speeds of the machines, our scheduling algorithm achieves a competitive ratio that lies between 4/3 and ≈1.7992\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\approx 1.7992$$\end{document} with k=O(m)\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$k = O(m)$$\end{document}. We also show that k=Ω(m)\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$k = \varOmega (m)$$\end{document} is necessary to achieve a competitive ratio below 2. Our algorithm is based on maintaining a specific imbalance with respect to the completion times of the machines, complemented by a bicriteria approximation algorithm that minimizes the makespan and maximizes the average completion time for certain sets of machines.


Introduction
In the classic minimum makespan scheduling problem, we are given an input sequence of n jobs with sizes. A scheduling algorithm has to assign the jobs to m parallel machines. The objective is to minimize the makespan, which is the time it takes until all jobs are processed. This problem is NP-hard in the strong sense [20]. In this paper, we consider online scheduling without preemption.
An online algorithm does not have knowledge about the input sequence in advance. Instead, it gets to know the input sequence job by job without knowledge about the future. An online algorithm is called c-competitive if the makespan of the algorithm is at most c times the makespan of an optimal offline solution.
Extensive work has been done to narrow the gap between lower and upper bounds on the competitive ratio for online minimum makespan scheduling. Increasingly sophisticated algorithms and complex analyses were developed. Nevertheless, even for the most basic case of identical machines, in which each job has the same processing time, i.e., its size, on every machine, there is still a gap between the best known lower and upper bounds on the competitive ratio of 1.880 [30] and 1.9201 [18], respectively. In the setting with uniform machines, in which different machines may run at different speeds, the best known lower and upper bounds on the competitive ratio are 2.564 [13] and 5.828 [6], respectively.
In this work, we study to what extent the ability to migrate a limited number of jobs can help an online algorithm in terms of the competitive ratio in the uniform machine setting. In this model, the online algorithm has to assign jobs to machines as they arrive. However, after all jobs have arrived, the algorithm may remove up to k jobs from the machines and reassign them to different machines.
Job migration is a useful tool to balance loads and it is natural to study how many jobs need to be migrated to achieve certain load guarantees. Indeed, job migration in scheduling has been studied previously, see for example [8,12,27,[32][33][34], but in particular, Albers and Hellwig [2] studied this problem for m identical machines 1 and gave tight bounds on the competitive ratio for this case. Roughly speaking, k Θ(m) job migrations are sufficient and necessary to achieve this tight bound. Allowing more job migrations does not result in further improvements as long as k o(n), where n denotes the total number of arriving jobs.
We provide related results for the more general setting of uniform machines, which introduces new technical challenges. Our contribution also implies new results on a different but related problem: online reordering for scheduling. In this model, a socalled reordering buffer can be used to reorder the input sequence of jobs in a restricted fashion. Arriving jobs are first stored in the reordering buffer which has capacity to store up to k jobs. When the buffer is full, the online scheduling algorithm has to decide which of the jobs to remove from the buffer and to assign (irrevocably) to a machine. When no more jobs arrive, all jobs remaining in the buffer have to be assigned to machines as well.
This model was introduced by Englert et al. [14] and the work by Albers and Hellwig [2] generalizes their results for identical machines to the setting were no buffer is used, but a limited number of job migrations are permitted. It is not known what the relationship between the two models is in general. However, Albers and Hellwig note that any online algorithm for the job migration model that satisfies a certain monotonicity property can be transformed into an online algorithm for the corresponding reordering buffer problem which has the same competitive ratio. If the algorithm migrates k jobs, the transformed algorithm requires a buffer of size k. The aforementioned monotonicity property is as follows: if the algorithm would not migrate a job at time t if we pretend that the input sequence ends at that time, then the algorithm does not migrate the job at any later time either.
Both the algorithm by Albers and Hellwig and the algorithm we present in this work satisfy the monotonicity property. Therefore, our results also directly imply an improved upper bound for the online minimum makespan scheduling problem with a reordering buffer on uniform machines.

The Model and Our Contribution
We present a lower bound on the competitive ratio showing that the problem is strictly harder for uniform machines than for identical machines. We give the first online algorithm for uniform machines with job migration. Depending on the speeds of the m machines, our scheduling algorithm achieves a competitive ratio that lies between 4/3 and ≈ 1.7992 and performs O(m) job migrations. In addition, we show that Ω(m) job migrations are necessary to achieve a competitive ratio of less than 2.
For the corresponding problem of online minimum makespan scheduling with a reordering buffer, Englert et al. [14] present a greedy algorithm that achieves a competitive ratio of 2 (or 2+ε if the algorithm is supposed to be efficient) with a reordering buffer of size m. Subsequently, Ding et al. [9] improved the competitive ratio to 2−1/m with a buffer of size m + 1. 2 Therefore, we also obtain a significant improvement over these previously known results for the reordering buffer version of the problem, since our upper bound translates to this model as well.
Before we explain our contribution in more detail, we define the model more formally and introduce some useful notation and definitions. The m ≥ 2 machines are denoted by M 0 , . . . , M m−1 . For each 0 ≤ i ≤ m − 1, the speed of machine M i is denoted by s i , with min{s 0 , . . . , s m−1 } 1. Later, for our upper bounds, we will assume that the machines are sorted in ascending order of their speeds, i.e., 1 s 0 ≤ . . . ≤ s m−1 , but in our lower bound construction this is not necessarily the case. The sum of speeds is denoted by S m−1 i 0 s i . The size of a job J is denoted by p(J). The load L(M i ) of a machine M i is defined as the sum of the sizes of the jobs assigned to machine M i . The completion time of a machine M i is defined as the 2 Note that in this and several of the following papers, the model differs from the model in [14] in that arriving jobs can bypass the buffer and may directly be assigned to a machine. This is equivalent to increasing the buffer size in the model from [14] by 1. We express buffer sizes in terms of the model from [14] here. load L(M i ) of machine M i divided by the speed s i of machine M i . The objective is to minimize the makespan, i.e., the maximum completion time.
As in previous works of Englert et al. [14] and Albers and Hellwig [2], our algorithm attempts to maintain a specific (and not balanced) load distribution on the machines. The desired load on a machine M i is defined by the so-called weight w i of the machine. The weight is defined as Now, r is the smallest positive solution to m−1 i 0 w i 1, i.e., we ensure that the weights of all machines sum up to 1. Due to Corollary 16 in the "Appendix", such a solution always exists. It is important to note that r depends on the number of machines m as well as the machine speeds s 0 , . . . , s m−1 . If s 0 · · · s m−1 1, the weights match those in [2,14] and r : r m is equal to the competitive ratio achieved in [2,14] for m identical machines.
Depending on the speeds of the machines, r can be significantly smaller than r m .
Our results are as follows.
• We prove that a δ Θ(1) exists such that, for m uniform machines with only two different machine speeds, m sufficiently large, no online algorithm can achieve a competitive ratio less than W −1 (−1/e 2 )/(1 + W −1 (−1/e 2 )) + δ ≈ 1.4659 + δ while migrating o(n) jobs. Recall that, for the optimal competitive ratio r m for m identical machines, r m ≤ W −1 (−1/e 2 )/(1 + W −1 (−1/e 2 )) ≈ 1.4659. Hence, the more general problem of uniform machines is strictly harder than the special case of identical machines. The lower bound construction differs from the previous ones for identical machines in [2,14]. The previous constructions used a very large number (1/ε many) of very small jobs (of size ε), which the online algorithm has to schedule on the machines. The adversary then identifies a machine with load of at least w i , i.e., a machine with a load that is not below the "target load" and, roughly speaking, produces just enough large jobs so that one of them has to be assigned to a machine with load w i . Migrating small jobs is ineffective and the large jobs cannot all avoid a machine with load w i . This technique alone however is no longer sufficient to obtain a lower bound that is strictly larger than the known one. Using a larger number of possible continuations of the initial input, we can show that to handle these additional continuations, the online algorithm would have to have a significant number of machines with completion time strictly less than, and bounded away from, w i . But then another machine must have completion time strictly above w i (rather than just equal to w i ). We remark that the same lower bound can be constructed for the reordering buffer model with uniform machines.
• For m uniform machines with speeds 1 s 0 ≤ . . . ≤ s m−1 , our online algorithm achieves a competitive ratio of r + 1/3 with O(m) job migrations. If an efficient algorithm is desired, there is an additional additive loss of ε in the competitive ratio due to the use of a PTAS by Hochbaum and Shmoys [24] in a subroutine. Note that 1 < r ≤ W −1 (−1/e 2 )/(1 + W −1 (−1/e 2 )) ≈ 1.4659, i.e., the competitive ratio is at most an additive 1/3 larger than in the identical machines case. However, depending on the speeds of the machines, r can also be significantly smaller than r m in which case the difference between the competitive ratios can also be smaller than 1/3. The basic structure of our algorithm is similar to the algorithm for the special case of identical machines [2]: Jobs are classified into small and large jobs according to their relative size compared to the total load on all machines. Ignoring the contribution of large jobs, the small jobs are scheduled in such a way that an imbalance with respect to the completion times of the machines is maintained. Roughly speaking, faster machines are kept at lower completion times than slower ones. After all jobs have arrived, some jobs are migrated. The rough intuition is that the largest jobs should be reassigned to improve the solution. For this, we first remove some jobs from machines. Then, we schedule the largest ones optimally for the additive loss of 1/3). Finally, the smaller jobs that were removed from their machines are reassigned greedily one by one. The analysis of this step is also more involved than the corresponding one for identical machines because a more straightforward naive argument would introduce a factor of s m−1 /s 0 into the number of job migrations. Obviously, once we determine which jobs to migrate, we could just assign those jobs optimally to the existing machines. However, it is not clear how to analyze such a procedure directly. We state a specific algorithm for the reassignment step because it provides us with important properties that enable us to analyze the competitive ratio.

Related Work
Minimum makespan scheduling has been extensively studied. See the survey by Pruhs, Sgall, and Torng [29] for an overview. For m identical machines, the currently best upper and lower bounds are 1.9201 [18] and 1.880 [30], respectively. These bounds were the last ones in a long series of successive improvements for general or specific values of m [1,4,5,7,17,21,22,25,31]. For uniform machines, Aspnes et al. [3] present the first algorithm that achieves a constant competitive ratio. Due to Berman, Charikar and Karpinski [6], the best known upper bound on the competitive ratio is 5.828, and, due to Ebenlendr and Sgall [13], the best known lower bound on the competitive ratio is 2.564.
In a semi-online variant of the problem the jobs arrive in decreasing order of their size. The greedy LPT algorithm, which assigns each job to a machine on which it will be completely processed as early as possible, was considered in this setting. For m identical machines, Graham [23] shows that the LPT algorithm achieves a competitive ratio of 4/3−1/(3m). For uniform machines, the LPT algorithm achieves a competitive ratio of 1.66 and a lower bound of 1.52 on its competitive ratio is known [19]. A detailed and tight analysis for two uniform machines is given by Mireault, Orlin, and Vohra [28] and Epstein and Favrholdt [15].
For m identical machines, Albers and Hellwig [2] present an algorithm that is r m -competitive, which is optimal as long as at most o(n) jobs can be migrated. For m ≥ 11, the algorithm migrates at most 7m jobs. For smaller m, 8m to 10m jobs may be migrated. They further give some results on the trade-off between the number of job migrations and the competitive ratio. For example, 2.5m job migrations are sufficient to achieve a competitive ratio of 1.75.
Tan and Yu [33] study two identical machines. They give a tight bound of 4/3 on the competitive ratio and this bound is achievable by migrating a single job. They also explore two other models. One in which, at the end, for each machine, the last job that was assigned to the machine may be migrated. And another in which, at the end, the k jobs that arrived last in the input may be migrated.
Chen et al. [8] give an optimal algorithm for two uniform machines. Using independent techniques and algorithms, Wang et al. [34] show bounds which are similar, but not quite optimal for all machine speeds. Both improve upon work by Liu et al. [27].
Dósa et al. [12] consider a variant in which up to k jobs can be migrated after every job arrival, which is a relaxation of online scheduling with a reordering buffer of size k. Sanders, Sivadasan, and Skutella [32] introduce another model in which, after every job arrival, a number of jobs can be reassigned as long as the total size of the reassigned jobs is bounded by some linear function of the size of the arriving job.
Numerous variants related to online minimum makespan scheduling with reordering buffers have been studied. Kellerer et al. [26] present, for two identical machines, an algorithm that achieves an optimal competitive ratio of 4/3 with a reordering buffer of size 2, i.e., the smallest buffer size allowing reordering.
For m identical machines, Englert et al. [14] present a tight and, in comparison to the problem without reordering, improved bound on the competitive ratio for minimum makespan scheduling with reordering buffers. Depending on m, their scheduling algorithm achieves the optimal competitive ratio r m with a buffer of size Θ(m). Further, they show that larger buffer sizes do not result in an additional advantage and that a buffer of size Ω(m) is necessary to achieve this competitive ratio.
Ding et al. [9] give, for m identical machines, a 1.5-competitive algorithm with a buffer of size 1.5m + 1 and, for three identical machines, a (15/11)-competitive algorithm with a buffer of size 7.
Dósa and Epstein [10] study minimum makespan scheduling on two uniform machines with speed ratio s ≥ 1. They show that, for any s > 1, a buffer of size 3 is sufficient to achieve an optimal competitive ratio (i.e. even a larger buffer cannot result in a smaller competitive ratio) and, in the case s ≥ 2, a buffer of size 2 already allows to achieve an optimal ratio. Dósa and Epstein [11] further study preemptive scheduling, as opposed to nonpreemptive scheduling, on m identical machines with a reordering buffer. They present a tight bound on the competitive ratio for any m. This bound is 4/3 for even values of m and slightly lower for odd values of m. They show that a buffer of size Θ(m) is sufficient to achieve this bound, but a buffer of size o(m) does not reduce the best overall competitive ratio of e/(e − 1) that is known for the case without reordering.
Epstein, Levin, and van Stee [16] study the objective to maximize the minimum completion time. For m identical machines, they present an upper bound on the competitive ratio of H m−1 + 1 for a buffer of size m and a lower bound of H m for any fixed buffer size. For m uniform machines, they show that a buffer of size m + 2 is sufficient to achieve the optimal competitive ratio m.

Lower Bounds
exists such that, for m uniform machines with only two machine speeds, m sufficiently large, no online algorithm can achieve a competitive ratio of less than W −1 (−1/e 2 )/(1 + W −1 (−1/e 2 )) + δ ≈ 1.4659 + δ while migrating o(n) jobs, where n denotes the total number of arriving jobs.
Proof Only two machine speeds 1 and 3/2 are used. Let m s denote the number of slow machines with speed 1 and m f m − m s denote the number of fast machines with speed 3/2. Note that the sum of speeds S m s + 3/2 · m f . Define m s in such a way that m s (r ∞ − 1)/r ∞ · S , with r ∞ W −1 (−1/e 2 )/(1 + W −1 (−1/e 2 )) ≈ 1.4659. Consider an online algorithm A that uses at most k(n) o(n) job migrations. We start with the following initial input sequence: S/ε small jobs of size ε > 0 arrive. Depending on the actions of the online algorithm up to at most m additional larger jobs arrive later on. Therefore, in total our input sequence will contain no more than S/ε+m jobs (i.e. S/ε ≤ n ≤ S/ε+m). In the remainder of the proof, we will frequently use that lim ε→0 + ε ·k(n) 0 which is a simple consequence of this. Let M 0 , . . . , M m−1 denote the m uniform machines on which A has scheduled these jobs. Let s 0 , . . . , s m−1 denote the respective speeds of these machines, with According to this order of the machine speeds, define the weight w i of a machine M i .
In the following, we show that the competitive ratio of A is at least r + 1/19 · (r − 1) 4 /r 3 . Due to Observation 17 in the "Appendix", lim m→∞ r r ∞ , as long as all machine speeds are upper bounded by some constant which is independent of m. Hence, for m sufficiently large, 1/19·(r −1) 4 /r 3 Θ(1). As a consequence, for m sufficiently large, there exists a δ Θ(1) such that no online algorithm can achieve a competitive ratio of less than r ∞ + δ.
Due to Corollary 16 in the "Appendix", 1 < r ≤ r ∞ ≈ 1.4659. This gives the following observation.
The lower bound construction for the identical machines case, is based on the following idea: there must exist a machine M with load of at least w · S after the initial sequence, since otherwise, the total scheduled load would be strictly less than m−1 i 0 w i · S S. Since at most k(n) of these jobs can be migrated at the end, at least w · S/ε − k(n) of them are guaranteed to stay on M which is still almost all the load for sufficiently small ε since lim ε→0 + ε · k(n) 0. The high load on M can now be exploited by continuing the input sequence in the right way.
However, for uniform machines we now want to get a larger lower bound than for the identical machine case. Hence, a significant contribution is the following lemma that gives an improved lower bound on the completion time. Specifically, it shows a lower bound on the completion time that is larger than the original w /s · S by an additive 1/19 · (r − 1) 3 /r 2 , resulting in an improved lower bound on the competitive ratio of A.

Lemma 3
After the initial input sequence, a machine M with completion time of at least w /s · S + 1/19 · (r − 1) 3 /r 2 exists.
Proof We show that the lemma holds as otherwise a continuation of the input sequence that leads to a contradiction to A being r A -competitive exists. We distinguish two cases.
• The number of fast machines with weight w i 3/2 · r /S is at least 2/11 · (r − 1)/r · S : In addition, m f − 1/11 · (r − 1)/r · S large jobs of size 3/2 · S/S ε ≥ 3/2 arrive, with An optimal offline algorithm can schedule each large job on a separate fast machine and evenly distribute the small jobs among the remaining machines. These remaining machines, among which the small jobs are distributed, consist of all m s slow machines and the 1/11 · (r − 1)/r · S fast machines that do not get assigned any of the large jobs. Therefore, the sum of their speeds is exactly S ε . Hence, the optimal makespan is at most S/S ε + ε. If, in the final schedule after migrations, A schedules one large job on a slow machine or two large jobs on the same fast machine, the completion time of such a machine is at least 3/2 · S/S ε and, therefore, the competitive ratio of A is at least which is strictly larger than r A if ε is sufficiently small. As a consequence, A schedules each of the large jobs on a separate fast machine. Let U be the set of such machines which have weight w i 3/2 · r /S. Then for any machine M i ∈ U, for the load L ε (M i ) on M i caused by small jobs, since otherwise the completion time of M i is at least which is a contradiction to A being r A -competitive. For the fourth step, recall that and for steps seven and nine, note that Observation 2 gives 3 · (r − 1)/r < 1. The number of large jobs that are scheduled on a machine with weight 3/2 · r /S is for S m s + 3/2 · m f sufficiently large. We conclude that there must be a machine M / ∈ U such that which is a contradiction to the fact that the total size of all small jobs combined is S. • The number of fast machines with weight w i 3/2 · r /S is at most 2/11 · (r − 1)/r · S − 1: In addition, m f + 1/2 · m s large jobs of size S/S ε ≥ 1 arrive, with An optimal offline algorithm can schedule each large job on a separate machine of the set of all fast and 1/2 · m s slow machines. Now, the fast machines can process additional jobs while the slow machines are working on large jobs. Therefore, the small jobs can be distributed among the remaining slow machines and the fast machines, which give a weighted sum of speeds of S ε . Hence, the optimal makespan is at most S/S ε + ε. If A schedules two large jobs on the same slow machine or three large jobs on the same fast machine, the competitive ratio of A is at least which is strictly larger than r A if ε is sufficiently small. As a consequence, A schedules at most one large job on each slow machine and at most two large jobs on each fast machine. Let U be the set of all slow machines that have weight w i r /S and receive one large job and all fast machines that receive two large jobs. Then for any slow machine M i ∈ U, for the load L ε (M i ) on M i caused by small jobs, since otherwise the completion time of M i is at least which is a contradiction to A being r A -competitive. For the second step, recall that and note that the last step follows form Observation 2. In addition, for any fast machine M i ∈ U, for the load L ε (M i ) on M i caused by small jobs, since otherwise the completion time of M i is at least which is a contradiction to A being r A -competitive. For the second step, note that by the definition of the weights, w i ≥ s i · (r − 1)/S for all i. If the number of fast machines with weight w i 3/2·r /S is at most 2/11·(r −1)/r ·S −1 (as is the case here), then their combined speed is at most 3/2· 2/11·(r −1)/r · S − 3/2. The sum of the speeds of all machines with weight w i 3/2·r /S is at least S ·(r −1)/r −3/2 by the definition of the weights. Then the number of slow machines with weight 3/2 · r /S is at least S · (r − 1)/r − 3/2 − (3/2 · 2/11 · (r − 1)/r · S − 3/2) S · (r − 1)/r − 3/2 · 2/11 · (r − 1)/r · S . We conclude that the number of slow machines with a weight different from 3/2·r /S is at most m s − S · (r − 1)/r + 3/2 · 2/11 · (r − 1)/r · S . Thus, for the m s /2 + m f large jobs, the number of large jobs that are scheduled on a slow machine with weight r /S or together with another large job on a fast machine is The second step holds for S m s + 3/2 · m f sufficiently large. For the fourth step, note that, for m sufficiently large, (r ∞ − 1)/r ∞ − (r − 1)/r ≤ 2/105 · (r − 1)/r , since (r − 1)/r ≤ (r ∞ − 1)/r ∞ and lim m→∞ r r ∞ . We conclude that there must be a machine M / ∈ U such that which is a contradiction to the fact that the total size of all small jobs combined is S.
Let M denote a machine which, after the initial input sequence of jobs of size ε, has a completion time of at least w /s · S + 1/19 · (r − 1) 3 /r 2 . We distinguish two cases.
• w s · r /S: No more jobs arrive. An optimal offline algorithm can evenly distribute all jobs among the machines. Hence, the optimal makespan is at most S/S + ε 1 + ε. Finally, the competitive ratio of A is at least which is strictly larger than r A if ε is sufficiently small. If A schedules one large 3/2-job on a slow machine or two large jobs on the same machine, the competitive ratio of A is at least which is strictly larger than r A if ε is sufficiently small.
If m f > 2/3 · (S − −1 j 0 s j ) , the number of 3/2-jobs that arrive is greater than the number of fast machines M which have an index of ≥ . Since these jobs can only be scheduled on fast machines, at least one of them has to be scheduled on a machine with index < . If m f ≤ 2/3 · (S − −1 j 0 s j ) the number of 3/2-jobs that arrive is equal to the total number of fast machines m f . If there exists a fast machine which has an index ≤ , at least one of these jobs has to be scheduled on such a machine. On the other hand, if all fast machines have an index of > , then we observe that the total number of 1-jobs and 3/2-jobs is m f +m s − −1 j 0 s j m − . Hence, at least one of the jobs has to be scheduled on a machine with index ≤ (and this machine is slow). We conclude that A schedules at least one large x-job, with x ∈ {1, 3/2}, on a machine with speed x that, after the initial assignment of the jobs of size ε, that, after the initial assignment of the jobs of size ε, already has a completion time of at least w /s · S + 1/19 · (r − 1) 3 /r 2 .
By definition of w , −1 j 0 s j /S ≥ (r − 1)/r . Finally, the competitive ratio of A is at least which is strictly larger than r A if ε is sufficiently small.
Proof Let 1 < r < 2 and c − ln(2−r )/ ln r ≥ 2. For each 0 ≤ i ≤ c−1, there are m/c machines with speed r i . Add machines of speed 1 such that there are m machines in total. Consider an online algorithm A that migrates at most k (m − c)/(c 2 + c) jobs.
The input sequence consists of at most c consecutive phases. In phase 0 ≤ i ≤ c−1, m/c jobs of size r i arrive. Let k i denote the number of jobs of size r i that are assigned by A to machines with speed strictly less than r c−1 or to machines where at least one job of size r i is already scheduled. If k i > k, stop at the end of this phase. Otherwise, if i < c − 1, continue with phase i + 1.
If the input sequence stops at the end of phase 0 ≤ i ≤ c − 1 due to the fact that k i > k, the competitive ratio of A is at least Otherwise, we focus on the m/c machines with speed r c−1 . In each phase i, at least m/c −k of these machines are assigned a job of size r i . This means that after the last phase, there must be m/c − c · k such machines which each were assigned one job from each phase. We can remove jobs from at most k such machines in the migration phase. Therefore, after the migration phase, at least machines with speed r c−1 exist, to which, for each 0 ≤ i ≤ c − 1, A has assigned at least one job of size r i . Hence, the competitive ratio of A is at least

Scheduling Algorithm
For m uniform machines with speeds 1 s 0 ≤ . . . ≤ s m−1 , our algorithm consists of two phases: In the scheduling phase, arriving jobs are assigned to (or scheduled on) machines online. In the migration phase, which starts after all jobs have arrived, some jobs are removed from their machines and reassigned to other machines.
More specifically, the scheduling phase consists of steps 1, . . . , n, where n denotes the total number of arriving jobs. In step t, the t-th job arrives and is assigned to a machine. For t > 1, let T t denote the total size of the t − 1 jobs that have arrived up to and including step t − 1. In addition, define · m), where b is a constant that will be defined later. Otherwise, J is called large in step t. Note that during the scheduling phase, a job that is large in step t can become small in step t + 1.
Further, let T s t denote the total size of the jobs that have arrived up to and including step t − 1 and that are small in step t. Finally, let L t (M i ) denote the total size of the jobs that are scheduled on machine M i at the end of step t − 1, i.e., after the (t − 1)-th job is assigned to a machine, and let L s t (M i ) denote the total size of the jobs that are scheduled on machine M i at the end of step t − 1 and that are small in step t.
We use two different algorithms. The first algorithm, which is used when s m−1 > 3/4 · S, schedules every job on machine M m−1 and does not migrate any jobs. The second algorithm, which is used when s m−1 ≤ 3/4 · S, is more interesting and works as follows.
• Scheduling phase: The t-th arriving job J is scheduled in step t as follows. The removed jobs can now be reassigned optimally to the machines, i.e., in such a way that the resulting makespan is minimized. However, as stated before, it is difficult to analyze the resulting makespan directly. In the following, we therefore present a more specific procedure for this reassignment step which provides us with certain properties that enable us to analyze the competitive ratio. The resulting bound is of course also an upper bound on the competitive ratio achieved through an optimal reassignment.  (1) and (2).) Finally, for each 0 ≤ i ≤ m − 1, assign the jobs from M i to the real machine M i . (2) Those removed jobs that are small at time n + 1 are scheduled according to the greedy algorithm that assigns a job to a machine finishing it first.

Observation 5
For the migration phase, the following observations can be made.
(1) Sorting according to the load does not increase the makespan.
(2) We can assume that, for each  (1). Further, this process terminates, since after each iteration there is one more machine with no load. (3) Assume for contradiction that, for each c + 1 ≤ j ≤ m − 1, L(M j )/s j > 2/3 · OPT . This yields the following contradiction to the fact that M c is critical: Then, after each reassignment in step (1b), for each 0 ≤ i ≤ m − 1, L(M i )/s i ≤ 4/3 · OPT due to items (3) and (1).

Analysis of the Algorithm
The analysis of the algorithm consists of two parts. The first part provides a bound on the number of migrated jobs. The second part provides a bound on the competitive ratio of the algorithm. These two parts together give the following theorem.

Bounding the Number of Migrated Jobs
The following lemma gives an upper bound on the number of jobs removed from a single machine.
. Such a time t exists because the condition is met for t 1. Note that the condition is slightly different than the negation of the condition for job removals in the migration phase because we are using L s t (M i ) rather than L t (M i ) in the first part. We do this so that the first part of the condition aligns with the condition for the placement of small jobs in the scheduling phase.
It is sufficient to remove the following jobs from M i to guarantee L( (a) All jobs that are large at time t and are scheduled on M i before the arrival of the t-th job and (b) all jobs assigned to M i in step t or after.
At any time t (before the arrival of the t -th job), there are at most b · m · s i /S jobs that are large at time t scheduled on M i . Suppose this is not true and let t be the first time at which this is not true. Then there were b · m · s i /S jobs of size greater than T t /(b · m) scheduled on M i at time t − 1 and in step t − 1 one more such job J is assigned to M i . However, before the assignment of J, the load of M i is L t −1 (M i ) > T t · s i /S ≥ T t −1 · s i /S. Then M i cannot be a machine with minimum completion time among all machines in step t and therefore a large job J would not be assigned to it. We conclude that at most b · m · s i /S jobs are removed in (a).
To bound the number of jobs removed in (b), we observe that in steps t + 1, . . . , n our algorithm only allocates jobs to M i that are large at the time of allocation. This is due to the fact that by definition of t, for each t ≥ t + 1, L s t (M i ) > w i · T s t . Therefore, whenever a job J is assigned to M i in a step t ≥ t + 1, it is a large job, which is assigned to a machine of minimum completion time. But then, for each 0 ≤ j ≤ m −1, Since job J is large at the time of assignment, its size has to be greater than (r − 1) · T n+1 /(b · m). After assigning b · m · s i /(S · (r − 1)) such jobs to M i in steps after t, the load of M i exceeds T n+1 · s i /S. After that, no further such jobs are assigned to M i , because a machine with load greater than T n+1 · s i /S can never be a machine that has the smallest completion time among all machines. We conclude that, at most b · m · s i /(S · (r − 1)) + 1 jobs are removed in (b), where the additive 1 is due to the job that is assigned to machine M i in step t.
In total, it is sufficient to remove these b · m · s i /S + b · m · s i /(S · (r − 1)) + 1 r /(r − 1) · b · m · s i /S + 1 many jobs, and, because the algorithm removes jobs from M i in decreasing order of size, the number of jobs removed is bounded by the same number.
For the remainder of the paper, we consider the case s m−1 ≤ 3/4 · S. The following lemma shows that, at the end of step (1b), there are no critical machines. In fact, it gives a lower bound on m−1 j 0 L(M j ).

Lemma 8 At the end of step (1b), for each
Proof Clearly we have because OPT ≤ OPT (optimally scheduling a subset of all jobs can only result in a smaller makespan than optimally scheduling all jobs). Therefore, it only remains to show If C ∅, the lemma is true by definition of C. In the following, we consider the case C ∅. At the end of step (1b), for each 0 ≤ j ≤ c, L(M j ) 0 and, as a consequence, the lemma is true for these machines. In the following, we show that the lemma is true for M c+1 , . . . , M m−1 after each reassignment in step (1b), if it is true for these machines before this reassignment. Initially, at the beginning of step (1b), for each c + 1 ≤ j ≤ m − 1, M j is not critical by definition of c, i.e., the lemma is true for M j . Now, consider a reassignment in step (1b). For each 0 ≤ j ≤ m − 1, let L(M j ) and L(M j ) denote the load of machine M j before and after this reassignment, respectively. Assume that the lemma is true for M c+1 , . . . , M m−1 before this reassignment.
In this reassignment, all jobs from M i , with 0 ≤ i ≤ c, are reassigned to M , with Then, re-sort the loads of the machines again. Specifically, since, by definition of , for each In the following, we consider the caseL(M x )/s x > OPT .
Proof Assume for contradiction that there exists a x +1 ≤ j ≤ m −1 with L(M j )/s j < 4/5 · OPT . Then, i.e., 4/5 · s j > s x ≥ s . This yields the following contradiction to the fact that all jobs from M i are reassigned to M : < x + 1 ≤ j and since, by definition of , Due to the fact that M c is critical, Hence, As a consequence, Altogether, where the second Step uses Observation 5 item (2) and Observation 9, the fourth step uses x j c+1 s j ≥ 4/5 · m−1 j x+1 s j , and the fifth step usesL(M x )/s x ≤ 4/3 · OPT which holds due to Observation 5 item (4).
Next, we give a bound on the makespan at the end of step (1) of the migration phase. We distinguish two cases.
• L(M i ) ≤ (r − 1) · T n+1 · s i /S after the removal of jobs: Then, L(M i ) ≤ w i · T s n+1 after the removal of jobs. S · OPT is an upper bound on the total size of all jobs in the input and the virtual machines only contain jobs which are large at time n + 1. Therefore T s n+1 ≤ S · OPT − m−1 j 0 L(M j ). We distinguish two sub-cases.
• w i s i · r /S: By definition of w i , i−1 j 0 s j ≤ (r − 1)/r · S and, as a consequence, Then we can bound the completion time of machine M i at the end of step (1) of the migration phase as follows: where the second step uses Lemma 8.
Then we can bound the completion time of machine M i at the end of step (1) of the migration phase as follows: where the second step uses Lemma 8, the third step uses m−1 j i s j S − i−1 j 0 s j and 4/3 · OPT − L(M i )/s i ≥ 4/3 · OPT − L(M i )/s i ≥ 0 which holds due to Observation 5 item (4), and the fourth step uses i−1 j 0 s j ≥ (r − 1)/r · S. In all cases, the makespan is at most (r + 1/3) · OPT at the end of step (1) of the migration phase.
Finally, we analyze the makespan at the end of step (2) of the migration phase. We start with the following observation. Proof Assume for contradiction that, for each m b ≤ j ≤ m − 1, L(M j )/s j > ( √ b + 1)/ √ b · OPT. This yields the following contradiction: Consider a removed job J that is scheduled in step (2) of the migration phase. Since J is small at time n + 1, p(J ) ≤ T n+1 /(b · m) ≤ OPT · S/(b · m). According to Observation 10, there exists a machine M i with m b ≤ i ≤ m − 1 and completion time of at most ( In step (2) of the migration phase, J is assigned to a machine finishing it first. Then, we can bound the completion time of this machine after J is assigned to it as follows: At the end of the migration phase, the makespan is at most max{r + 1/3, (1 + 1/ √ b) 2 } · OPT. Recall that 1 < r ≤ W −1 (−1/e 2 )/(1 + W −1 (−1/e 2 )) ≈ 1.4659. For example, for b 8.5827, (1+1/ √ b) 2 ≤ 1.4659+1/3, and, for b 41.7847, (1+1/ √ b) 2 ≤ 4/3.
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/ by/4.0/.

Appendix: Properties of r
For y ≥ 1, define Further, for each 0 ≤ i ≤ m − 1, define c i i−1 j 0 s j . Then, for each 0 ≤ i ≤ m − 1, w i s i · f (c i , r ).

Observation 11
For any x < S, f (x, y) is continuous and monotonically increasing in y.
Proof For any fixed x ≤ 0, f (x, y) y/S is continuous and monotonically increasing in y. For any fixed 0 < x < S, each of the branches is continuous and monotonically increasing in y and for the limits at y S/(S − x): Observation 12 For any y > 1, f (x, y) is continuous and monotonically decreasing in x.