Online Non-Preemptive Scheduling to Minimize Weighted Flow-time on Unrelated Machines

In this paper, we consider the online problem of scheduling independent jobs \emph{non-preemptively} so as to minimize the weighted flow-time on a set of unrelated machines. There has been a considerable amount of work on this problem in the preemptive setting where several competitive algorithms are known in the classical competitive model. %Using the speed augmentation model, Anand et al. showed that the greedy algorithm is $O\left(\frac{1}{\epsilon}\right)$-competitive in the preemptive setting. In the non-preemptive setting, Lucarelli et al. showed that there exists a strong lower bound for minimizing weighted flow-time even on a single machine. However, the problem in the non-preemptive setting admits a strong lower bound. Recently, Lucarelli et al. presented an algorithm that achieves a $O\left(\frac{1}{\epsilon^2}\right)$-competitive ratio when the algorithm is allowed to reject $\epsilon$-fraction of total weight of jobs and $\epsilon$-speed augmentation. They further showed that speed augmentation alone is insufficient to derive any competitive algorithm. An intriguing open question is whether there exists a scalable competitive algorithm that rejects a small fraction of total weights. In this paper, we affirmatively answer this question. Specifically, we show that there exists a $O\left(\frac{1}{\epsilon^3}\right)$-competitive algorithm for minimizing weighted flow-time on a set of unrelated machine that rejects at most $O(\epsilon)$-fraction of total weight of jobs. The design and analysis of the algorithm is based on the primal-dual technique. Our result asserts that alternative models beyond speed augmentation should be explored when designing online schedulers in the non-preemptive setting in an effort to find provably good algorithms.


Introduction
In this work, we study the fundamental problem of online scheduling of independent jobs on unrelated machines. Jobs arrive over time and the online algorithm has to make the decision which job to process non-preemptively at any time on each machine. A job j is released at time r j and takes p ij amount of processing time on a machine i. Further, each job has a weight w j that denotes its (relative) priority. Our aim is to design a non-preemptive schedule that minimizes the total weighted flow-time (or response time) quantity, i.e., j w j (C j − r j ) where C j denotes the completion time of job j.
We are interested in designing online non-preemptive scheduling problem in the worst-case model. Several strong lower bounds are known for simple instances [2,4]. The main hurdle arises from two facts: the algorithm must be online and robust to all problem instances and the algorithmic decisions made should be of irrevocable nature. In order to overcome the strong theoretical lower bound, Kalyanasundaram and Pruhs [7] and Phillips et al. [10] proposed the analysis of scheduling algorithms in terms of the speed augmentation and machine augmentation, respectively. Together these augmentation are commonly referred to as resource augmentation. Here, the idea is to either give the scheduling algorithm faster processors or extra machines in comparison to the adversary. For preemptive problems, these models provide a tool to establish a theoretical explanation for the good performance of algorithms in practice. In fact, many practical heuristics have been shown to be competitive where the algorithm is given resource augmentation. In contrast, problems in the nonpreemptive setting have resisted against provably good algorithms even with such additional resources [9].
Choudhury et al. [5] proposed a new model of resource augmentation where the online algorithm is allowed to reject some of the arriving jobs, while the adversary must complete all jobs. Using a combination of speed augmentation and rejection, Lucarelli et al. [9] break this theoretical barrier and gave a scalable algorithm for non-preemptive weighted flow-time problems. However, it remains an intriguing question about the power of rejection model in comparison to the previous ones.
Recently, Lucarelli et al. [8] showed that a O(1) competitive algorithm exists if all jobs have unit weight and one only rejects a constant fraction of the jobs. Their algorithm and analysis are closely tied to the unweighted case and there is no natural extension to the case where jobs have weights. The question looms, does there exist a constant competitive algorithm for non-preemptive scheduling to minimize weighted flow-time using rejection?

