• Aucun résultat trouvé

Online Non-preemptive Scheduling to Minimize

N/A
N/A
Protected

Academic year: 2022

Partager "Online Non-preemptive Scheduling to Minimize"

Copied!
12
0
0

Texte intégral

(1)

Maximum Weighted Flow-time on Related

2

Machines

3

Giorgio Lucarelli

4

LCOMS, University of Lorraine, Metz, France

5

[email protected]

6

Benjamin Moseley

7

Tepper School of Business, Carnegie Mellon University, USA

8

[email protected]

9

Nguyen Kim Thang

10

IBISC, Univ. Paris-Saclay, France

11

[email protected]

12

Abhinav Srivastav

13

IBISC, Univ. Paris-Saclay, France

14

[email protected]

15

Denis Trystram

16

Univ. Grenoble Alpes, CNRS, Inria, Grenoble INP, LIG, France

17

[email protected]

18

Abstract

19

We consider the problem of scheduling jobs to minimize the maximum weighted flow-time

20

on a set of related machines. When jobs can be preempted this problem is well-understood; for

21

example, there exists a constant competitive algorithm using speed augmentation. When jobs must

22

be scheduled non-preemptively, only hardness results are known. In this paper, we present the

23

first online guarantees for the non-preemptive variant. We present the first constant competitive

24

algorithm for minimizing the maximum weighted flow-time on related machines by relaxing the

25

problem and assuming that the online algorithm can reject a small fraction of the total weight of

26

jobs. This is essentially the best result possible given the strong lower bounds on the non-preemptive

27

problem without rejection.

28

2012 ACM Subject Classification Theory of computation→Scheduling algorithms

29

Keywords and phrases Online Algorithms, Scheduling, Resource Augmentation

30

Digital Object Identifier 10.4230/LIPIcs.FSTTCS.2019.24

31

Funding OATA ANR-15-CE40-0015-01

32

1 Introduction

33

We study the problem of online scheduling non-preemptive jobs to minimize the maximum

34

(or `-norm of the) weighted flow-time on related machines. Here, we are given a set ofn

35

independent jobs that arrive over time. Each jobj has a processing requirementpj and a

36

weightwj. In therelated machinesenvironment, each machineihas speedsi and the time

37

required to processj is equal to pj/si. The scheduling algorithm makes online decisions for

38

assigning each job to one of the machines. If a job j arrives at timerj and completes its

39

processing at timeCj, then its flow-timeFj is defined as (Cjrj). We focus on the objective

40

of minimizing the maximum weighted flow-time,i.e., maxjwjFj. This metric is often used

41

in systems where jobs are prioritized according to their weights and every job needs to be

42

completed in a reasonable amount of time after its release. The problem of minimizing the

43

© Giorgio Lucarelli, Benjamin Moseley, Nguyen Kim Thang, Abhinav Srivastav, Denis Trystram;

licensed under Creative Commons License CC-BY

(2)

maximum flow-time is a natural generalization of the load-balancing problem where jobs

44

arrive over time. This problem is also closely related to deadline scheduling problems.

45

In this paper, we are interested in designing a non-preemptive schedule whose performance

46

is bounded in the worst-case model. Innon-preemptivesetting, a job, once started processing,

47

must be executed without interruption until its completion time. This is in contrast to

48

preemptivesetting where a job can be stopped and later continued from where it left off

49

without penalty. Several strong theoretical lower bounds are known for simple instances [9, 4].

50

In order to overcome this lower bounds, Kalyanasundaram and Pruhs [12] and Phillips et

51

al. [15] proposed the analysis of scheduling algorithms in terms of the speed and machine

52

augmentations, respectively. Together these augmentations are commonly referred to as

53

resource augmentation. In a resource augmentation analysis, the idea is to either give the

54

scheduling algorithm faster processors or extra machines in comparison to the adversary.

55

For preemptive problems, these models have been quite successful in establishing theoretical

56

guarantees on algorithms that achieve good performance in practice [5, 11, 3, 10, 17].

57

Choudhury et al. [7, 8] proposed a different model of resource augmentation where the

58

online algorithm is allowed to reject a small fraction of the total weight of the incoming

59

jobs, while the adversary must complete all jobs. Theoretically, this model can lead to

60

the discovery of good online algorithms, even in the face of strong lower bounds [7, 13].

61

Practically, the model is useful for systems where it is assumed that clients loose interest in

62

their job if they wait too long to be completed. Choudhury et al. [7] considered the problem

63

of load balancing as well as the problem of minimizing the maximum weighted flow-time in

64

the restricted assignment setting. In this setting, we are given a set of machines and each

65

jobj can only be scheduled on a subset Mj of the machines while its execution takes pj

66

time units. Even with speed augmentation, these problems admit strong lower bounds in

67

both preemptive and non-preemptive settings. However, online preemptive algorithms that

68

achieve aO(1)-competitive ratio and reject a small fraction of the total weight of jobs have

69

been presented in [7].

70

Prior works have left open the onlinenon-preemptivescheduling problem of minimizing

71

the maximum weighted flow time. Even on a single machine, the problem is not understood

72

and no positive result is known. Moreover, even with speed augmentation, simple examples

73

lead to strong lower bounds. However, recent works on the rejection model [13] give the

74

possibility of creating algorithms with strong guarantees for the non-preemptive setting.

75

Thus, an intriguing open question is whether there exists a constant competitive algorithm

76

for the maximum weighted flow-time objective in the non-preemptive setting assuming that

77

a small fraction of total weight of jobs can be rejected. In this paper, we affirmatively answer

78

this question for the case of related machines by proving the following theorem.

79

I Theorem 1. For the non-preemptive scheduling problem of minimizing the maximum

80

weighted flow-time on related machines, there exists aO(1/9)-competitive algorithm that

81

rejects at mostO()-fraction of the total weight of jobs, where ∈(0,1).

82

1.1 Problem definition and notation.

83

We are given a setMofmmachines and a setJ ofnjobs that arrive online. Each machine

84

iprocesses a job at speedsi. We index the machines such thats1s2. . . sm. Each job

85

j is characterized by its release time rj, its processing requirement pj and its weight wj.

86

The processing requirement and the weight of j are known at its release time rj. If j is

87

processed on machinei, then it requirespj/si time units. The goal is to schedule the jobs

88

non-preemptively. Given a scheduleS, the completion time of a jobj is denoted byCjS. The

89

(3)

weighted flow-time ofj is defined aswjFjS =wj(CjSrj), which is the weighted amount

90

of time during whichj remains in the system. The objective is to minimize the maximum

91

(`-norm of) weighted flow-time,i.e., maxjwjFjS. We omit the superscripts if the schedule

