8
Online deadline scheduling with preemption penalties q Feifeng Zheng a,b , Yinfeng Xu a,b , Chung Keung Poon c,, E. Zhang d , Xiaoping Wu e a School of Management, Xi’an JiaoTong University, Xi’an 710049, China b The State Key Lab for Manufacturing Systems Engineering, Xi’an 710049, China c Department of Computer Science, City University of Hong Kong, 83 Tat Chee Avenue, Kowloon Tong, Hong Kong, China d Shanghai University of Finance and Economics, Shanghai 200433, China e Xi’an University of Posts and Telecommunications, Xi’an 710049, China article info Article history: Received 3 May 2010 Received in revised form 9 December 2010 Accepted 17 December 2010 Available online 25 December 2010 Keywords: Deadline scheduling Online scheduling algorithms Competitive analysis Preemption penalty abstract This paper presents a study of the problem of online deadline scheduling under the preemption penalty model of Zheng, Xu, and Zhang (2007). In that model, each preemption incurs a penalty of q times the weight of the preempted job, where q P 0 is the preemption penalty parameter. The objective is to max- imise the total weight of jobs completed on time minus the total penalty. When the scheduler knows the ratio of longest to shortest job length, D, we show that the WAL algo- rithm of Zheng et al. (2007) is ((1 + q)D + o(D))-competitive for sufficiently large D. This improves the bound shown in Zheng et al. (2007). When the scheduler only knows that D P (k(1 + q)) 3 for some k > 1, we propose a ((k(1 + q)D/(k 1)) + o(D))-competitive algorithm. When q = 0, we give an optimal, O(D/log D)-competitive algorithm that, unlike previous algorithms, does not require knowledge of D. This settles an open problem mentioned in Ting (2008). Ó 2011 Elsevier Ltd. All rights reserved. 1. Introduction Online deadline scheduling has recently received much atten- tion due to its many applications in the manufacturing industry, real time systems and networks; see for example (Baruah et al., 1991; Baruah et al., 1992; Hoogeveen, Potts, & Woeginger, 2000; Goldman, Parwatikar, & Suri, 2000; Lee, 2003; Pruhs, Torng, & Sgall, 2004, chap. 15). In a typical scenario in manufacturing, jobs of var- ious weights arrive over time, and the scheduler has to arrange the processing so that they can be finished before their respective deadlines. When a job is completed before its deadline, an amount of profit proportional to the weight of the job is obtained. When the system is overloaded, there are more jobs than the machine can handle. In this case, the challenge is to decide which jobs to process and which to give up to maximise the total profit. In this paper, we consider preemptive scheduling on a single machine and follow the standard preemption-restart model (see Shmoys, Wein, & Williamson, 1995). That is, preemption is allowed, but the aborted job has to be started again from the beginning to obtain its profit. 1.1. Preemption penalty In some applications, starting a job represents a commitment to serve the corresponding client. Aborting the job will then likely cause a certain degree of discontent in the affected client. There- fore, we are motivated to study scheduling when there is a penalty for preemption. Zheng et al. (2007) were the first to investigate this problem and introduced the following model of preemption penal- ties. The system consists of a single machine to process jobs that arrive online. Each job J has four attributes, a(J), p(J), w(J) and d(J), representing its arrival time, processing time (i.e., job length), profit and deadline respectively. The scheduler does not know any of these job parameters until the job arrives, i.e., at time a(J). When it arrives, all its attributes become known. The scheduler gains a profit of w(J) if it completes job J by its deadline d(J). On the other hand, there will be a penalty of q w(J) if he starts J but aborts it be- fore its completion. Here q is called the preemption penalty param- eter and is a non-negative real number. (When q = 0, the model reduces to the classic one in which there is no penalty.) Note that if a job is preempted multiple times, a penalty will be imposed for each preemption. Our goal is to maximise the total weight of the completed jobs minus the total penalties caused by preemptions. To measure the performance of an online algorithm A, compet- itive ratio analysis (refer to Borodin & El-yaniv (1998)) is often used. Denote the schedules produced by A on an input I as C A ðIÞ, and the schedule produced by an optimal offline algorithm OPT as C (I). Let jC A ðIÞj and jC (I)j be the total profit of completed jobs in C A ðIÞ and C (I) respectively. Denote the total preemption 0360-8352/$ - see front matter Ó 2011 Elsevier Ltd. All rights reserved. doi:10.1016/j.cie.2010.12.011 q This manuscript was handled by area editor Maged M. Dessouky. Corresponding author. Tel.: +852 2788 7157; fax: +852 2788 8614. E-mail addresses: [email protected] (F. Zheng), [email protected] (Y. Xu), [email protected] (C.K. Poon), [email protected] (E. Zhang), wuxiao- [email protected] (X. Wu). Computers & Industrial Engineering 60 (2011) 542–549 Contents lists available at ScienceDirect Computers & Industrial Engineering journal homepage: www.elsevier.com/locate/caie

Online deadline scheduling with preemption penalties

Embed Size (px)

Citation preview

Computers & Industrial Engineering 60 (2011) 542–549

Contents lists available at ScienceDirect

Computers & Industrial Engineering

journal homepage: www.elsevier .com/ locate/caie

Online deadline scheduling with preemption penalties q

Feifeng Zheng a,b, Yinfeng Xu a,b, Chung Keung Poon c,⇑, E. Zhang d, Xiaoping Wu e

a School of Management, Xi’an JiaoTong University, Xi’an 710049, Chinab The State Key Lab for Manufacturing Systems Engineering, Xi’an 710049, Chinac Department of Computer Science, City University of Hong Kong, 83 Tat Chee Avenue, Kowloon Tong, Hong Kong, Chinad Shanghai University of Finance and Economics, Shanghai 200433, Chinae Xi’an University of Posts and Telecommunications, Xi’an 710049, China

a r t i c l e i n f o a b s t r a c t

Article history:Received 3 May 2010Received in revised form 9 December 2010Accepted 17 December 2010Available online 25 December 2010

Keywords:Deadline schedulingOnline scheduling algorithmsCompetitive analysisPreemption penalty

0360-8352/$ - see front matter � 2011 Elsevier Ltd. Adoi:10.1016/j.cie.2010.12.011

q This manuscript was handled by area editor Mag⇑ Corresponding author. Tel.: +852 2788 7157; fax:

E-mail addresses: [email protected] (F. ZheXu), [email protected] (C.K. Poon), eezhang@[email protected] (X. Wu).

This paper presents a study of the problem of online deadline scheduling under the preemption penaltymodel of Zheng, Xu, and Zhang (2007). In that model, each preemption incurs a penalty of q times theweight of the preempted job, where q P 0 is the preemption penalty parameter. The objective is to max-imise the total weight of jobs completed on time minus the total penalty.

When the scheduler knows the ratio of longest to shortest job length, D, we show that the WAL algo-rithm of Zheng et al. (2007) is ((1 + q)D + o(D))-competitive for sufficiently large D. This improves thebound shown in Zheng et al. (2007). When the scheduler only knows that D P (k(1 + q))3 for somek > 1, we propose a ((k(1 + q)D/(k � 1)) + o(D))-competitive algorithm.

When q = 0, we give an optimal, O(D/log D)-competitive algorithm that, unlike previous algorithms,does not require knowledge of D. This settles an open problem mentioned in Ting (2008).

� 2011 Elsevier Ltd. All rights reserved.

1. Introduction