Our Result and Approach
This paper gives the first algorithm with non-trivial guarantees for minimizing weighted flow time using rejection and no other form of resource augmentation. The main result of the paper is the following theorem. The theorem shows that constant competitiveness can be achieved by only rejecting a small faction of the total weight of the jobs. The algorithmic decisions are classified into three parts: dispatching, rejecting and scheduling policy. The scheduling follows HDF policy (Highest Density First) once jobs are assigned to the machines. At the arrival of a job, for each machine, the algorithm computes an approximate increase in the weighted flow-time and assigns the job to the machine with the least increase in the approximate weighted flow-time. To compute this quantity for a given machine, the algorithm considers the set of uncompleted jobs in the machine queue in the non-increasing order of densities and uses two different rejection policies.
The first rejection policy, referred as the preempt rule, rejects jobs that have already started processing if the total weight of newly arrived "high priority" jobs (high density jobs) exceeds a given threshold. Specifically, when a job starts executing, we associate a counter that keeps tracks of the total weight of newly arrived jobs. Once the value of this counter is at least 1/ times the weight of the current executing job, the algorithm preempts the current executing job and rejects it. The rejected job is pushed out of the system so as to be never executed again.
We emphasize here a critical issue due to job rejection which is of different nature to speed augmentation. Observe that rejecting a job that has already started processing may cause a large decrease in the weighted flow-time of the jobs in the machine queue. Due to job arrivals and job rejections, quantities associated to the machine queue (for example the remaining job weight, etc) vary arbitrarily without any nice properties like monotonicity. That creates a significant challenge in the dual fitting analysis. To tackle this problem, we introduce the notion of definitive completion time for each job. Once a job is rejected or completed before its definitive completion time, the algorithm removes the job from the queue of the machine. However, for the purpose of analysis, the rejected jobs are still considered in the definition of dual variables until their definitive completion time. This ensures that for any fixed time, the weight of jobs not yet definitively completed increases with the arrival of new jobs (see Section 3.4 for details).
The second rejection policy, referred as the weight-gap rule, rejects unprocessed "low priority" jobs (small density jobs) from the machine's queue. This policy simulates the -speed-augmentation. In the particular case where all jobs have the same weight, this rejection policy rejects a "low priority" job for every 1/ arrivals of new jobs. Due to the scheduling policy, if a "low priority" job is not rejected, then it will be completed last in the schedule (assuming no future job arrivals).
In the algorithm's schedule, future arriving jobs do not delay the rejected low priority jobs, while the later ones need to be completed in the adversary's schedule. This is where the algorithm benefits from the power of rejection. Specifically, the algorithm can use the difference between the rejection time and the definitive completion time of jobs to create a similar effect to speed augmentation. The key idea is to reject the low priority jobs so their total weight is comparable to jobs that arrive after them.
The definitive completion times play a crucial role so that the dual achieves a substantial value compared to the primal. By carefully choosing the definitive completion times of jobs, we manage to prove the competitive ratio of our algorithm with admittedly sophisticated analysis.

Related Works
The problem of minimizing the total weighted flow-time has been extensively studied in the online scenario. For the preemptive problem, Chekuri et al. [4] presented a semi-online O(log 2 P )-competitive algorithm for a single machine, where P is the ratio of the largest to the smallest processing time of the instance. Later, Bansal and Dhamdhere [3] proposed a O(log W )-competitive algorithm, where W is the ratio between the maximum and the minimum weights of the jobs. This was later improved in [2]. In contrast to the singlemachine case, Chekuri et al. [4] showed a Ω(min( √ P , √ W , n m 1 4 )) lower bound for m identical machines. For the online non-preemptive problem of minimizing the total weighted flow-time, Chekuri et al. [4] showed that any algorithm has at least Ω(n) competitive ratio for single machine where n is the number of jobs.

59:4 Online Non-Preemptive Scheduling to Minimize Weighted Flow-time
In speed-augmentation model, Anand et al. [1] presented a scalable competitive algorithm for the preemptive problem on a set of unrelated machines. For the non-preemptive setting, Phillips et al. [10] gave a constant competitive algorithm in identical machine setting that uses m log P machines (recall that the adversary uses m machines). They also showed that there exists a O(log n)-machine O(1)-speed algorithm that returns the optimal schedule for the unweighted flow-time objective. Epstein et al. [6] proposed an -machines O(min{ √ P , √ n})competitive algorithm for the unweighted case on a single machine. This algorithm is optimal up to a constant factor for constant .
Lucarelli et al. [9] presented a strong lower bound on the competitiveness for the weighted flow-time problem on a single machine that uses arbitrarily faster machine than that of the adversary. Choudhury et al. [5] extended the resource augmentation model to allow rejection, according to which the algorithm does not need to complete all jobs and some of them can be rejected. Using a combination of speed augmentation and rejection, Lucarelli et al. [9] gave a constant competitive algorithm for the weighted flow-time problem on a set of unrelated machines. In particular, they showed that there exists a O(1/ 2 )-competitive algorithm that uses machines with speed (1 + ) and rejects at most an -fraction of jobs for arbitrarily small > 0. Recently, Lucarelli et al. [8] provided a scalable competitive algorithm for the case of (unweighted) flow time where there is no speed augmentation.

Problem definition
We are given a set M of unrelated machines and a set of jobs J that arrive online. Each job j is characterized by its release time r j and its weight w j . If job j is executed on machine i, it has a processing requirement of p ij time units. The goal is to schedule jobs non-preemptively. Given a schedule S, the completion time of the job j is denoted by C S j . The flow-time of j is defined as F S j = C S j − r j , which is the total amount of time job j remains in the system. The objective is to minimize the weighted flow-times of all jobs, i.e., j∈J w j F S j . In the following section we formulate this problem as a linear program.