92

S is clearly defined by the context.

93

Let F denote the value of the offline optimal solution. Let be an arbitrary constant

94

such that∈(0,1). We assume that all weightswj are of the form (1/)k, wherek is an

95

integer. This can be assumed byrounding down weights to the nearest power of 1 which

96

affects the competitive ratio by a factor of at most 1

. After rounding, we say that a jobj

97

is ofclass kifwj = 1k

. LetK denote the largest weight class of any job. A jobj isvalid

98

on machinei, iff it takes at most F/wj time units oni, that is psj

iwF

j.

99

1.2 Organization.

100

In Section 2, we present the works related to our problem. Then, in Section 3, we present an

101

offline algorithm for the scheduling problem of minimizing the maximum weighted flow-time

102

on related machines. This algorithm is inspired by Anand et al. [2] and uses a small look-

103

ahead, allows preemptions and does not respect the release dates. Specifically, we assume that

104

the valueF of the optimal weighted flow time is known to the algorithm. Since release dates

105

are not respected, the algorithm creates an infeasible schedule. Later, in Section 4, we discuss

106

how to convert this offline algorithm to an online algorithm respecting the non-preemptive

107

requirement. Note that the release dates will be respected due to the online nature. Finally,

108

we explain how to remove the assumption about knowing the valueF in Section 5.

109

2 Related Work

110

We discuss first related works for the unweighted case. For a single machine, First-In-First-

111

Out is an optimal algorithm for minimizing the maximum flow-time. For identical machines,

112

Bender et al. [14] and Ambulh and Mastrolilli [1] showed that the algorithm that schedules

113

the incoming jobs on the least loaded machine, is (3−2/m)-competitive. On related machines,

114

Bansal et al. [4] showed that there exists a 13.5-competitive algorithm. This has recently

115

been improved to a 12.5-competitive algorithm by Im et al [16]. All the above algorithms

116

are non-preemptive and their results hold against both the preemptive and non-preemptive

117

adversary. For the more general setting of unrelated machines, Anand et al. [2] gave an

118

O(1/)-competitive algorithm with (1 +)-speed augmentation and this result fundamentally

119

uses preemption.

120

In the presence of weights, only results in the preemptive setting are known for the

121

problem of minimizing the maximum weighted flow-time. Bender et al. [14] showed a lower

122

bound of Ω(P1/3) on the competitive ratio on single machine where P is the ratio of the

123

minimum to maximum job size. This was later improved to Ω(P0.4) in [6]. Both these lower

124

bounds also hold ifP is replaced with the ratio of the maximum to minimum weight. In

125

speed augmentation model, Bansal and Pruhs [5] showed that the Highest Density First

126

policy is (1 +)-speedO(1/2)-competitive on a single machine. Chekuri and Moseley [6]

127