Online deadline scheduling has recently received much atten-tion due to its many applications in the manufacturing industry,real time systems and networks; see for example (Baruah et al.,1991; Baruah et al., 1992; Hoogeveen, Potts, & Woeginger, 2000;Goldman, Parwatikar, & Suri, 2000; Lee, 2003; Pruhs, Torng, & Sgall,2004, chap. 15). In a typical scenario in manufacturing, jobs of var-ious weights arrive over time, and the scheduler has to arrange theprocessing so that they can be finished before their respectivedeadlines. When a job is completed before its deadline, an amountof profit proportional to the weight of the job is obtained. Whenthe system is overloaded, there are more jobs than the machinecan handle. In this case, the challenge is to decide which jobs toprocess and which to give up to maximise the total profit.

In this paper, we consider preemptive scheduling on a singlemachine and follow the standard preemption-restart model (seeShmoys, Wein, & Williamson, 1995). That is, preemption isallowed, but the aborted job has to be started again from thebeginning to obtain its profit.

ll rights reserved.

ed M. Dessouky.+852 2788 8614.

ng), [email protected] (Y.63.com (E. Zhang), wuxiao-

1.1. Preemption penalty

In some applications, starting a job represents a commitment toserve the corresponding client. Aborting the job will then likelycause a certain degree of discontent in the affected client. There-fore, we are motivated to study scheduling when there is a penaltyfor preemption. Zheng et al. (2007) were the first to investigate thisproblem and introduced the following model of preemption penal-ties. The system consists of a single machine to process jobs thatarrive online. Each job J has four attributes, a(J), p(J), w(J) andd(J), representing its arrival time, processing time (i.e., job length),profit and deadline respectively. The scheduler does not know anyof these job parameters until the job arrives, i.e., at time a(J). Whenit arrives, all its attributes become known. The scheduler gains aprofit of w(J) if it completes job J by its deadline d(J). On the otherhand, there will be a penalty of q w(J) if he starts J but aborts it be-fore its completion. Here q is called the preemption penalty param-eter and is a non-negative real number. (When q = 0, the modelreduces to the classic one in which there is no penalty.) Note thatif a job is preempted multiple times, a penalty will be imposed foreach preemption. Our goal is to maximise the total weight of thecompleted jobs minus the total penalties caused by preemptions.

To measure the performance of an online algorithm A, compet-itive ratio analysis (refer to Borodin & El-yaniv (1998)) is oftenused. Denote the schedules produced by A on an input I asCAðIÞ, and the schedule produced by an optimal offline algorithmOPT as C⁄(I). Let jCAðIÞj and jC⁄(I)j be the total profit of completedjobs in CAðIÞ and C⁄(I) respectively. Denote the total preemption

F. Zheng et al. / Computers & Industrial Engineering 60 (2011) 542–549 543

penalty received by A in CAðIÞ as jPCAðIÞj. OPT is an offline optimal

algorithm and never aborts jobs, implying that there will be nopreemption penalties. Therefore, the competitive ratio of A is de-fined as rA ¼ supI

jC�ðIÞjjCAðIÞj�jPCA

ðIÞj. If q = 0, then rA ¼ supIjC�ðIÞjjCAðIÞj.

1.2. Previous results

Zheng et al. (2007) presented the WAL algorithm that makesuse of knowledge of D (the ratio of the length between the longestand shortest jobs) and proved their algorithm to be (3D + o(D))-competitive for D > 9 and q = 1. They also gave a (1.366D +0.366) lower bound.

Fung (2008) considered the general case for q > 0, and proved alower bound of ((1 + 1/q)1/dDe � 1)�1 + 1. When q = 1, the lowerbound is approximately D/ln 2 � 1.443D for large D, improvingthe previous bound of (1.366D + 0.366). Fung (2008) also pointedout that in fact WAL has a competitive ratio of (2 + q)D + o(D) forconstant q and sufficiently large D. When q = 1, the ratio is thesame as that proved in Zheng et al. (2007).

Some previous works for the online broadcast scheduling prob-lem are also relevant to the special case of q = 0 in our problem.Specifically, when translated to our terminology, Fung, Chin, andPoon (2005) proposed the Another Completes Earlier (ACE) algo-rithm and proved that it is Dþ 2

ffiffiffiffiDpþ 2

� �-competitive. This was

improved by Ting (2008) to O(D/log D), matching the lower boundof X(D/log D) by Zheng et al. (2006). Note that both Fung et al.’sand Ting’s algorithms require knowledge of D. Whether an equallycompetitive algorithm exists that does not assume knowledge of Dwas left as an open problem in Ting (2008). The best previous algo-rithm without knowledge of D is (4D + 1)-competitive, obtained bya simple extension of the greedy algorithm, GD, proposed by Kimand Chwa (2003).

1.3. Our contributions

Throughout this paper, we assume that 1 6 p(J) 6 D. For theproblem when q > 0, we give a tighter analysis of WAL and showthat it is ((1 + q)D + o(D))-competitive for a large enough D. Thisimplies that WAL is (2D + o(D))-competitive when q = 1, improv-ing the previous bound of (3D + o(D)).

Note that WAL knows the exact value of D beforehand. We alsopresent a modification of WAL so that it only needs to know a low-er bound on D, i.e., D P k3(1 + q)3 for some real number k > 1. Weprove that the modified algorithm is kð1þqÞ

k�1 Dþ oðDÞ� �

-competitivefor large enough D. As k increases, the ratio approaches((1 + q)D + o(D)) from above. Note that this result is useful in situ-ations, where the manufacturer may foresee the information ofsome future jobs at the beginning via certain business techniquesso that he has a lower bound on D.

For the problem when q = 0, we present an optimal (O(D/logD)-competitive) algorithm, which does not require knowledge ofD at all. This answers an open question in Ting (2008).

1.4. Related work

One can view the non-preemptive problem as a special case ofour problem, where q =1. Lipton and Tomkins (1994) studiedthe scenario when the job deadlines are always tight (intervalscheduling) and the job lengths are chosen from a finite set of realnumbers instead of an arbitrary number within [1,D]. One of theirresults is a two-competitive non-preemptive algorithm in the case,where p(J) is either 1 or D and the profit is proportional to the joblength (i.e., w(J) = p(J)). Goldwasser (2003) extended the work ofLipton and Tomkins (1994) and investigated the case, where eachjob has a slack time equal to k P 0 times of its length, i.e.,d(J) � a(J) = (k + 1)p(J). They proved a matching upper and lower

bound of 2þ dDe�1D

� �when 1

D 6 k < 1, and a matching bound of

1þ dDeD

� �when 1 6 k < D.

Preemption penalty has also been studied with other objectives,such as minimising flow time or total completion time. There, thepenalty is either modelled as set-up costs or as a requirement to re-do some portion of the preempted jobs (see e.g., Julian, Magazine,& Hall (1997), Liu & Cheng (2002), Liu & Cheng (2004) and the ref-erences therein).

1.5. Organisation of Paper

The rest of the paper is organised as follows. In Section 2, wegive our analysis of WAL and present a modified algorithm thatonly assumes knowledge of a lower bound on D. In Section 3, wegive an algorithm for the case, where q = 0 and does not requireany knowledge of D. Finally, Section 4 concludes the paper.

2. Scheduling with preemption penalties

2.1. The case with knowledge of D

In this section, we will give a tighter analysis of the algorithmWAL (Weight-and-Length) proposed in Zheng et al. (2007). We firststate the WAL Algorithm below.

The WAL Algorithm. The algorithm is triggered when either ajob is completed or a new job arrives. When WAL completes ajob, it will start to process the job with the largest profit amongthose that have arrived but not yet been satisfied. If a job R arriveswhile WAL is processing J, WAL will abort J to start R if and only ifone of the following two conditions is satisfied:

C1: w(R) P bw(J),C2: aw(J) 6w(R) < bw(J) and pðRÞ < pðJÞ=

ffiffiffiffiDp

,

where a is some constant (to be determined later) such that1 < a < b and b = D1/3. (Note that we could have chosen b = Dc forany positive c < 1/2. We fix b at D1/3 to avoid introducing moresymbols in our analysis.)

To analyse the competitive ratio of WAL, we define the notion ofa preempting chain (called a subschedule in Zheng et al., 2007) asfollows. A preempting chain in the schedule produced by WAL is asequence of jobs r = (J1, . . . , Jm) such that J1 is preceded by an idleperiod or a completed job, Ji is preempted by Ji+1 for all1 6 i 6m � 1 and Jm is a completed job.

Because OPT is an optimal offline algorithm, we can assumewithout loss of generality that it never aborts a job that it starts.By construction of WAL, every job scheduled by OPT must start be-tween the start and completion of some preempting chain unless ithas already been finished by WAL earlier. (Otherwise, if there issome job J started by OPT at time t outside any preempting chainand J has not been finished by WAL earlier, then J is available attime t while WAL is idle, a contradiction.) Thus, to prove an upperbound on the competitive ratio, it suffices to compute the maxi-mum ratio, r, of the profit of OPT to that of WAL on an arbitrarypreempting chain. Then the competitive ratio is at most r + 1.

The main idea of Zheng et al. (2007) is to continually modify apreempting chain until it possesses certain desirable properties.Moreover, the ratio of the optimal profit to that obtained by WALcan only increase by the sequence of changes. More precisely, sup-pose Ji+1 preempts Ji by condition C2 in r. Then we change theweight and processing time of Ji and Ji+1 so that Ji preempts Ji�1

by condition C2 and Ji+1 preempts Ji by condition C1. We achievethis by decreasing w(Ji) to w(Ji+1)/b and swapping p(Ji) and p(Ji+1).We repeat this change until no more such change is possible. Usingthis approach, Zheng et al. (2007) proved that the competitive ratiois at most 3D + o(D).

544 F. Zheng et al. / Computers & Industrial Engineering 60 (2011) 542–549

Here, we use a different approach. To simplify our notations, de-note by ai, wi and pi the arrival time, profit and length of job Ji

(1 6 i 6m) respectively in a preempting chain r = (J1, . . . ,Jm). Letjrj be the net profit of WAL in processing r. Thusjrj = wm � q(w1 +� � �+ wm�1). Let jr⁄j denote the total weight ofjobs started by OPT while WAL is processing r. Let Oi be the setof jobs that are started by OPT while WAL is processing Ji, and jOijbe the total profit of the jobs in Oi. Note that Oi may contain multi-ple jobs. Thus, jr�j ¼

Pmi¼1jOij.

We first provide some intuition. Observe that wi grows expo-nentially in i. Thus, the profits of both WAL and OPT in r are almostdetermined by the last several jobs in r. We will prove that no twoconsecutive abortions are due to condition C2. This will allow us toderive tighter bounds on the profit of WAL and OPT. For theremaining jobs, we can afford to be slightly more generous inupper bounding the profit of OPT and lower bounding that of WAL.

Below, we state two fundamental lemmas (proved in Zhenget al., 2007).

Lemma 2.1. Consider an arbitrary preempting chain r = (J1, . . . , Jm)produced by WAL. If Ji+1 preempts Ji by condition C2, thenpiþ1 <

ffiffiffiffiDp

< pi.

Proof. This follows easily from piþ1 < pi=ffiffiffiffiDp6

ffiffiffiffiDp

andpi >

ffiffiffiffiDp

piþ1 PffiffiffiffiDp

. h

Combining Lemma 2.1 and the second inequality in conditionC2, no two consecutive abortions can be caused by condition C2.

Lemma 2.2. Consider an arbitrary preempting chain r = (J1, . . . , Jm)produced by WAL.

(a) For 1 6 i < m, if pi 6ffiffiffiffiDp

, then

jOij < bffiffiffiffiDpþ 1

� �wi

and if pi >ffiffiffiffiDp

, then

jOij < adDewi

(b) If pm 6ffiffiffiffiDp

, then

jOmj < bffiffiffiffiDpþ 1

� �wm

and if pm >ffiffiffiffiDp

, then

jOmj < ðaDþ oðDÞÞwm

Proof. The first part of (a) and (b) are easy. If pi 6ffiffiffiffiDp

, OPT can startat most

ffiffiffiffiDpþ 1 jobs of unit-length, each of profit less than bwi.

Now, we prove the second part of (a). Note that all but the lastjob in Oi are started and finished between ai and ai+1. We claim thatthe last job, J, in Oi must be completed by OPT no later than ai+1 + 1.Suppose to the contrary that J is completed at time ai+1 + t for somet > 1. Then, OPT could have replaced J, which is of weight <bwi, by aunit-length job J

0of weight w(J

0) > w(J) and w(J

0) < abwi. Moreover,

OPT would start J0at ai+1 + t � 1. Note that WAL would not preempt

Ji+1 to start J0. If Ji+1 preempts Ji by condition C1, wi+1 P bwi and

hence w(J0) < awi+1. If Ji+1 preempts Ji by condition C2, wi+1 P awi

and piþ1 <ffiffiffiffiDp

by Lemma 2.1. Therefore, w(J0) < bwi+1 and

pðJ0ÞP piþ1=ffiffiffiffiDp

. Consequently, OPT could gain more by processingJ0, instead of J. This contradicts the optimality of OPT.

Now suppose OPT starts x jobs of length at least pi=ffiffiffiffiDp

. (So,0 6 x 6

ffiffiffiffiDp� �

). Each of these jobs must have profit less than bwi.Otherwise, WAL would have aborted Ji by condition C1. Becausethe total length of these jobs is at least xpi=

ffiffiffiffiDp

and the last job in Oi

is completed no later than ai+1 + 1, OPT can start at most

pi � xpi=ffiffiffiffiDp� �

jobs of length < pi=ffiffiffiffiDp

and each of these jobs musthave profit less than awi. Otherwise, WAL would have aborted Ji bycondition C2. Hence we have:

jOij < xbwi þ dpi � xpi=ffiffiffiffiDpeawi < ðpi þ 1Þawi þ ðb� pia=

ffiffiffiffiDpÞxwi:

If b� api=ffiffiffiffiDp

> 0, then the right hand side of the previous lineis maximised when x ¼

ffiffiffiffiDp� �

. Hence jOij < bffiffiffiffiDp� �

wi 6 adDewi forlarge enough D. If b� api=

ffiffiffiffiDp6 0, then the right hand side is max-

imised when x = 0. Therefore, jOij 6 dpieawi 6 adDewi.The proof for the second part of (b) is similar. The only

difference is that OPT can start, as the last one in Om, a job of lengthat least pm=

ffiffiffiffiDp

and profit less than bwm. More precisely, supposeOPT starts x jobs of length at least pm=

ffiffiffiffiDp

(and weight <bwm),where 1 6 x 6

ffiffiffiffiDp� �

. Then it can start and finish at mostbpm � ðx� 1Þpm=

ffiffiffiffiDpc unit-length jobs with weight <awm.

Therefore,

jOmj < xbwm þ pm � ðx� 1Þpm=ffiffiffiffiDpj k

awm

6 pm þ pm=ffiffiffiffiDp� �

awm þ b� pma=ffiffiffiffiDp� �

xwm:

jOmj is maximised either at x = 1 or x ¼ dffiffiffiffiDpe. Hence

jOmj < maxfbþ bpmca; pma=ffiffiffiffiDpþ b

ffiffiffiffiDp� �gwm 6 (aD + o(D))wm. h

Based on the above two lemmas, we have the followingtheorem.

Theorem 2.1. Suppose the preemption penalty is q times the profit ofeach preempted job (where q is a constant >0). Then WAL is((1 + q)D + o(D))-competitive for large enough D.

Proof. As discussed before, it suffices to bound the ratio jr⁄j/jrj foran arbitrary preempting chain r = (J1, . . . , Jm).

We first consider the case when m P 4. The total weight of thejobs Ji (1 6 i 6m � 3) is:

w1 þ � � � þwm�3 61

am�4 þ � � � þ1a0

wm�3 <

aa� 1

wm�3

and by Lemma 2.2,

jO1j þ � � � þ jOm�3j <a2dDea� 1

wm�3:

We now bound the ratio jr⁄j/jrj by the following case analysis.

Case 1: Jm preempts Jm�1 by condition C2. Then pm <ffiffiffiffiDp

byLemma 2.1. Also, by the construction of WAL,wm�1 6 wm/a. Because no two consecutive abortionsare due to condition C2, Jm�1 must abort Jm�2 due to con-dition C1. Hence wm�2 6wm/(a b) and wm�3 6 wm/(a2b).Using Lemma 2.2, jOmj < bð

ffiffiffiffiDpþ 1Þwm = o(D)wm and

jOm�1j < (adDe) wm�1 6dDewm. Also, jOm�2j < a dDewm�2

for large enough D. Therefore, jOm�2j < adDewm/(ab) = o(D)wm. Combining all the parts, we have

jO1j þ � � � þ jOmj <a2dDea� 1

wm

a2bþ oðDÞwm þ dDewm þ oðDÞwm

6 ðDþ oðDÞÞwm:

On the other hand, the net profit gained by WAL is at least

wm � qa

a� 1wm�3 þwm�2 þwm�1

� �P wm � q

aa� 1

1a2bþ 1

abþ 1

a

wm

P 1� qað1þ oð1ÞÞ

� �wm:

F. Zheng et al. / Computers & Industrial Engineering 60 (2011) 542–549 545

Hence the competitive ratio is at most aD/(a � q).Case 2: Jm preempts Jm�1 by condition C1. Then pm 6D and

wm�1 6 wm/b. Because at least one of Jm�3 and Jm�2 isaborted by condition C1, wm�2 6wm/(ab) andwm�3 6 wm/(a b2).

Similar to case 1, we have jOmj < (aD + o(D))wm,jOm�1j < adDewm/b =o(D)wm and jOm�2j < adDewm/(ab) =o(D)wm.

Combining all the parts, we have

jO1j þ � � � þ jOmj <a2dDea� 1

wm

ab2 þ oðDÞwm þ oðDÞwm þ ðaDþ oðDÞÞwm

6 ðaDþ oðDÞÞwm

whereas the net gain by WAL is

jrjP wm � qa

a� 1wm�3 þwm�2 þwm�1

� �P wm � q

aa� 1

1ab2 þ

1abþ 1

b

wm P ð1� oð1ÞÞwm:

Hence the competitive ratio is at most aD.Setting a = q + 1, the competitive ratio is at most aD + o(D) in

both cases.Now, consider the case when m 6 3. When m = 1, Lemma 2.2

directly gives the bound aD. When m = 2 or 3, the bounds obtainedabove for the two cases still hold. This completes the proof of thetheorem. h

2.2. The case with partial knowledge of D

In this section, we consider the case when the online algorithmhas only partial knowledge of D. Specifically, it knows of a lowerbound, eD, on D, i.e., D P eD.

Recall that the minimum processing time is 1. Thus, the maxi-mum job length ratio D is numerically equal to the maximumjob length. We define Dt as the maximum between eD and the max-imum job length of any job that has arrived by time t. We nowpresent our Dynamic-Preemption-Condition (DPC) algorithm.

The DPC Algorithm. The algorithm is triggered either when ajob is completed or when a new job arrives. In the former case,DPC will start a job with the largest profit among those that havearrived but are not yet satisfied. When a new job R arrives at timet, DPC will first update the current Dt if necessary. Then if anotherjob J is being served, DPC will abort J to start R if and only if eitherconditions below is satisfied:

C1: w(R) P btw(J)C2: aw(J) 6 w(R) < btw(J) and pðRÞ < pðJÞ=

ffiffiffiffiffiDtp

and J did not pre-empt its predecessor by condition C2

where a = q + 1 as in previous section and bt ¼ D1=3t . (Again, we

could have chosen b ¼ Dct for any positive c < 1/2).

Consider an arbitrary preempting chain r = (J1, . . . , Jm). The sym-bols ai, wi, and pi denote respectively the arrival time, weight andprocessing time of job Ji as usual. Furthermore, we let Di and bi

be respectively the value of Dt and bt when t = ai.

Lemma 2.3. Consider an arbitrary preempting chain r = (J1, . . . , Jm)produced by DPC. If Ji+1 preempts Ji by condition C2, thenpiþ1 <

ffiffiffiffiffiffiffiffiffiffiDiþ1

p< pi.

Proof. By condition C2, piþ1 < pi=ffiffiffiffiffiffiffiffiffiDiþ1p

. Because pi 6 Di < Di+1, wehave piþ1 <

ffiffiffiffiffiffiffiffiffiDiþ1p

. Because pi+1 P 1, we have pi >ffiffiffiffiffiffiffiffiffiDiþ1p

. h

Lemma 2.4. Consider an arbitrary preempting chain r = (J1, . . . , Jm)produced by DPC.

(a) For 1 6 i < m, if pi 6ffiffiffiffiffiDip

, then

jOij < biþ1

ffiffiffiffiffiDi

pþ 1

� �wi

and if pi >ffiffiffiffiffiDip

, then

jOij < ðaDi þ oðDiþ1ÞÞwi

(b) If pm 6ffiffiffiffiffiffiffiDmp

, then

jOmj < bmþ1

ffiffiffiffiffiffiffiDm

pþ 1

� �wm

and if pm >ffiffiffiffiffiffiffiDmp

, then

jOmj < ðaDm þ oðDÞÞwm

where bm+1 = D1/3.

Proof. The proof is similar to that of Lemma 2.2, except that D andb are replaced by the appropriate Dj’s and bj’s.

For the first part of (a) and (b), note that OPT can start at mostpi þ 1 6

ffiffiffiffiffiDipþ 1 unit-length jobs, each of weight less than bi+1wi

(where 1 6 i 6m).For the second part of (a), with similar analysis to the proof for

the second part of (a) in Lemma 2.2, we conclude that OPTcompletes the last job in Oi on or before time ai+1 + 1. We thenassume that OPT starts x jobs of length at least pi=

ffiffiffiffiffiffiffiffiffiffiDiþ1

pand

weight less than bi+1wi and at most dpi � xpi=ffiffiffiffiffiffiffiffiffiffiDiþ1

pe unit-length

jobs with weight less than awi. Together with 0 6 x 6ffiffiffiffiffiffiffiffiffiffiDiþ1

p� �, we

have jOij < maxfadpie; biþ1ffiffiffiffiffiffiffiffiffiffiDiþ1

p� �gwi 6 max {adDie, o(Di+1)wi 6

(aDi + o(Di+1))wi with similar analysis as in the proof of Lemma 2.2.The proof for the second part of (b) is similar to that of Lemma

2.2. Suppose OPT starts x long jobs so that condition C2 will nothold. Then each of these jobs has length at least pm=

ffiffiffiffiDp

and weight<bm+1wm. OPT can also start and finish at most bpm � ðx� 1Þpm=

ffiffiffiffiDpc unit-length jobs of weight <awm. Therefore, jOmj < xbmþ1

wm þ pm � ðx� 1Þpm=ffiffiffiffiDp� �

awm which is maximised at either x = 1or x ¼

ffiffiffiffiDp� �

. Therefore, jOmj < maxfbmþ1 þ bpmca;ffiffiffiffiDp� �

bmþ1þapm=

ffiffiffiffiDpgwm.

Hence jOmj < (aDm + o(D))wm. h

Theorem 2.2. Suppose the preemption penalty is q times the profit ofeach preempted job (where q is a constant >0), and it is known that

D > eD ¼ k3ðqþ 1Þ3 for some k > 1. Then DPC is kðqþ1Þk�1 Dþ oðDÞ

� �-

competitive for large enough D.

Proof. The proof idea is the same as that in Theorem 2.1. By theconstruction of DPC, no two consecutive abortions are caused bycondition C2 in an arbitrary preempting chain r = (J1, . . . , Jm).

Consider the jobs Ji (1 6 i 6m � 3). We have thatw1 þ � � � þwm�3 6

aa�1 wm�3. By Lemma 2.4(a), jO1j þ � � � þ jOm�3j <

a2Dm�3þaoðDm�2Þa�1 wm�3.

We now bound the ratio jr⁄j/jrj by a case analysis.

Case 1: Jm preempts Jm�1 by condition C2. Then pm <ffiffiffiffiffiffiffiDmp

byLemma 2.3. Also, by the construction of DPC,wm�1 6 wm/a. Because no two consecutive abortions aredue to condition C2, Jm�1 must abort Jm�2 due to conditionC1. Hence wm�2 6wm/(abm�1) and wm�3 6 wm/(a2bm�1).Using Lemma 2.4, jOmj <

ffiffiffiffiffiffiffiDmp

þ 1� �

bmþ1wm = o(D) wm

and jOm�1j < (aDm�1 + o(Dm))wm�1 6 (D + o(Dm))wm.Regarding jOm�2j, if Jm�2 preempts Jm�3 by condition C2, then

pm�2 6ffiffiffiffiffiffiffiffiffiffiffiffiDm�2p

and jOm�2j < bm�1ffiffiffiffiffiffiffiffiffiffiffiffiDm�2p

þ 1� �

wm�2 6 o(D)wm. IfJm�2 preempts Jm�3 by condition C1, then jOm�2j < (aDm�2 + o

546 F. Zheng et al. / Computers & Industrial Engineering 60 (2011) 542–549

(Dm�1))wm�2 6Dm�2bm�1þ oðDm�1Þ

abm�1

� �wm ¼ oðDÞwm. Thus, jOm�2j < o(D)wm

in both cases.By a similar argument, we can show that

jO1j +� � �+ jOm�3j < o(D)wm.Combining all the parts, we have

jO1j þ � � � þ jOmj < ðDþ oðDÞÞwm:

On the other hand, the net profit gained by DPC is at least

wm � qa

a� 1wm�3 þwm�2 þwm�1

� �P wm � q

aa� 1

1a2bm�1

þ 1abm�1

þ 1a

wm

P 1� qa

1qkaþ 1

kaþ 1

wm ¼

k� 1ka

wm

where the last equality uses the fact that a = q + 1. Hence the com-petitive ratio is at most kð1þqÞD

k�1 þ oðDÞ.Case 2: Jm preempts Jm�1 by condition C1. Then pm 6 D and

wm�1 6 wm/bm. Because at least one of Jm�3 and Jm�2 isaborted by condition C1, wm�2 6 wm/(abm) andwm�3 6 wm/(a bmbm�2).

Similar to case 1, we have jOmj < (aD + o(D))wm and jOm�1j <(aDm�1 + o(Dm))wm/bm = o(D)wm.

If Jm�2 preempts Jm�3 by condition C2, then pm�2 6ffiffiffiffiffiffiffiffiffiffiffiDm�2p

andjOm�2j < o(D)wm. If Jm�2 preempts Jm�3 by condition C1, thenjOm�2j < (aDm�2 + o(Dm�1))wm/(abm) = o(D)wm.

Combining all the parts, we have

jO1j þ � � � þ jOmj <a2Dm�3 þ aoðDm�2Þ

a� 1wm

abmbm�2þ oðDÞwm

þ oðDÞwm þ ðaDþ oðDÞÞwm

6 ðaDþ oðDÞÞwm

whereas the net gain by DPC is

jrjP wm � qa

a� 1wm�3 þwm�2 þwm�1

� �P wm � q

aa� 1

1abmbm�2

þ 1abmþ 1

bm

wm

P 1� aa3k2 �

qa2k� q

ka

wm P

ðk� 1Þðka2 þ 1Þk2a2

wm

Pk� 1

kwm:

Hence the competitive ratio is at most kð1þqÞk�1 Dþ oðDÞ. h

By Theorem 2.2, as k increases, the competitive ratio of DPCapproaches ((1 + q)D + o(D)), which is the competitive ratio ofWAL in the case with the knowledge of D.

3. Scheduling without preemption penalties

In this section we will discuss the case when q = 0, i.e., there areno preemption penalties. For the case, where the online algorithmknows D beforehand, Ting (2008) proposed the BALANCE algo-rithm, which is 6D

log Dþ OðD5=6Þ� �

-competitive and matches the low-er bound by Zheng et al. (2006). (Note: All logarithms in thissection are of base 2.) In this section, we will investigate the case,where the online algorithm does not have knowledge of D at thebeginning. We will present the Dynamic-Preemption-Condition-1(abbr. DPC1) algorithm and prove its optimal competitiveness.

Similar to BALANCE, DPC1 makes two kinds of preemptions: thegood-profit preemption that would increase the anticipated profit ofprocessing, and the short-length preemption that would not in-crease the anticipated profit of processing but would reduce the

completion time. Before describing the DPC1 algorithm, we givesome preliminary definitions. Given an arbitrary input job list C,let r = (J0, . . . , Jm) be a preempting chain produced by DPC1 such thatJi is preempted by Ji+1 for 0 6 i < m and Jm is completed by DPC1. J0

preempts no other job, that is, r cannot be backward-extended. Ifm = 0, then r consists of a single job completed by DPC1. If Ji pre-empts Ji�1 by good-profit preemption, Ji is called a gp job. Other-wise, if Ji preempts Ji�1 by short-length preemption, it is an spjob. J0 preempts none and we treat it as a gp job. Suppose that Ji

is a gp job, and Jj is an sp job for j = i + 1, . . . ,k, then we call Ji thenearest preceding gp job of Jj for j = i, . . . ,k. Note that Ji itself is thenearest preceding gp job of Ji. Let dt be the maximum length of jobsthat have arrived by time t, at which DPC1 gets to know dt. Letkt = 3dt/log dt. Denote by s(Ji) the time at which DPC1 starts Ji.DPC1 is formally described as follows.

The DPC1 Algorithm. The algorithm is triggered either when ajob is completed or when a new job arrives. After completing a job,DPC1 will start the job with the largest profit among those thathave arrived but have not been satisfied yet. Otherwise, it remainsidle if there is no such job. Suppose that while DPC1 is processingjob J, whose nearest preceding gp job is J

0, a new job R arrives at

time t 2 (s(J), s(J) + p(J)). DPC1 will abort J to start R immediatelyif either of the two conditions below is satisfied:

C1: wðRÞPffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffimaxf21; dsðJ0 Þg

qwðJ0Þ

C2: The anticipated completion time of R, tc = a(R) + p(R), isstrictly earlier than s(J) + p(J) and furthermore,

wðRÞ <ffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffimaxf21; dsðJ0 Þg

qwðJ0Þ and

wðRÞP2dðsðJ0 Þ;tc Þ

ðdtÞ1=3

� �wðJ0Þ if dsðJ0Þ > 21

wðJ0Þ otherwise

8<:

where dðsðJ0Þ; tcÞ ¼ tc�sðJ0 Þ

ksðJ0 Þ

j k.

Note that 2dðsðJ0 Þ;tc Þ

ðdt Þ1=3 6 1. Moreover, w(R) is compared with w(J0) but

not w(J), in both conditions C1 and C2. If R preempts J by conditionC1, then R is a gp job. Otherwise if R preempts J by condition C2,then R is an sp job and a(R) + p(R) < s(J) + p(J) 6 s(J

0) + p(J

0), where

the second inequality is tight when J = J0.

3.1. Basic properties

By the construction of DPC1, all the jobs in r = (J0, . . . , Jm) exceptJ0 are started by DPC1 on their arrivals. So, s(Ji) = a(Ji) holds for0 < i 6m. Job J0 may or may not be started by DPC1 on its arrival.

Property 1. In an arbitrary preempting chain r = (J0, . . . , Jm) producedby DPC1, pðJiÞ 6 dsðJiÞ 6 dsðJiþ1Þ for 0 6 i 6m � 1.

Proof. By the definition of dt, it is a non-decreasing function intime t. First, dsðJiÞ 6 dsðJiþ1Þ due to s(Ji) < s(Ji+1). Because Ji shall arriveon or before s(Ji), p(Ji) is a candidate for dsðJiÞ, implying thatpðJiÞ 6 dsðJiÞ. h

Assume that there are n + 1(n P 0) gp jobs in r = (J0, . . . , Jm). Wewill divide r into n + 1 segments r = (s0, . . . ,sn) such that in eachsegment si ¼ ðRi;0; Ri;1; . . . ; Ri;ki

Þ ð0 6 i 6 nÞ, the first job Ri,0 is agp job and the other ki jobs are sp jobs. If ki = 0, this means thatthere are no sp jobs in si. For 0 6 i < n, the last job in si will bepreempted by Ri+1,0 by condition C1. For sn, Rn;kn ¼ Jm.

Property 2. In an arbitrary preempting chain r = (s0, . . . ,sn)produced by DPC1, we have that s(Ri+1,0) � s(Ri,0) < p(Ri,0) for 0 6 i < n.

F. Zheng et al. / Computers & Industrial Engineering 60 (2011) 542–549 547

Proof. By the definition of segment si, Ri,j(1 6 j 6 ki) is a sp job. So,sðRi;ki

Þ þ pðRi;kiÞ < sðRi;0Þ þ pðRi;0Þ. Furthermore, sðRiþ1;0Þ < sðRi;ki

ÞþpðRi;ki

Þ because Ri;kiis preempted by Ri+1,0 at time s(Ri+1,0). So,

s(Ri+1,0) � s(Ri,0) < p(Ri,0). h

Let jrj be the total profit obtained by DPC1 in r. Let jr⁄j and s�i

be the total profit of jobs that are started by OPT while DPC1 isserving r and si respectively. Then, jr�j ¼

Pni¼0 s�i . We will first

bound s�i with respect to w(Ri,0). For notational convenience, de-

note by ai, wi and pi the arrival time, weight and processing lengthof job Ri,0, respectively, and by si the time DPC1 starts Ri,0. For1 6 j 6 ki, denote by ai,j, wi,j, pi,j, and si,j those parameters of Ri,j

respectively in the rest of this section.

Lemma 3.1. For 0 6 i < n, if dsi 6 21, then

js�i j < dsiþ

ffiffiffiffiffiffi21p� �

wi;

otherwise if dsi> 21, then

s�i < 6dsi

log dsi

þffiffiffiffiffidsi

q wi:

Furthermore, if dsn 6 21,

s�n < dsn þ

ffiffiffiffiffiffi21p� �

wn;

otherwise if dsn > 21, then

s�n < ksn � 2

dðsn ;sn;knþpn;kn Þþ1

ðdsn Þ1=3 þ

ffiffiffiffiffiffidsn

p !wn:

Proof. We first consider s�i for 0 6 i < n.

Case 1: dsi6 21. First, si starts and ends at time si and si+1 respec-

tively, and si+1 � si < pi by Property 2. Moreover, pi 6 dsi

by Property 1. OPT starts at most bsiþ1 � sic 6 bpic 6 dsi

unit-length jobs with weight less than wi followed byone job with weight less than

ffiffiffiffiffiffi21p

wi. So, js�i j <dsiþ

ffiffiffiffiffiffi21p� �

wi in this case.

Case 2: dsi> 21. This is proved by similar reasoning as in Lemma

3 of Ting (2008). More precisely, let Q1, Q2, . . ., Qh be thesequence of jobs started by OPT within the time interval[si,si+1). For all 1 6 j 6 h � 1, Qj completes before si+1,that is, a(Qj) + p(Qj) < si+1. On the other hand,siþ1 < ai;j0 þ pi;j0 for all 1 6 j

06 ki as the Ri;j0 ’s are all sp

jobs. By construction of DPC1, we have that wðQ jÞ <2dðsi ;aðQj ÞþpðQj ÞÞ

d1=3si

wi as none of the Qj’s preempts any Ri;j0 .

Now, observe that for each integer k 2 [0,d(si,si+1)], atmost ksi

of the Qj’s has d(si,a(Qj) + p(Qj)) = k because eachQj has length at least 1. It follows that wðQ 1Þ þ � � � þ

wðQ j�1Þ <ksi

2dðsi ;siþ1 Þþ1

d1=3si

wi. Finally, wðQ hÞ <

ffiffiffiffiffidsi

pwi;

otherwise, Qh would have preempted Ri,0 by conditionC1. It follows that

s�i < ksi

� 2dðsi ;siþ1Þþ1

ðdsiÞ1=3 þ

ffiffiffiffiffidsi

q !wi:

Together with Properties 1 and 2, we have 2dðsi ;siþ1Þ6 2

b piksic6

2bdsiksic6 ðdsi

Þ1=3 for 0 6 i < n. Thus,

s�i < 6dsi

log dsi

þffiffiffiffiffidsi

q wi:

For the segment sn, the last job is Rn;kn ¼ Jm completed by DPC1.OPT will start its last job in sn strictly earlier thansðJmÞ þ pðJmÞ ¼ sn;kn þ pn;kn

. Using similar argument as in cases 1and 2 above, s�n

can be upper bounded as stated in the lemma.This completes the proof of the whole lemma. h

We will also need the following technical lemma in the compet-itive analysis to follow.

Lemma 3.2. Given an arbitrary i P 0; f ðx; iÞ ¼ 1þ 6ffiffixp

log x

� �1þ 1ffiffi

xp þ 1ffiffi

xpð Þ2

þ � � � þ 1ffiffi

xpð ÞiÞ ¼ 1þ 6

ffiffixp

log x

� � ffiffixpffiffixp�1 1� 1ffiffi

xp� �iþ1

is an

increasing function of x when x > 21.

Proof. First, f ðx;þ1Þ ¼ 1þ 6ffiffixp

log x

� � ffiffixpffiffixp�1 increases in x because its

first order derivative with respect to x is positive when x > 21.

Moreover, 1� 1ffiffixp� �iþ1

increases in x for i P 0. Hence, f(x,i) increases

in x. The lemma follows. h

3.2. Competitive analysis

Theorem 3.1. DPC1 is 6Dlog Dþ OðD5=6Þ� �

-competitive when 21 < D

andffiffiffiffi21pffiffiffiffi21p�1

Dþ 6:9� �

-competitive when 1 < D 6 21, respectively.

Proof. Let C be the schedule produced by DPC1 for a given job inputlist. Assume, without loss of generality, that DPC1 completes g(P1)jobs in C. We can divide C into g preempting chains so that in eachpreempting chain, only the last job is completed by DPC1. Becausethe total profit of both OPT and DPC1 in C is the simple summationof their respective total profits in each preempting chain, to upperbound the ratio between the profit of OPT and that of DPC1 in C, itsuffices to bound the ratio in an arbitrary preempting chainr = (s0, . . . ,sn), where si (0 6 i 6 n) are segments defined before.For DPC1, jrj = wm by the definition of r. Assume that dsk

6 21 anddt > 21 for some t 2 (sk,sk+1], where 0 6 k < n. If dsn 6 21, we setk = n. We will discuss two cases, where 0 6 k 6 n � 1 and, wherek = n.

Case 1: 0 6 k 6 n � 1 Let ri ¼ffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffimaxf21; dsi

gp

. Because Ri,0 pre-empts Ri�1;ki�1

by condition C1,wi 6 wiþ1=ri 6 . . . 6 wn=

Qn�1j¼i rj.

jr�j � s�n ¼Xn�1

i¼0

s�i

<Xk

i¼0

dskþ

ffiffiffiffiffiffi21p� �

wi þXn�1

i¼kþ1

6dsi

log dsi

þffiffiffiffiffidsi

q wi

6

Xk

i¼0

dskþ

ffiffiffiffiffiffi21p� �

wnffiffiffiffiffiffi21p� �n�i

þXn�1

i¼kþ1

6dsi

log dsi

þffiffiffiffiffidsi

q wnQn�1j¼i rj

<dskþ

ffiffiffiffiffiffi21p� �

wnffiffiffiffiffiffi21p

� 1� � ffiffiffiffiffiffi

21p� �n�k�1 þ

Xn�1

i¼kþ1

6dsi

log dsi

þffiffiffiffiffidsi

q wnQn�1

j¼irj

where the first inequality follows from Lemma 3.1, and the second

inequality holds becauseffiffiffiffiffiffi21p

6 ri and hence wi 6 wn=ffiffiffiffiffiffi21p� �n�i

for

0 6 i 6 k. For the third inequality, the first term on the right hand

side isdskþffiffiffiffi21pð Þwnffiffiffiffi

21p�1ð Þ ffiffiffiffi

21pð Þn�k�1 6

21þffiffiffiffi21pð Þwnffiffiffiffi

21p�1ð Þ ffiffiffiffi

21pð Þn�k�1 ¼ Oð1Þwn for 0 6 k 6 n � 1.

Below we will bound the second term. Note that ri ¼ffiffiffiffiffidsi

pfor

k + 1 6 i < n. Combining dsi6 dsiþ1

with Lemma 3.2, we have that

548 F. Zheng et al. / Computers & Industrial Engineering 60 (2011) 542–549

Xn�1

i¼kþ1

6dsi

log dsi

þffiffiffiffiffidsi

q wnQn�1j¼i rj

66

ffiffiffiffiffiffiffiffiffidskþ1

plog dskþ1

þ 1

!wnQn�1

j¼kþ2rj

þXn�1

i¼kþ2

6dsi

log dsi

þffiffiffiffiffidsi

q wnQn�1j¼i rj

66

ffiffiffiffiffiffiffiffiffidskþ2

plog dskþ2

þ 1

!1þ 1ffiffiffiffiffiffiffiffiffi

dskþ2

p !wnQn�1

j¼kþ3rj

þXn�1

i¼kþ3

6dsi

log dsi

þffiffiffiffiffidsi

q wnQn�1j¼i rj

6 . . .

66

ffiffiffiffiffiffiffiffiffidsn�1

plog dsn�1

þ 1

!1þ 1ffiffiffiffiffiffiffiffiffi

dsn�1

p þ . . .þ 1ffiffiffiffiffiffiffiffiffidsn�1

p� �n�k�2

0@ 1Awn

66ffiffiffiffiDp

log Dþ 1

! ffiffiffiffiDpffiffiffiffiDp� 1

1� 1ffiffiffiffiDp� �n�k�1

0@ 1Awn

where the last inequality holds due to dsn�1 6 dsn 6 D and Lemma3.2. Consider the right hand side of the last inequality above. If

k < n � 1, it is less than 6ffiffiffiDp

log Dþ 1� � ffiffiffi

DpffiffiffiDp�1

wn ¼ 6ffiffiffiDp

log D wn þ Oð1Þwn. Other-

wise, if k = n � 1, it is equal to 0. Thus

jr�j � s�n < 6

ffiffiffiffiDp

log Dwn þ Oð1Þwn:

We already bound s�n from above by ksn �2

dðsn ;sn;knþpn;kn

Þþ1

ðdsn Þ1=3 þ

ffiffiffiffiffiffidsn

p wn.

Thus, the ratio between what OPT and DPC1 gain in r can bebounded in two subcases according to whether sn consists of a sin-gle job, i.e., kn = 0.

Case 1.1. kn = 0 and then DPC1 completes Rn,0, implying thatjrj = wn.

s�n < ksn � 2

dðsn ;snþpnÞþ1

ðdsn Þ1=3 þ

ffiffiffiffiffiffidsn

p !wn 6

6dsn

log dsn

þffiffiffiffiffiffidsn

p wn

66D

log Dþ

ffiffiffiffiDp

wn:

OPT may still satisfy Rn,0 after DPC1 if the job has a sufficiently largedeadline, and thus OPT gains at most jr⁄j + wn in r. Hence,

jr�j � s�n � �

=jrj ¼ OffiffiffiDp

log D

� �, and then ðjr�j þwnÞ=jrj < 6D

log Dþ OffiffiffiffiDp� �

in this case.Case 1.2. kn > 0. In this case, jrj ¼ wn;kn P 2dðsn ;sn;kn

þpn;knÞ

ðdsn Þ1=3 wn, which is

larger than wn

ðdsn Þ1=3 >

wn

D1=3 because dðsn; sn;kn þ pn;knÞ > 0.

So, jr�j � s�n � �

=jrj ¼ O D5=6

log D

� �and !

s�n < ksn � 2

dðsn ;sn;knþpn;kn Þþ1

ðdsn Þ1=3 þ

ffiffiffiffiffiffidsn

pwn:

Similar to Case 1.1, OPT may satisfy Rn;knwith profit wn;kn

afterDPC1 does. With dsn 6 D, we have that s�n

=jrj < 2ksnþffiffiffiffiffiffidsn

pD1=3

66D

log Dþ OðD5=6Þ and then ðjr�j þwn;knÞ=jrj < 6D

log DþOðD5=6Þ in this case.

Case 2: k = n and then dsn 6 21. In this case, wi 6 wn=ffiffiffiffiffiffi21p� �n�i

for 0 6 i 6 n. DPC1 will complete Rn;kn with weightwn;kn , which is at least wn, by the construction of DPC1.That is, jrjP wn. For OPT, jr⁄j can be bounded usingLemma 3.1:

jr�j ¼Xn

i¼0

s�i <Xn

i¼0

dskþ

ffiffiffiffiffiffi21p� �

wi 6Xn

i¼0

dskþ

ffiffiffiffiffiffi21p� �

ffiffiffiffiffiffi21p� �n�i

wn

<

ffiffiffiffiffiffi21p

dskþ

ffiffiffiffiffiffi21p� �

ffiffiffiffiffiffi21p

� 1� � wn:

OPT may satisfy Rn;kn after DPC1 does and thus

ðjr�j þwn;kn Þ=jrj <

ffiffiffiffiffiffi21p

dskþ

ffiffiffiffiffiffi21p� �

ffiffiffiffiffiffi21p

� 1� � þ 1 <

ffiffiffiffiffiffi21pffiffiffiffiffiffi21p

� 1� � dsk

þ 6:9:

If 21 < D, ðjr�j þwn;kn Þ=jrj < 21ffiffiffiffi21pffiffiffiffi

21p�1ð Þ þ 6:9 ¼ oðDÞ by dsk

6 21, other-

wise if D 6 21, then ðjr�j þwn;kn Þ=jrj <ffiffiffiffi21pffiffiffiffi21p�1ð ÞDþ 6:9 because

dsk6 D.The theorem follows. h

Because the lower bound in Zheng et al. (2006) applies to thisproblem, DPC1 is an optimal scheduler.

4. Conclusion

In this paper, we discussed online deadline scheduling underthe preemption penalty model introduced by Zheng et al. (2007).We gave a tighter analysis of their WAL algorithm and showed thatit is ((1 + q)D + o(D))-competitive for large enough D, where q P 0is the preemption penalty parameter of the model. The WAL algo-rithm requires knowledge of the exact value of D. When we onlyknow that D P k3(q + 1)3 for some k > 1, we presented an algo-

rithm which is kðqþ1Þk�1 Dþ oðDÞ

� �-competitive for large enough D.

The ratio approaches (1 + q)D + o(D) as k increases.For the special case, where q = 0 (i.e., there is no preemption

penalties), we presented a 6Dlog Dþ OðD5=6Þ� �

-competitive optimal

algorithm, which does not require the knowledge of D a priori.Note that the algorithm is assumed to know the minimum jobweight. Designing an algorithm that does not need such knowledgeis still an open problem.

For the first problem with the knowledge of D, there is still agap of approximately 0.557D between upper and lower boundsfor the special case, where q = 1. An obvious open question is topinpoint the true competitive ratio. It is also interesting to findout whether randomisation helps to break the lower bound of1.443D for q = 1.

Acknowledgement

The authors thank the anonymous referees for their helpfulsuggestions. The work described in this paper was fully supportedby a grant from the Research Grants Council of the Hong Kong SAR,China [CityU 119307], and the NSFC Grants, 71071123 and60736027.

References

Baruah, S., Koren, G., Mao, D., Mishra, B., Raghunathan, A., Rosier, L., et al. (1992). Onthe competitiveness of on-line real-time task scheduling. Real-Time Systems,4(2), 125–144.

Baruah, S., Koren, G., Mishra, B., Raghunathan, A., Rosier, L., & Shasha, D. (1991). On-line scheduling in the presence of overload. In 32nd Annual symposium onfoundations of computer science (pp. 100–110).

Borodin, A., & El-yaniv, R. (1998). Online computation and competitive analysis.Cambridge University Press.

Fung, S. (2008). Lower bounds on online deadline scheduling with preemptionpenalties. Information Processing Letters, 108(4), 214–218.

Fung, S., Chin, F., & Poon, C. (2005). Laxity helps in broadcast scheduling. InProceedings of 9th Italian conference on theoretical computer science, Lecture notesin computer science (Vol. 3701, pp. 251–264). Springer.

Goldman, S., Parwatikar, J., & Suri, S. (2000). Online scheduling with hard deadlines.Journal of Algorithms, 34, 370–389.

Goldwasser, M. (2003). Patience is a virtue: The effect of slack on competitivenessfor admission control. Journal of Scheduling, 6(2), 183–211.

Hoogeveen, H., Potts, C. N., & Woeginger, G. J. (2000). On-line scheduling on a singlemachine: Maximizing the number of early jobs. Operations Research Letters, 27,193–197.

Julian, F., Magazine, M., & Hall, N. (1997). Generalized preemption models forsingle-machine dynamic scheduling problems. IIE Transactions, 29, 359–372.

F. Zheng et al. / Computers & Industrial Engineering 60 (2011) 542–549 549

Kim, J.-H., & Chwa, K.-Y. (2003). Scheduling broadcasts with deadlines. In 10thInternational computing and combinatorics conference (pp. 415–424). LNCS 2697.

Lee, J.-H., 2003. Online deadline scheduling: multiple machines and randomization.In 15th Annual ACM symposium on parallel algorithms and algorithms (pp. 19–23).

Lipton, R., & Tomkins, A. (1994). Online interval scheduling. In Proceedings of 5thACM–SIAM symposium on discrete algorithms (pp. 302–311).

Liu, Z., & Cheng, T. E. (2002). Scheduling with job release dates, delivery times andpreemption penalties. Information Processing Letters, 82(2), 107–111.

Liu, Z., & Cheng, T. E. (2004). Minimizing total completion time subject to job releasedates and preemption penalties. Journal of Scheduling, 7(4), 313–327.

Pruhs, K., Torng, E., & Sgall, J. (2004). Online scheduling. In J. Y. Leung (Ed.),Handbook of scheduling: Algorithms, models and performance analysis (pp. 15-1–15-41). CRC Press.

Shmoys, D., Wein, J., & Williamson, D. (1995). Scheduling parallel machines on-line.SIAM Journal on Computing, 24, 1313–1331.

Ting, H. (2008). A near optimal scheduler for on-demand data broadcasts.Theoretical Computer Science, 410(1–3), 77–84.

Zheng, F., Fung, S., Chan, W., Chin, F., Poon, C., & Wong, P. (2006). Improved on-linebroadcast scheduling with deadlines. In The 12th annual international computingand combinatorics conference, Lecture notes in computer science (Vol. 4112, pp.320–329). Springer.

Zheng, F., Xu, Y., & Zhang, E. (2007). On-line production order scheduling withpreemption penalties. Journal of Combinatorial Optimization, 2(13), 189–204.