Linear Programming Formulation
The LP formulation presented below is an extension of those used in the prior works of [1,9]. For each job j, machine i and time t ≥ r j , there is a binary variable x ijt which indicates if j is processed or not on i at time t. The problem of minimizing weighted flow-time can be expressed as: The objective value of the above integer program is at most a constant factor than that of the optimal preemptive schedule. The above integer program can be relaxed to a linear program by replacing the integrality constraints of x ijt with 0 ≤ x ijt ≤ 1. The dual of the relaxed linear program can be expressed as follows: For the rejection model considered in this work, it is assumed that the algorithm is allowed to reject jobs. Rejection can be interpreted in the primal LP by only considering constraints corresponding to non-rejected jobs. That is, the algorithm does not have to satisfy the constraint (1) for rejected jobs.

Notations
In this section, we define notations that will be helpful during the design and analysis of the algorithm.
t − denotes the time just before t that is, t − = t − for an arbitrarily small value of > 0. U i (t) denotes the set of pending jobs at time t on machine i, i.e., the set of jobs dispatched to i that have not yet completed and also have not been rejected until t. κ i (t) denotes the job currently executing on machine i at time t.
Throughout this paper, we assume that the jobs in V i (t) are indexed in non-increasing order of their densities that δ i1 ≥ δ i2 , . . . , ≥ δ i|Vi(t)| . ν i (t) denotes the smallest density job in V i (t). R 1 i (a, b) denotes the set of jobs rejected due to the prempt rule (to be defined later) during time interval (a, b]. In particular, R 1 i (t) is the set of job rejected at time t due to the prempt rule. Similarly, R 2 i (a, b) denotes the set of jobs rejected due to the weight-gap rule (also to be defined later) during time interval (a, b]. In particular, R 2 i (t) is the set of job rejected at time t due to the weight-gap rule. q ij (t) denotes the remaining processing time of j at a time t on machine i. δ ij is the density of a job j on machine i that is δ ij = wi pij . S j denotes the starting of job j on some machine i. If a job is rejected before it starts executing, set S j = ∞. By the previous definitions, it follows that

The Algorithm
In this section, we describe our algorithm. Specifically, we explain how to take the following decisions: dispatching that is to decide the machine assignment of jobs; scheduling that is to decide which jobs to process at each time; and rejection. The algorithm is denoted by A. Let 0 < < 1 be an arbitrarily small constant. Note that the proposed algorithm rejects an O( )-fraction of the total weight of jobs and dispatches each job to a machine upon its arrival.

59:6
Online Non-Preemptive Scheduling to Minimize Weighted Flow-time

Scheduling policy
At each time t if the machine i is idle either due to the rejection of a job or due to the completion of a job, then the algorithm starts executing the job j with the highest density among all the jobs in U i (t), i.e. j = arg max h∈Ui(t) δ ih . In case of ties, the algorithm selects the job with the earliest release time.

Rejection policies
Our algorithm uses two different rules for rejecting jobs. The first rule called as the preempt rule, bounds the total weight of "high priority" jobs that arrive during the execution of a job. The second rule called as the weight-gap rule, helps the algorithm to balance the total amount of weight of low density jobs. The algorithm associates two counters, count 1 j and count 1 j , with each job j which are both initialized to 0 at r j .

Preempt rule:
Let j = κ i (t) be the job processing on i at time t. During the processing of j, if a new job j is dispatched to i then count 1 j is incremented by w j . Let k be the earliest job released and dispatched to machine i during the execution of j such that count 1 j ≥ w j / , if it exists. At r k , the algorithm interrupts the processing of j and rejects it, that is R 1 i (r k ) = {j}. If no job is rejected due to the preempt rule at r k , then we set R 1 i (r k ) = ∅.

Weight-gap rule:
We associate a function W i (t) : R + → R + with each machine i which is initialized to 0 for every t. Informally W i (t) represents the total budget for future rejections. If a job j is dispatched to machine i then W i (t) for t ≥ r j is updated according to the following policy.
Assume that the jobs in V are indexed in non-increasing order of their densities that is, δ i1 ≥ δ i2 ≥ . . . ≥ δ iν , where the job with index ν is the smallest density job in V . Note that the job j is included in this ordering. Let s be the smallest index in {1, 2, . . . , ν} such that: We say that no such job with index s exists if and only if w ν > (W i (t − )+w j ). Algorithm 1 defines the set of jobs R 2 i (r j ). The algorithm rejects the jobs in R 2 i (r j ) and updates W i (t) as follows: The following lemma describes some properties arising due to the weight-gap rule.