presented a (1 +)-speedO(1/)-competitive algorithm for parallel machines, while Anand

128

et al. [2] proposed a (1 +)-speedO(1/3)-competitive algorithm for related machines. In

129

the rejection model, Choudhury et al. [7] presented anO(1/4)-competitive algorithm for

130

the restricted assignment settings when an-factor of the weight of the jobs can be rejected

131

by the online algorithm.

132

(4)

3 An Offline Look-ahead Algorithm with Preemptions

133

In this section we assume that the valueF of the optimal solution is given, preemptions are

134

allowed and the release dates of the jobs are not necessarily respected. Intuitively, we show

135

the following. For ease of explanation assume that all jobs have unit weight. We consider

136

all the jobs released during a long interval of sizeO(F/). Since the maximum weighted

137

flow-time isF, all such jobs must be scheduled within an interval of size O(F/+F) by the

138

optimal solution. We show that by rejecting anO()-fraction of the total weight of jobs,

139

an online algorithm can schedule all the remaining jobs in the interval of sizeO(F/). The

140

algorithm below builds on this idea when jobs have different weights. This is inspired by the

141

work of Anand et al. [2] where speed augmentation is used to achieve a similar effect. Recall

142

that there exists a strong lower bound in the speed augmentation model. In rejection model,

143

one needs to ensure that the algorithm rejects at mostO()-fraction of jobs both in terms of

144

weights and volume.

145

We allow our algorithm to reject some jobs. For each weight classkand integer `, let

146

I(k, `) denote the intervalh

`F k

3 ,(`+1)F 3 k

. We say that a jobj belongs to type (k, `) if it is

147

of classkandrjI(k, `). Observe that intervalsI(k, `) form a nested set of intervals. Note

148

that at least 13

jobs that belong to classkor more, can be scheduled during an interval

149

I(k, `). The online algorithm A is defined to have the following rejection and scheduling

150

policies.

151

Rejection policy: The rejection policy ofAis described in Algorithm 1. The algorithm

152

