Computers & Operations Research 31 (2004) 2055 – 2061
www.elsevier.com/locate/dsw
Parallel machine scheduling under a grade of service provision Hark-Chin Hwanga;1 , Soo Y. Changb;∗ , Kangbok Leeb a
Department of Industrial Engineering, Chosun University, 375 Susuk-Dong, Dong-Gu, Gwangju 501-709, South Korea b Industrial Engineering Department, Division of Electrical and Computer Engineering, Pohang University of Science and Technology, San 31 Hyoja-Dong, Pohang, Kyungbook 790-784, South Korea
Abstract We consider the problem of scheduling parallel machines that process service requests from various customers who are entitled to many di1erent grade of service (GoS) levels. We propose and analyze one simple way to ensure such di1erentiated service. In particular, we investigate how the longest processing time 5rst algorithm (LPT) would perform in the worst case and show that a slight modi5cation of LPT could signi5cantly improve its worst-case performance. ? 2003 Elsevier Ltd. All rights reserved. Keywords: Parallel machine scheduling; Longest processing time 5rst; Eligibility; Grade of service
1. Introduction In service industry, the service providers often have special customers, such as, silver, gold, or platinum members who are more valued than the regular members. Those special members are usually entitled to premium services, and, hence, some kind of di1erentiated service policy must be implemented by the service provider. One simple scheme for providing di1erentiated service is to label machines and jobs with prespeci5ed grade of service (or GoS) levels and allow each job to be processed by a particular machine only when the GoS level of the job is no less than the GoS level of the machine. In e1ect, the processing capability of the machines labelled with high GoS levels tends to be reserved for the jobs with high GoS levels. Hence, if we label relatively higher GoS levels on the jobs from valued ∗
Corresponding author. E-mail address:
[email protected] (S.Y. Chang). 1 Supported by research funds from Chosun University.
0305-0548/$ - see front matter ? 2003 Elsevier Ltd. All rights reserved. doi:10.1016/S0305-0548(03)00164-3
2056
H.-C. Hwang et al. / Computers & Operations Research 31 (2004) 2055 – 2061
customers, we can ensure better service to more valued customers. In such situation, assigning jobs to the machines becomes a parallel machine scheduling problem with a special eligibility constraint. Although the makespan is not always the best choice for measuring the goodness of the schedule, it is chosen as the objective function to be minimized in this paper for the following reason. We are looking at the particular case where we have a few clusters of the same number of identical parallel processors and one special processor called load balancer. The load balancer receives and collects customer service requests over a short period of time and assigns the batch of collected jobs to one of the idle clusters. The load balancer recognizes each cluster to be idle only when each cluster completes the processing of all the jobs in the batch under processing and register its idle state to the load balancer. In order to have each cluster get ready as soon as possible for the next batch, the makespan of the schedule for each batch is certainly the most appropriate measure to be minimized. For more formal de5nition of our problem instance, we de5ne J ={a1 ; : : : ; an } and M ={b1 ; : : : ; bm } to be the sets of jobs and machines, respectively. Each job aj requires the processing time of p(aj ) and is labelled with the GoS level of g(aj ). Each machine bi is also labelled with the GoS level g(bi ) and bi is allowed to process job aj only when g(bi ) 6 g(aj ). A schedule is, then, a partition of J into m disjoint sets, S = S1 ; : : : ; Sm , such that Si is allowed to include aj only if g(bi ) 6 g(aj ). The makespan of a schedule S can be de5ned as max16i6m t(Si ), where t(Si ) = aj ∈Si p(aj ) if Si = ∅, and 0, otherwise. Then, an instance of our scheduling problem can be denoted by (J; M ; p; g) or (J; M ) for short, which we call an instance of the parallel machine scheduling with GoS eligibility. When all the jobs have the same GoS level, say , we may delete all the machines with their GoS level greater than , and only have to deal with the machines having their GoS level less than or equal to . In such special case, if the number of machines that we need to deal with is m, we see that our problem is the ordinary identical parallel machine scheduling problem of minimizing the makespan which is often denoted by Pm Cmax , following the notational convention developed in [1]. The decision version of this problem is NP-complete but pseudo-polynomially solvable for m = 2. It is NP-complete in the strong sense for m ¿ 3, since the 3-PARTITION problem, which is known to be NP-complete in the strong sense, can be reduced to the decision version of P3 Cmax [2]. To tackle NP-hard problems, theoretical research has been focused on analyzing the worst-case performance of approximation algorithms. In the case of Pm Cmax without eligibility constraints, LPT (longest processing times 5rst) and MULTIFIT [3] yield schedules with makespan no more than 43 − 13 m [4] and 13 times the optimum [5], respectively. 11 In the case of the problem with eligibility, Azar et al. [6] presented a kind of list scheduling algorithm, AW, and proved that it always generates a schedule with makespan no greater than log2 2m times optimum. However, this bound is not a constant but an increasing function of m. Lenstra et al. [7] proposed a binary search algorithm based on linear programming and proved the constant worst-case bound of two for the most general problem of unrelated parallel machine scheduling which certainly covers the case of the problem with eligibility. However, their algorithm must employ linear programming solution module whose computational complexity is not yet proven to be strongly polynomial. In other words, its complexity is polynomially bounded with respect not to the number of constraints and variables but to the actual magnitudes of the values of data de5ning the particular linear programming problem to be solved. In this paper, we propose a simple algorithm, that we call lowest grade-longest processing times 5rst (LG-LPT) whose computational complexity is strongly polynomial and the worst-case makespan
H.-C. Hwang et al. / Computers & Operations Research 31 (2004) 2055 – 2061
2057
of the generated schedule is no more than twice the optimum. In particular, the makespan of the schedule generated by the proposed algorithm is proven to be no more than 54 for m = 2 and 2 − 1=(m − 1) for m ¿ 3 times the optimum. In Section 2, we demonstrate the importance of taking the eligibility into account and establish a basic property of our proposed algorithm. In Section 3, we present the result of our worst-case analysis.
2. Algorithm AW The algorithm AW, proposed by Azar et al. in [6], simply picks and assigns an arbitrary unassigned job to one of the eligible machines that has the least load, while breaking ties by choosing the machine with the lowest index. We note that AW does not take the eligibility into account in deciding the order of jobs to be assigned. Due to this, for some of our problem instances, AW may yield a schedule with theoretically proven worst-case makespan of log2 2m times the optimum, as demonstrated in the following example. Example 1. Consider a problem with J and M , where m = n = 2k for some positive integer k. Every job has the same processing time of 1 and the GoS levels of machines and jobs are set as; g(a1 ) = m; g(a2 ) = m − 1; : : : ; g(am ) = 1 and g(b1 ) = 1; g(b2 ) = 2; : : : ; g(bm ) = m. Then, AW may yield a schedule that the 5rst m=2 jobs, a1 ; a2 ; : : : ; am=2 , are assigned to the machines b1 ; b2 ; : : : ; bm=2 , next m=4 jobs are assigned to the machines b1 ; b2 ; : : : ; bm=4 and so on, until the last two jobs am and am−1 are both assigned to the machine b1 yielding the makespan of log 2m as shown in Fig. 1. However, an optimal schedule with makespan of 1 can be constructed by assigning job aj to machine bm−j+1 for all j, 1 6 j 6 m. A worthwhile thing to be noted at this point is the fact that even LPT could also yield exactly the same schedule as AW, since every job has identical processing time in this particular example. This clearly suggests a better approach to the problem in which not only the processing time but also the eligibility of each job is taken into account. In fact, as demonstrated below, we can even get an optimum solution for this problem, if we assign jobs to their eligible machines in a proper order obtainable by the use of the eligibility information.
b1
a1
am/2+1
am-3
b2
a2
am/2+2
am-2
bm/4 bm/2
am-1
am
b1 b2
bm/4 am/4-1
am/4
bm/2 am/2+1 bm/2+1 am/2
am/2
bm/2+1
(a)
bm
am am-1
(b)
bm
Fig. 1. (a) AW and (b) optimal schedule.
a1
2058
H.-C. Hwang et al. / Computers & Operations Research 31 (2004) 2055 – 2061
Instead of an arbitrary ordering, consider the ordering of jobs where the job aj precedes ak when g(aj ) ¡ g(ak ), or if g(aj ) = g(ak ), p(aj ) ¿ p(ak ) holds. And we denote such precedence by aj 4 ak , and call it LG-LPT order. In the case of the above example, one can easily observe that an optimum solution can be obtained, if AW picks and assigns jobs in the order of LG-LPT instead of choosing jobs arbitrarily. The development of our algorithm is motivated by this simple observation. Throughout the remaining of this paper, we assume that aj−1 4 aj , j = 2; 3; : : : ; n and g(bi−1 ) 6 g(bi ), i =2; 3; : : : ; m, for notational simplicity. Also, we assume that the optimum makespan is always 1, since we can rede5ne p(aj ) as p(aj ) divided by the optimum makespan, without loss of generality. For further notational convenience, we introduce the concept of the range of each job, denoted by (aj ) which is simply the number of machines that are eligible to process aj , namely the number of machines with g(bi ) 6 g(aj ). Then, due to the nature of (aj ) and the assumed ordering of machines, we observe that the job aj can be assigned to any one of the 5rst (aj ) machines, i.e. b1 through b(aj ) . Also note that we can assume that (an ) = m, since, otherwise, we can delete all bi ’s with g(bi ) ¿ g(an ), without changing the structure of the problem.
3. Algorithm LG-LPT The algorithm LG-LPT fetches the 5rst one from the list of unassigned jobs sorted in LG-LPT order and assigns it to the least-loaded eligible machine, as formally described in Fig. 2. In the next theorem, we analyze the worst-case performance of LG-LPT.
Fig. 2. Algorithm LG-LPT.
H.-C. Hwang et al. / Computers & Operations Research 31 (2004) 2055 – 2061
2059
Theorem 1. For identical parallel machine scheduling problem with GoS eligibility, LG-LPT always yields a schedule with its makespan. 6 54 times the optimum makespan for m = 2, 6 2 − 1=(m − 1) times the optimum makespan for m ¿ 3. Proof. We prove the theorem in two separate cases. Case 1: m ¿ 3. Suppose that the theorem is false for m ¿ 3. Then, there must exist a counterexample (J; M ) with m ¿ 3 for which LG-LPT cannot yield a schedule with makespan no more than 2 − 1=(m − 1) times the optimum makespan. Let us further suppose that the problem instance (J; M ) is minimal, meaning that the set J contains the least number of jobs among all counterexamples. Then, due to this minimality, we claim that the makespan of the minimal counterexample is determined by the last job an . This claim is true due to the following. If (J; M ) is a minimal counterexample, LG-LPT should successfully assign jobs a1 ; : : : ; an−1 within time 2 − 1=(m − 1) and fail to do so only for the last job an . This is because if LG-LPT failed to assign a job aj for j ¡ n within time 2 − 1=(m − 1), we can construct another counterexample (J ; M ) with J = {a1 ; : : : ; aj } which has strictly less number of jobs than (J; M ). Hence, a clear contradiction to the minimality of (J; M ) results. Let S be the partial schedule that we have at the time right before the job an is assigned. Then, noting that job an was not assigned within time 2 − 1=(m − 1), we can easily see that 1 for 1 6 i 6 m: (1) t(Si ) + p(an ) ¿ 2 − m−1 We note, then, Sm must contain at least one job, since, otherwise, we have t(Sm ) + p(an ) = p(an ) ¿ 2 − 1=(m − 1) ¿ 1 for m ¿ 3 which is a clear contradiction. Hence, let ak be the job contained in Sm . Then, ak ∈ Sm implies (ak ) = m and, therefore, p(ak ) should be as large as p(an ), due to LG-LPT order. Hence, t(Sm ) ¿ p(ak ) ¿ p(an ):
(2)
By summing up inequalities (1) for i = 1 through m − 1, we get m− 1 t(Si ) + (m − 1)p(an ) ¿ 2m − 3: i=1
Then by (2) m t(Si ) + (m − 2)p(an ) ¿ 2m − 3: i=1
And, since
m
i=1
t(Si ) + p(an ) 6 m, we have
(m − 3)p(an ) ¿ m − 3;
(3)
which can never hold since m ¿ 3 and 0 ¡ p(an ) 6 1. Case 2: m = 2. Suppose that the theorem is false. Then, again, there must exist a minimal problem instance (J; M ) with m = 2, for which LG-LPT yields a schedule with makespan greater than 54 . Then, due to minimality, the makespan is determined by the last job an and certainly (an ) = 2.
2060
H.-C. Hwang et al. / Computers & Operations Research 31 (2004) 2055 – 2061
Suppose that S is the schedule which we have at the time right before the job an is assigned. Then we have t(S1 ) + p(an ) ¿ 54
and
t(S2 ) + p(an ) ¿ 54 :
(4)
Hence, t(S1 ) + t(S2 ) + 2p(an ) ¿ 52 . But, since t(S1 ) + t(S2 ) + p(an ) 6 2, p(an ) ¿ 12 :
(5)
Hence, we can have at most two jobs with (aj ) = 2 and S1 contains all but only the jobs with (aj ) = 1. On the other hand, S2 must contain at least one job, since, otherwise, we have t(S2 ) + p(an ) = p(an ) ¿ 54 . Hence, if we let ak be the job contained in S2 , p(ak ) ¿ p(an )
(6)
due to LG-LPT order. Now, suppose that S ∗ is the optimum schedule. Then, certainly S1 is a subset of S1∗ and there could be only two possibilities. The set S1∗ contains either one of ak or an . However, neither case is possible, due to (4) and (6). In fact, when m = 2, our problem is reduced to a case of the non-simultaneous parallel machine scheduling problem where the 5rst machine must process all the jobs with (aj )=1 before processing any other job with (aj ) = 2. In this case, LG-LPT reduced to the algorithm LPT presented in [8] which is proved to have the worst-case performance ratio of 32 − 12 m. This equals to 54 when m = 2, which indeed con5rms our result. We conclude our paper with the following example which shows that the above bound is tight indeed. Example 2. Case 1: m ¿ 3. Consider a problem with J and M , where m ¿ 3, g(bi ) = i for all − + + 1 6 i 6 m. In J , there are m − 2 small jobs a− 1 ; : : : ; am−2 and m big jobs a1 ; : : : ; am . Each small job − a− j has processing time of 1=(m − 1) and g(aj ) = m − 1. Next, we consider the 5rst m − 2 big + + jobs, a1 ; : : : ; am−2 . These jobs have processing time 1 − 1=(m − 1) with g(a+ j ) = m − 2. Then for the + + + + remaining two big jobs, g(am−1 ) = g(am ) = m and p(am−1 ) = p(am ) = 1. For the given jobs we can list them in the LG-LPT order as follows: − − + + + a+ 1 4 · · · 4 a m − 2 4 a 1 4 · · · 4 a m − 2 4 a m − 1 4 am :
The LG-LPT will assign the 5rst m − 2 big jobs to machines 1 to m − 2, respectively. Then all the m − 2 small jobs are assigned to machine m − 1. Next, a+ m−1 is assigned to machine m. At this time, all the machine loads are the same as 1 − 1=(m − 1) except bm with the load of 1. Finally, the last big job a+ m is assigned to machine 1 yielding a schedule with the makespan of 2 − 1=(m − 1) as in Fig. 3. However, we can construct an optimal schedule S ∗ as − Si∗ = {a+ i ; ai }
Si∗ = {a+ i }
for 1 6 i 6 m − 2;
for m − 1 6 i 6 m:
Case 2: m = 2. Let M = {b1 ; b2 }, J = {a1 ; a2 ; a3 ; a4 }, g(b1 ) = 1, g(b2 ) = 2, g(a1 ) = 1, g(a2 ) = g(a3 ) = g(a4 ) = 2, p(a1 ) = 14 , p(a2 ) = 34 and p(a3 ) = p(a4 ) = 12 . Then, LG-LPT yields a schedule
H.-C. Hwang et al. / Computers & Operations Research 31 (2004) 2055 – 2061 b1
a+1
b2
a+2
a+m
b1
a+1
b2
a+2
{a -1, a -2,…, a –m-2} bm-2 a+m-2 bm-1 bm (a)
2061
{a -1, a -2,…, a –m-2} bm-2 a+m-2 bm-1 a+m-1
a+m-1
bm a+m (b)
Fig. 3. (a) LG-LPT and (b) optimal schedule.
S such that S1 = {a1 ; a3 ; a4 } and S2 = {a2 }. The makespan of S is 54 , but an optimum schedule S ∗ with makespan of 1 can be constructed by setting S1∗ = {a1 ; a2 } and S2∗ = {a3 ; a4 }. References [1] Pinedo M. Scheduling: theory, algorithms, and systems. Englewood Cli1s, NJ: Prentice-Hall, 1995. [2] Garey MR, Johnson DS. Computers and intractability: a guide to the theory of NP-completeness. New York: Freeman, 1979. [3] Co1man Jr. EG, Garey MR, Johnson DS. An application of bin-packing to multiprocessor scheduling. SIAM Journal on Computing 1978;7:1–17. [4] Graham RL. Bounds on multiprocessor timing anomalies. SIAM Journal on Computing 1969;17:416–29. [5] Yue M. On the exact upper bound for the MULTIFIT processor scheduling algorithm. In: Yue M, editor. Operations research in China. Annals of Operations Research 1990; 24: 233–59. [6] Azar Y, Naor J, Rom R. The competitiveness of on-line assignments. Journal of Algorithms 1995;18:221–37. N Approximation algorithms for scheduling unrelated parallel machines. Mathematical [7] Lenstra JK, Shmoys DB, Tardos E. Programming 1990;46:259–71. [8] Lee CY. Parallel machine scheduling with nonsimultaneous machine available time. Discrete Applied Mathematics 1991;30:53–61.