Lemma 2.
The following properties hold. if j is not the smallest density job in V then 3: No job is rejected that is, R 2 i (r j ) := ∅ 4: else 5: {j is the smallest density job in V that is, j is the job with index ν} 6: if p ij ≥ p i(ν−1) then 8: No job is rejected that is, R 2 i (r j ) := ∅ 9: else 10: if count 2 (ν−1) ≥ w (ν−1) then 12: Proof. From preempt rule, it follows that each job j can be associated with a set of jobs such that their total weight is at most w j / . For every pair of j, j and j = j , the intersection of the associated sets is empty and hence the lemma follows.

Dispatching policy
When a new job j arrives, a variable ∆ ij is set. Intuitively, ∆ ij is the approximate increase in the total weighted flow-time objective if the job j is assigned to the machine i and j is not rejected. Then, ∆ ij is defined as follows.
is not rejected currently due to preempt rule} 59:8 Online Non-Preemptive Scheduling to Minimize Weighted Flow-time is currently rejected due to the preempt rule} The first term corresponds to the flow-time of the new job j due to waiting on jobs with higher density than δ ij in V i (r j ). The second term corresponds to the delay of the jobs in V i (r j ) with smaller density than δ ij . The third and the fourth terms give corrections depending on whether job κ i (r − j ) is rejected due to the preempt rule. We now describe the dispatching policy of jobs to machines. At the arrival time of a job j, we hypothetically assign j to every machine i and compute the variables α ij . Finally, we assign j to the machine that minimizes α ij . For notional purposes, we put an additional apostrophe to previously defined variables. The additional apostrophe stands for the fact that these variables correspond to the case where we hypothetically assign j to i. For example, R 2 i (r j ) denote the set of rejected jobs due to the weight-gap rule when j is hypothetically assigned to i. Similarly, W i (r j ) denote the function W i at r j in the case if j is assigned to i. Further, let ρ = ρ ij be an index of a job in V i (r − j ) such that the following two inequalities hold simultaneously: The variable α ij is computed for each machine i as follows: where n ij is defined as follows.
The algorithm assigns j to machine i * = arg min i∈M α ij .

Dual variables
Suppose job j is assigned to machine i. Assume L j represents the last time t such that j is in U i (t). Informally, L j is the time at which j is removed from the queue of the machine i. Note that j can be removed from U i (t) due to three following reasons: 1. If j has being scheduled for p ij time units on machine i then L j = C j 2. If j is rejected due to preempt rule 3. If j is rejected due to weight-gap rule.
In cases 2 and 3, j is rejected due to the arrival of some job, denoted by rej(j). Recall that R 1 i (r j , L j ) is the set of jobs that are rejected due to preempt rule during the interval (r j , L j ] on machine i. Note that those jobs cause a decrease in the flow of j. Observe that R 1 i (r j , L j ) contains j if j is rejected due to the preempt rule. We define the definitive completion time, denoted by C j , of a job j as follows.
1. If j is not rejected due to the weight-gap rule (corresponds to cases 1 and 2) .
2. If j is rejected due to the weight-gap rule on the arrival of some job other than j that is, (9) 3. If j is immediately rejected (i.e., j ∈ R 2 i (r j )) and job ν i (r − j ) is also rejected due to the arrival of j.
4. If j is immediately rejected and it is the only job rejected due to the weight gap rule at r j . Denote ρ = ρ ij .
This completes the description of the definitive completion time.
Let Q i (t) denote the set of jobs that have not been definitely completed that is Q i (t) := {j : j has been assigned to i, t < C j }.
Next, we define the notion of artificial fractional weight of a job j ∈ Q i (t), Now, we have all the necessary tools to set dual variables. At the arrival of job j, set α j = 1 + min i∈M α ij and never change this value again. The second dual variable β it is set to Observe that above lemma holds as jobs are removed from Q i (t) only after their definitive completion time. Thus a job that might have already completed its execution on a machine or rejected, can still be present in the Q i (t). During the analysis, we will show that the dual constraint corresponding to job j are feasible at r j . Since β it only increases with respect to the arrival of new jobs, the feasibility holds for all t ≥ r j .

Analysis
We present first two technical lemmas which are important for the analysis of our primal-dual algorithm. In Lemma 6, we relate the weight of rejected jobs in Q R i (t) to the weight of jobs pending in U i (t). This will help us in proving the feasibility of dual constraints in Lemma 9, Lemma 10 and Lemma 11. In Lemma 7, we show that the negative parts in the definition of α j s' are relatively small. This will help us to bound the value of the dual objective. Lemma 6. Let κ = κ i (t). For any machine i and any time t, it holds that wκ piκ q iκ (t) + Proof. We prove by induction on the arrival of jobs. The base case when no job has been released, holds trivially. Assume that the above inequality holds for every time t, before the arrival of job j on machine i, we show that it holds after j arrives. We split the proof into two cases depending upon if j is immediately rejected or not. The rest of the proof is omitted due to space constraints.

νi(t) and
Proof. The proof is omitted due to space constraints. Then the following inequality holds for every machine i ∈ M,