uses a simple rejection policy where it ensures that for each intervalI(k, `) the algorithm

153

rejects at least2/2-fraction of volume of jobs andO()-fraction of weight of jobs.

Algorithm 1RA(I, F, ) 1: fork=K to 1do 2: for`= 1,2, . . .do

3: J(k, `) := the set of jobs of type (k, `) 4: D:=b2|J(k, `)|+ P

I(k0`0)⊆I(k,`):

k0=k+1

|J(k0, `0)|c+ P

I(k0,`0)⊆I(k,`):

k0≥k+2

|J(k0, `0)|

5: Reject longest-D jobs fromJ(k, `)

154

Scheduling policy: The scheduling policy ofAis described in Algorithm 2. The algorithm

155

uses the following order: it picks jobs in the decreasing order of their class, and within each

156

class it goes by increasing order of its intervals. When considering a jobj, the algorithm

157

schedulesj during the intervalI(k, `) on the slowestvalid machine with enough free space.

158

Jobs may be scheduled preemptively. This completes the description of the algorithmA.

Algorithm 2SA(I, F, ) 1: fork=K to 1 do 2: for`= 1,2, . . .do

3: foreach non-rejected jobj of type (k, `) do 4: mj:= the slowest machine for which j is valid 5: fori:=mj, . . . ,1 do

6: If there is at leastpj/sifree slots (preemptive) on machineiduringI(k, `) then schedulej oniduring the first such free slots.

159

(5)

3.1 Analysis of the Offline Algorithm

160

In this section, we prove that AlgorithmSAwill always find enough space to schedule the

161

non-rejected set of jobs inRA.

162

ITheorem 2. AlgorithmSA outputs a preemptive schedule for the set of non-rejected jobs

163

which ensures that each job that belongs to type (k, `)is scheduled duringI(k, `). Note that

164

schedule may process jobs before their release date.

165

We prove this by contradiction. Let j be the first non-rejected job that algorithmA

166

cannot schedule on some machinei. Then we will show that the value of the offline optimal

167

solution is strictly greater thanF, which contradicts our assumption on the knowledge of

168

the value of optimal offline solution,F.

169

Assume that j is of type (k, `). We build a setS of job recursively. InitiallyS just

170

contains j. We addj0 of type (k0, `0) to S if there is already a job j of type (k, l) in S

171

satisfying the following conditions:

172

1. k0k.

173

2. Aprocessesj0 on a machineiwhich is valid forj as well.

174

3. Aprocessesj0 during theI(k0, `0) such thatI(k0, `0)⊆I(k, `)

175

For a machine i and interval I(k, `), define the machine-interval Ii(k, `) as the time

176

interval I(k, `) on machinei. We construct a set IM of machine-intervals as follows: For

177

every jobjS of type (k, `), we add the intervalIi(k, `) toIM for all machinesisuch that

178

j is valid fori.

179

IDefinition 3. We say that an intervalIi(k, `)∈ IM ismaximalif there is no other interval

180

Ii(k0, `0)which containsIi(k, `).

181

Observe that every job inS exceptj gets processed in one of machine-intervals inIM.

182

LetIX denote the set of maximal intervals inIM. We show that the jobs inS satisfy the

183

following property.

184

ILemma 4. For any maximal intervalIi(k, `)∈ IX, AlgorithmSAprocesses a job on at

185

least(1−3)-fraction of the interval on machinei.

186

Proof. We prove this property holds whenever we add a new maximal interval toIX. Suppose

187

this property holds at some point in time, and we add a new jobj0 toS. Letj, k, `, j0, k0, `0

188

be as in the description ofS. Sincek0k andj is valid fori, the interval set IX already

189

contains the intervalIi0(k, `) for alli0i. Hence the intervalsIi0(k0, `0) cannot be maximal

190

for anyi0i. Suppose an intervalIi0(k0, `0) is maximal, where i0 > i, andj0 is valid for

191

i0. Our algorithm would have considered scheduling j0 on i0 before going toi. Hence the

192

machinei0 is at least|Ii0(k0, `0)| −pj/si0 amount busy scheduling other jobs fromS. The

193

lemma follows sincepj/si0F/wjF k. J

194

I Corollary 5. There are at least (13 −1) jobs of class k or more scheduled for every

195

Ii(k, `)∈ IX.

196

Proof. Recall that the size of the interval Ii(k, `) is F 3k and the size of the longest job

197

scheduled in the intervalIi(k, `) iskF. Combining these facts with Lemma 4 shows that

198

the corollary holds. J

199

Next we associate the set of rejected jobs to the maximal intervals. Recall that

200

|I(k, `)| denote the length of the interval I(k, `). Intuitively, we show that for each

201

(6)

maximal interval Ii(k, `) ∈ IX, we can associate at least O(2)|Ii(k, `)| volume of jobs

202

that are rejected by the algorithm RA such that these jobs are of type (k0, `0) where

203

I(k0, `0)⊆I(k, `). To this end, letR denote the set of job rejected byRA. Let R(k, `) =

204

{j∈R:j is of type (k0, `0) andI(k0, `0)⊆I(k, `)}.

205

ILemma 6. There exists a functionφ:R→ IX such that for everyIi(k, `)∈ IX, it holds

206

that vol(φ−1(Ii(k, `)))≥ 42|Ii(k, `)| and φ−1(Ii(k, `)) ⊆R(k, `) where vol(Q) denotes the

207

total volume of jobs in the set Q.

208

Proof. Fix a maximum intervalI=Ii(k, `). Letkmaxdenote the maximum weight class of

209

the job scheduled inI. Recall the intervalsIi(k0, `0)⊆Ii(k, `) are nested.

210

We first form an 1/-ary tree where a node v(k0, `0) represents the set of jobs of type

211

(k0, `0) scheduled in the interval I on i. The nodev(k0, `0) is the the ancestor of the node

212

v(k0+ 1, `00) iffIi(k0+ 1, `00)⊆Ii(k0, `0). The height of this tree iskmaxk. Note that some

213

of the leaves can be empty. Therefore, we trim the tree such that leaves are non-empty. For

214

this, we find an empty leave and remove it from the tree. We repeat this procedure until no

215

empty leaves are present. Note that an intermediate node of the tree can be empty. Next,

216

we consider the following cases depending upon the number of jobs in the leaves:

217

Case 1: There are at least1/2-jobs in each leaf. The algorithmRArejects at least 2/2

218

number of jobs at each non-empty node of the tree. Letj be such a job rejected byRAfor

219

some node in the tree, then we defineφ(j) =I (i.e., associate rejected jobj to intervalI).

220

Recall thatRArejects longest jobs among jobs of fixed class. Thus, the total volume of jobs

221

associated with the intervalIis at least2/2 and the lemma holds.

222

Case 2: If the number of jobs in each leaf is between1/and1/2. The algorithmRA

223

rejects at least2/2 fraction of volume of jobs at each non-empty node except leaves. As

224

before, letj be such a job rejected byRA, then we defineφ(j) =I. We show that the total

225

volume of jobs in the leaves are small. Let v(k0, `0) denote jobs corresponding to some leaf.

226

Then|v(k0, `0)|<1/2. The total volume of jobs inv(k0, `0) is at most (F k0)/2=|Ii(k0, `0)|.

227

Observe that the jobs of any two leaves are scheduled independent of each other in separate

228

sub-intervals. Combining this fact with the previous bound on the volume of jobs in leaves

229

implies that the total volume of jobs in leaves is at most|I|. Thus, the total volume of jobs

230

scheduled during the intervalIis at most 2.vol(φ−1(I))/2+|I|. SinceSAprocesses jobs on

231

at least (1−3)-fraction ofI, it holds thatvol(φ−1(I))≥(2/2)(13)|I| ≥(2/4)|I|.

232

Case 3: If the number of jobs in each leaf is strictly less than 1/. If the algorithm

233

rejects2-fraction of total volume of jobs at each non-empty level other than the leaf, then

234

the lemma holds (the proof is similar to Case 2). Thus, we consider the case where the parent

235

of a leaf does not reject2-fraction of the total volume of jobs. This implies that each parent

236

has at most 1/2 number of jobs and the height of the subtree rooted at the parent node is

237

at most 1. The algorithmRArejects 2/2 jobs for each node from the root to the parent

238

of parent of a leaf. As before, letj be such a job rejected byRA, then we defineφ(j) =I.

239

Unlike Case 2 where intervals corresponding to leaves are disjoint, th intervals of parents of

240

two leaves can overlap. Here, we use the top-down approach to count the total volume of

241

jobs. Each job in the parent node is split into 1/-parts. We “virtually force" these parts to

242

be accounted in the leaves of that parent (even though their weight class is strictly smaller

243

than the weight class of the leaves). Thus the number of jobs in each leaf can increase by at

244

most 1/2. Using arguments similar to Case 2, the total volume of jobs in the leaves is at

245

most 2I. SinceSAprocess job on at least (1−3)-fraction ofI, it holds thatvol(φ−1(I)) is

246

at least2/2(13−2)|I|-volume of jobs.

247

J

248

(7)

I Corollary 7. The total volume of jobs in S0 = SR is greater than P

I(k,`)∈IX I(1 +

249

3)|I(k, `)|.

250

ILemma 8. If the value of offline solution is at mostF, then the total volume of jobs inS0

251

is at mostP

I(k,`)∈IX(1 +3)|I(k, `)|.

252

Proof. For any maximal intervalI(k, `) on machinei, letIi(k, `) be the interval of length

253

(1 +3)|I(k, `)|which starts at the same time as I(k, `) on machinei.

254

Let jS be a job of type (k, `). The optimal offline solution must schedule j within

255

F k of its release date. Since rjI(k0, `0)⊆I(k, `), the optimal solution must process a job

256

j during I(k, `). So, the total volume of jobs inS can be at most|S

I(k,`)∈IXIi(k, `)| ≤

257

P

I(k,`)∈IX(1 +3)|I(k, `)|. J

258

Clearly, Corollary 7 contradicts Lemma 8. So, AlgorithmSAmust be able to process all

259

the jobs.

260

ILemma 9. The total weight of jobs rejected by the algorithm RAis O()-fraction of the

261

total weight of jobs in the instanceI.

262

4 The Online Algorithm B

263

The previous algorithmAis an offline preemptive algorithm forI that does not respect the

264

release dates. This section presents an online non-preemptive algorithmB. This algorithm is

265

assumed to know the optimal objectiveF and this algorithm is extended in a later section

266

to when this is not known. The algorithm maintains a queue for each machineiand time

267

t. Unlike the previous algorithm,B rejects the job of type (k, `) at the end of the interval

268

I(k, `). For each non-rejected jobj,Buses SAto figure out the assignment of jobs to the

269

machines. This algorithm differs from the online algorithm mentioned in Anand et al. [2] as

270

it schedules jobs non-preemptively and does not necessarily process jobs in their decreasing

271

order of their weights.

272

The rejection and assignment policies ofBin given Algorithm 3.

273

Algorithm 3 MB(I, F, ) 1: fort= 0,1,2,· · · do

2: LetK denote the largest class of a job.

3: fork=K to 1do

4: if tis the end point of the intervalI(k, `) for some`then

5: Rejection similar to RA

6: J(k, `) := the set of jobs of type (k, `) 7: D:=b2|J(k, `)|+ P

I(k0`0)⊆I(k,`):

k0=k+1

|J(k0, `0)|c+ P

I(k0,`0)⊆I(k,`):

k0≥k+2

|J(k0, `0)|

8: Reject longest-D Tjobs fromJ(k, `) from the remaining jobs inJ(k, `)

9: Assignment similar to SA

10: foreach non-rejected jobj of classk do

11: Letmj denote the machine on whichj is scheduled bySA 12: Assignj to the queue ofmj

After the execution of Algorithm 3, the algorithmBuses two more rejection policies for

274

each machinei. The first policy ensures thatB rejectsO(2)-fraction of new assigned jobs

275

(8)

whereas the second policy ensures thatBprocesses jobs in a non-preemptive fashion. At any

276

time if the machineiis idle,Bpicks a job from the highest class according to the ordering

277

given bySA.

278 279

Making B Non-preemptive: We now detail the second rejection policy. During the

280

processing of a job of some class on a machinei, the algorithm maintains a bound on total

281

weight of higher class jobs that are newly assigned to machinei. Letj be the job running at

282

the start of intervalI(k, `+ 1) on machinei. Letkj denote the class ofj. Brejectsj if there

283

is a new jobj0 of type (k0, l0) thatk0kj+ 2 and the intervals I(k0, `0) andI(k, `) end at

284

same time. This ensures that the weight of jobj andj0 differ at least by a factor of 1/. It

285

may happen that there is no job classk0kj+ 2. In this case, the algorithmB rejectsj

286

if there are at least (1/newly arrived jobs of type (k0, `0) ifk0kj+ 1 and the intervals

287

I(k0, `0) andI(k, `) end at same time. Note that this also ensures the weight of newly arrived

288

jobs is at least an (1/) times the weight of current running job. These rejection policies and

289

scheduling policy of the algorithmBfor the machineiat timetis mentioned in Algorithm 4.

290

Algorithm 4SB(I, F, , i, t) 1: Rejection similar toRA 2: fork=K to 1do

3: if tis the end point of the intervalI(k, `) for some `then

4: Ji(k, `) := the set of jobs of type (k, `) assigned toiatt 5: D:=b22|Ji(k, `)|+ 2 P

I(k0`0)⊆I(k,`):

k0=k+1

|Ji(k0, `0)|c+ 2 P

I(k0,`0)⊆I(k,`):

k0≥k+2

|Ji(k0, `0)|

6: RejectD-longest jobs fromJ(k, `, i)

7: Making algorithm non-preemptive 8: Letj∈(k, `) be the job executing oniatt

9: LetJk0 denote the set of jobs of classk0 assigned to iatt 10: if |J(k+1)| ≥1/or∃k00:|J(k00)|>0 andk00k+ 2 then 11: Rejectj

12: Scheduling Policy

13: if the machineiis idlethen

14: Start processing the earliest job of highest class in the queue ofi

4.1 Analysis

291

For a classk, letJk be the jobs of class at least k. For a classk, integer`, and machine i,

292

letQ(i, k, `) denote the jobs ofJk which are in the queue of machineiat the beginning of

293

I(k, `). The jobs inQ(i, k, `) could consist of either

294

1. jobs inQ(i, k, `−1), or

295

2. jobs of Jk which get processed by AduringI(k, `−1) on machinei. Indeed, the jobs

296

ofJk which are dispatched to machinei duringI(k, `−1) will complete processing in

297

I(k, `−1) inAand hence may get added (if not rejected) toQ(i, k, `). LetP(i, k, `−1)

298

denotes the volume of such jobs that are added byB to the queue of machinei.

299

Next, we note some properties of the algorithmB:

300

(9)

BProperty 1. A jobj gets scheduled inBonly in later slots than those it was scheduled on

301

byA.

302

BProperty 2. For a classk, integer`and machinei, the total processing of jobs inP(i, k, `)

303

is at most (1−33)F k.

304

Proof. If the volume of jobs processed by algorithmAduring the intervalI(k, `) is at most

305

(1−3)F k

3 , then the property holds trivially. Assume that the volume of jobs processed by

306

algorithmAduring the intervalI(k, `) is strictly greater than (1−33)F k. Then it holds that

307

the algorithm rejects at least2/4-fraction of volume of jobs assigned toi(the proof is similar

308

to Lemma 6). Thus the total volume of jobs assigned toi is strictly greater than (1+33)F k.

309

But, this contradicts Theorem 2. J

310

BProperty 3. For a class k, integerland machine i, the total remaining processing time of

311

jobs inQ(i, k, `) is at most (1−33)F k.

312

Proof. We use induction. Suppose this is true for some i, k, l. We show that this holds

313

for i, k, `+ 1 as well. By induction |Q(i, k, `)|is at most (1−33)F k. We consider multiple

314

separate cases based on which job gets processed during the intervalI(k, `) on machinei.

315

1. Suppose the machine iis busy processing jobs fromJk duringI(k, `).

316

Then algorithm either processes job from Q(i, k, `) or P(i, k, `). The total volume of

317

such jobs are bounded by 2(1−33)F k. The property holds since the total volume of job

318

processed byiis|I(k, `)|= F 3k.

319

2. Suppose job j of class smaller thank is processed at the start ofI(k, `)andQ(i, k, `) = 0.

320

In this case, Q(i, k, `+ 1) consists of the jobs of P(i, k, `). The property follows since

321

|P(i, k, `)| ≤ (1−33)F k.

322

3. Suppose jobj of class smaller thankis processing at the start ofI(k, `)andQ(i, k, `)>0.

323

We show that Q(i, k, `) is at most F k. Let σj denote the starting time of job j on

324

machinei. Then we have thatσj> `F 3kpj/si`F 3kF k. Since algorithmBprefers

325

jobs of higher class, it must be the case that atσj no job of classkor higher was available

326

with machinei. HenceQ(i, k, `) consists of jobs that were added to the queue of machine

327

i during the interval

σj,`F 3ki

. SinceQ(i, k, `)>0 and the class ofj is strictly smaller

328

than k,j must belong of class (k−1), otherwiseBwould rejectj due to non-preemptive

329

rejection policy. Moreover, there are at most 1/jobs of classk inQ(i, k, `). Hence, the

330

total volume of jobs in Q(i, k, `) is most F k. The property follows from the facts thatB

331

spends at most F k processing time onj.

332

4. SupposeBprocesses a job of class smaller thank at some point inI(k, `).

333

This implies thatQ(i, k, `+ 1) contains jobs that are released during the intervalI(k, `).

334

The property holds due to Claim 2.

335

J

336

ITheorem 10. In the scheduleBa job j of class k has flow-time at most F 8k. Hence the

337

algorithm B is an O(19)-competitive algorithm that rejects at most O()-fraction of total

338

weights of job.

339

Proof. Consider a job j of class (k, `−1). Suppose it gets processed on machine i. The

340

algorithm B addsj to the queueQ(i, k, `). Let j0 be the job running at beginning of the

341

interval I(k, `). Property 3 from above implies that the total remaining processing time of

342

jobs inQ(i, k, `) is at most (1−33)F k = (1−3)|(k, `)|.

343

(10)

Consider an interval I that starts at same time asI(k, `) and has length (1−37)F k =

344

|I(k, `)|/4. DuringI, the algorithm process jobs ofJk that are either in (1)Q(i, k, `), or

345

(2) processed byA on machine i. From Property 2, the total processing of jobs in (2) is

346

(1−3)|I|. This leaves us with 3|I| processing time. This is enough of process the jobs

347

inQ(i, k, `) andj0 as (1−3)F 3k +F k−1F 4k =3|I|. So the flow time of j is at most

348

|I|+|I(k, `)|=F k(17 +13). J

349

5 Removing the assumption about knowledge of F

350

In this section, we show how to remove the assumption about knowledge ofF. We apply the

351

standard double trick that is often used in the online algorithms. Recall that our previous

352

look-ahead algorithm assumed that we know the optimalF. Here, we will construct another

353

look-ahead algorithmCwhich will invokeAfor different guesses ofF. Fix an instanceI. Let

354

I(k, `, F) be the interval [`F 3k,(`+1)F 3 k). This is same asI(k, `) except that the intervals

355

are also parameterized byF. Similarly, we say that a job of class k is of type (k, `, F) if

356

rjI(k, `, F).

357

Our algorithm will work with the guesses ofF which are powers of

1+3 3

. Without the

358

loss of generality, we assume that all release dates and processing times are integers. We

359

first generalize the algorithmA. The new algorithm, denoted by A0, will take as parameters

360

an instanceI0, the guessF and a starting timet0- all release dates inI0 will be at least t0.

361

It will runA0 with the understanding that time start att0. The intervalI(k, `, F) will be

362

defined as [t0+`F 3k, t0+(`+1)F 3 k). The algorithmC is described below.

363

Algorithm 5A look-ahead algorithmC 1: InitializeF0= 1, t0= 0,I0=I 2: foru= 0,1,2, . . .do

3: RunA0(Iu, Fu, tu)

4: if All non-rejected jobs are finishedthen 5: Stop and output the scheduled produced.

6: else

7: letj be the first non-rejected job which algorithmA0(Iu, Fu, tu) is not to schedule.

8: Supposej is of type (k, `, Fu).

9: Definetu+1be the end-point of I(k, `, Fu).

10: DefineIu+1 be the jobs inIu which are not scheduled yet.

11: Definerj= max{tu+1, rj},∀j∈ Iu+1. 12: SetFu+1=Fu

1+3 3

.

Note that this algorithm, like AlgorithmA, is preemptive.

364

5.1 Analysis

365

Suppose during some iterationu, we find a jobj that the algorithm is not able to schedule

366

in iterationu. Letjbe type of (k, `, Fu). Recall thattu+1is the end point ofI(k, `, Fu).

367

For a jobj∈ Iuletruj denote its release date inIu.

368

ILemma 11. Any jobj ∈ Iu+1 with ruj < tu+1 must be of class at most k. Further, if

369

such a job is of classk, thentu+1rjFu+1k.

370

(11)

Proof. Suppose j ∈ Iu and ruj < tu+1. If j is of type (k, `, Fu) such that k > k, then

371

I(k, `, Fu) ⊆ I(k, `, Fu). Hence the interval I(k, `, Fu) end at or or before tu+1. By

372

definition ofj the algorithm must have scheduledj inI(k, `, Fu) and so, before the tu+1.

373

This proves the first statement in the lemma.

374

To prove the second statement of lemma, we use induction on u. Suppose the second

375

statement is true for iteration u−1. We show that it holds for u. Let j be job of class

376

kk such thatj ∈ Iu+1 and rju < tu+1. Note that intervalI(k, `, Fu) ends on or after

377

tu+1. Hence tu+1ruj ≤ |I(k, `, Fu)| = Tu3k. If rjtu, then ruj = rj, and we have

378

tu+1rj ≤ |I(k, `, Fu)|=Fu3k = F(1+u+13k)Fu+1k.

379

On the other hand, if ruj =tu. So we gettu+1tu≤ |I(k, `, Fu)| ≤ Fuk

3Fu3k. By

380

induction hypothesis, we haveturj < Fuk. Hence we havetu+1−rj=tu+1−tu+turj

381

1+3 3

Fuk =Fu+1k.

382

J

383

ILemma 12. IfCdoes not finish all jobs in the iterationu, then the value of offline optimal

384

solution is at least Fu.

385

Proof. The proof is similar to Lemma 8. The setS is defined similarly. For each machine

386

and intervalI(k, `, Fu) the algorithm rejects at least2-fraction of volume of jobs. Lemma 4

387

and Lemma 6 remain unchanged.

388

Note that for a jobj of type (k, `, Fu),ruj may lie earlier than the start time ofI(k, `, Fu).

389

So the optimum offline algorithm may complete processingj even before the start of this

390

interval. But Lemma 11 shows that j is released at most 3|I(k, `, Fu)| to the left of

391

I(k, `, Fu). So in the definition of the intervals I(k, `, Fu) in Lemma 4, we consider the

392

intervalI(k, `, Fu) and two segments of length3|I(k, `, Fu)|both before and afterI(k, `, Fu).

393

Rest of the arguments are same as in the proof of Lemma 8. J

394

ICorollary 13. SupposeOP T lies between Fu−1 andFu. Then the algorithm C completes a

395

job of classk with flow-time at most (1+3)F3 uk 396

5.2 Making the algorithm online

397

We now describe the final on-line algorithmD. The above theorem implies that for any job

398

j, we will know the machine on which it get schedules by timerj+ (1+3)F3 uk. At this time,

399

we placej on the queue of the machine to which it gets scheduled on by C. Further each

400

machine prefer the jobs of larger class and within a particular class, it just goes by processing

401

times. We reject at least 22volume of jobs in each interval. To achieve this, the algorithm

402

rejects job 42-jobs (-fraction as inAand 3-fraction on each machinei) in the description

403

of the algorithmB. Hence Property 2 for the algorithmBcan be changed slightly to show

404

that|P(i, k, `)|is at most (1−233)F k.

405

ITheorem 14. In the scheduleD a jobj of class k has flow-time at most F 8k. Hence the

406

algorithm D is an O(19)-competitive algorithm that rejects at most O()-fraction of total

407

weights of job.

408

References

409

1 C. Ambühl and M. Mastrolilli. On-line scheduling to minimize max flow time: an optimal

410

preemptive algorithm. Oper. Res. Lett., 33(6):597–602, 2005.

411

Références

Documents relatifs

In a second part, we scrutinize periodic non idling non preemptive scheduling and we show that for non preemptive scheduling feasibility must be checked on a time interval of

Du petit matin au crépuscule, voire jusqu'au cœur de la nuit pour ceux qui travaillent dans un quotidien, les journalistes vous disent ce qu'il faut savoir et penser de ce qui

Apart from the kinetic experiments, ATD aerosol particles were also processed by gaseous HNO3 in a laminar flow- tube reactor at room temperature and atmospheric pressure over

Ratio of the number of activated droplets (“CCN”) relative to the number of condensation nuclei (“CN”) plotted as a function of dry particle diameter for glutaric acid particles

Thus, for example, the overall approximation ratio with non-increasing jobs and known sum of processing times is at least 1.366, using the bound for identical machines from [13]..

For the non-preemptive problem of minimizing weighted flow-time on unrelated machines, there exists a O( 1 3 )-competitive algorithm that rejects at most O()-fraction of total

For the online non-preemptive scheduling problem of minimizing total weighted flow- time, no competitive algorithm for unrelated machines even with resource augmentation is known;

Effetto della pre-essiccazione sulla velocita di sostituzione dell'acqua con propan-2-01 in paste di cemento - Riassunto - Campioni di paste di cemento prepa- rate con