A Comprehensive Study of an Online Packet Scheduling Algorithm
We study the \emph{bounded-delay model} for Qualify-of-Service buffer management. Time is discrete. There is a buffer. Unit-length jobs (also called \emph{packets}) arrive at the buffer over time. Each packet has an integer release time, an integer d…
Authors: Fei Li
A Compr ehensive Study of an Online P ac k et Sc heduling Algori thm F ei Li Dep artment of Computer Sc ienc e Ge or ge Mason University F airfax, Vir ginia 2203 0 Email: lifei@cs.gmu.edu Abstract W e study the b ounde d-delay m o del for Qua lify-of-Service buffer manag ement. Time is discr e te. There is a buff er. Unit-length jobs (also c a lled p ackets ) arrive at the buffer o ver time. Eac h pac k et has a n in teger release time, an in teger dea dline, and a pos itive real v alue. A pa ck et’s c haracter istics are not known to an online algor ithm un til the pac ket ac tua lly arrives. In eac h time step, at most one packet can b e sent out of the buffer. The o b jectiv e is to maximize the total v alue o f the pack ets sent by their resp e c tive deadlines in an online manner. An online a lgorithm’s p erfor mance is usually measured in terms of c omp etitive r atio , when this online algor ithm is compared with a clairvo yan t algorithm achieving the b est total v a lue. In this pap er, w e study a simple a nd in tuitiv e online algorithm. W e a nalyze its perfo rmance in terms of co mpe titiv e ratio for the ge ne r al mo del a nd a few imp or tant v arian ts. Keywor d s: online algor ithm, comp etitive a nalysis, buffer management, pac ket scheduling 1. Mo del Description W e consider the b ounde d -delay mo de l introduced in [1, 2]. Time is discrete. The t -th (time) step presents the time interv al ( t − 1 , t ]. There is a buffer and unit-length jobs (also calle d p ackets ) arrive at the buffer over time. Each packet p ha s an in teger release time r p ∈ Z + , an integer deadline d p ∈ Z + , and a p os itive real v alue v p ∈ R + . A pa ck et p ’s characteristics are no t known to an online algorithm un til p actually ar rives at the buffer a t time r p . In each step, at most o ne pa ck et in the buffer can be sent. A pac ket p is said to b e suc c essful ly s en t at time t if r p ≤ t ≤ d p . T he o b jective is to max imize the tota l v alue of the pac kets that are successfully sent in an online manner. As people hav e noted, the offline v ersion of this problem can b e solved efficiently using the Hun- garian a lgorithm [3 ] in time O ( n 3 ), where n is the nu mber of pa ck ets in the input instance. In the framework of c omp etitive analysis which provides worst-case gua r antees, an online algo - rithm’s p e rformance is measured in terms of c om- p etitive r a tio [4]. F or a maximization pr oblem, an online algor ithm is called c -c omp etitive if for any finite instance, its total v a lue is no less than 1 /c times of what a n optimal offline algo rithm achiev es. In comp etitive ana ly sis, an input instanc e is al- low ed to be gener ated in an adversaria l wa y so as to maximize the comp etitive ratio . The uppe r bo und of c o mpe titiv e ratio is a chiev ed by some on- line algo rithms. A co mpetitive ratio strictly less than the low er bo und cannot be r eached by a ny online algo rithm. If a n o nline algo r ithm has its comp etitive ra tio same as the low er b o und, w e say that this online algo rithm is optimal . F or the bo unded-delay mo del, the currently best known re- sult is 2 √ 2 − 1 ≈ 1 . 828 [5] and the low er b o und is (1 + √ 5) / 2 ≈ 1 . 6 18 [1, 6]. If an online a lgo- rithm decides which pac ket to send only based on the conten ts o f its cur rent buffer, and indep endent of the pack ets that have already been r eleased and pro cessed, w e call it memoryless . In this pa per , we study a simple, intuitiv e memoryless o nline algorithm called MG (‘Mo di- fied Greedy’). W e analyze MG’s p erformance in terms o f competitive r atio for the genera l b ounded- delay model a nd some imp orta nt v a riants. Define a pack et p ’s slack-time s p as the difference betw een its dea dline d p and release time r p , s p = d p − r p . Pr eprint submitt e d t o Elsevier Septemb er 27, 2018 The v ariants that we cons ider include: • A gr e e able de ad line s etting. In an agr eeable deadline insta nce , fo r any tw o packets p and q with r p ≤ r q , we have d p ≤ d q . This v ar iant has been studied in [7]. • Anti-agr e e able de ad line setting. In an anti- agreea ble deadline instance , for an y tw o pa ck- ets p and q with r p ≤ r q , we hav e d p ≥ d q . • A gr e e able value se tting. In an agre e a ble v alue instance, for any t wo pac kets p and q with r p ≤ r q , we hav e v p ≤ v q . • Anti-agr e e able value setting. In a n anti- agreea ble v alue instance, for any tw o pack ets p and q with r p ≤ r q , we hav e v p ≥ v q . • A gr e e able de ad line/value s etting. In an agr ee- able deadline/v alue instance, for an y t wo pac k- ets p and q with d p ≤ d q , we hav e v p ≤ v q . • Anti-agr e e able de ad line/value setting. In an anti-agreeable deadline/v alue instance, for an y t wo pack ets p a nd q with d p ≤ d q , we have v p ≥ v q . • A gr e e able slack-time/value s e tting. In an agreea ble slack-time/v alue instance, for any t wo pack ets p a nd q with s p ≤ s q , we have v p ≤ v q . • Anti-agr e e able slack-time/value setting. In an anti-agreeable slack-time/v a lue instance, for any tw o pac kets p and q with s p ≤ s q , we ha ve v p ≥ v q . Our results are summarized in T able 1. Note that the low er b ounds shown in T a ble 1 are the low e r bo unds of MG’s p erfo rmance but no t the lower bo unds for a n y online algorithms. In the following, w e present the online a lgorithm MG in Section 2 and a na lyze its p erfor mance in Section 3. 2. Alg orithm MG The idea of designing MG is motiv a ted by the gr e e dy algorithm : In each step, the highest-v alue pending pack et is s ent. This algor ithm is pr ov ed 2-comp etitive [1, 2]. In one attempt to be a t the greedy algorithm in competitiveness, Chin et a l. [9] prop osed an alg orithm ca lled EDF α , b ear ing the idea of sending the earlies t- deadline packet with a sufficiently large v alue (for instance, at least 1 /α times of the highest v alue of a p ending pa ck et where α ≥ 1). Note that EDF α generalizes the gree dy algorithm, whic h is EDF 1 . Same as the greedy al- gorithm, E DF α is as y mptotically not be tter than 2-comp etitive. F or EDF α , it is p ossible that the expiring pack et in the algorithm’s buffer is the one that an optima l offline algor ithm sends and this pack et ha s only a slight ly less v alue than the packet that EDF α sends. Recall that a memoryless online algorithm makes its dec is ion only ba sed on the conten ts o f its cur - rent buffer. Thu s, it is natural to send a pa ck et from a set of pack ets, all of which are eligible o f being sen t succes s fully under th e assumption of no future arriv als . W e consider pr ovisional sche dules . A provisional schedule [1 0, 5] at time t is a sc hedule sp ecifying the set o f p ending pack ets to b e trans- mitted and for each it sp ecifies the delivery time, a s- suming no newly ar riving pa ck ets. An optimal pro- visional s chedule a chieves the maxim um tota l v alue among all the provisional sc hedules. At the b egin- ning of each step, we calc ula te an o ptimal pr ovi- sional schedule S and the pack ets in S are arranged in a c anonic al order: inc r easing order of deadlines, with ties broken in decreasing order of v alues . Let e denote the first packet in S and h denote the first highes t-v alue pack et in S . Mo tiv a ted by the idea of EDF α , we w ould like to send a pack et with a sufficiently large v a lue compar ed with v h . A t the s a me time, fro m the tight example for E DF α , we would lik e to send a pack et to compensate t he p o- ten tial lo ss due to not sending the ear liest-deadline pack et e . Thus, we send a pa ck et f in the opti- mal provisional schedule satisfying v f ≥ v h /α if f = e and v f ≥ max { β v e , v h /α } if f 6 = e , wher e α, β ≥ 1. In order to guarantee that at least one pack et in S c a n b e a candida te pack et for f , we hav e to hav e α ≥ β since if v e < v h /α , we should hav e v h ≥ v f ≥ max { β v e , αv e } ≥ ma x { β , α } v e . The algorithm MG is descr ibe d in Algorithm 1. Note that MG generalizes E DF α (and the greedy algorithm). If α = 1 (hence β = 1 since α ≥ β ≥ 1), MG is the greedy algo rithm. If β = 1, MG is no- worse than EDF α in comp etitiv eness. Theorem 1. If β = 1 , MG is no-worse than EDF α in c omp etitiveness. Pr o of. W e inductively prov e that (1) MG with β = 1 and EDF α share the same buffer at a ny time; (How ever, we note here that MG’s optimal pro - visional schedule may not b e identical to EDF α ’s 2 mo dels upper bounds low er bo unds notes general 2 2 [8] A detailed a nalysis of the low er bo und is given in this pa- per . agreea ble deadline φ [7] φ [6] MG is o ptimal. anti-agreeable deadline 2 2 [8] - agreea ble v alue 2 2 [8] - anti-agreeable v alue 1 1 MG is o ptimal. agreea ble deadline/v alue φ φ [6] MG is o ptimal. anti-agreeable deadline/v a lue 1 1 MG is o ptimal. agreea ble slack-time/v alue φ 1 - anti-agreeable slack-time/v alue 1 1 MG is o ptimal. T able 1: Summary of M G’s p erfor m ance for the b ounded-dela y model and its v ari ants. The results without references are the wo rk presen ted in this pap er . In this table, φ = (1 + √ 5) / 2 ≈ 1 . 618. Algorithm 1 MG ( t, 1 ≤ β ≤ α ) 1: Calculate an optimal provisional schedule S . All the packets in S are sorted in a canonica l order: increasing order of dea dlines, with ties broken in decreasing order of v alues. In S , let e denote the first pack et; le t h denote the first highest-v alue pack et. 2: if v e ≥ v h /α then 3: send e ; 4: else 5: send the first pack et f satisfying v f ≥ max { v h /α, β v e } . 6: end if buffer.) and (2) in each step, the charged v alue to MG is no less than the charged v alue to EDF α . Assume MG sends f 6 = e . EDF α m ust send f as well since all the pack ets with v alues ≥ v h /α must be in MG’s o ptimal provisional sc hedule. Assume MG sends the e -pack et and EDF α sends a pack et p not in MG’s optimal provisional schedule. If EDF α do es not send e in its schedule, we hav e v e ≥ v p and we can use e t o replace p for E DF α . 3. Analysi s Let O PT denote an optimal offline alg orithm and O denote the set o f pack ets that OP T sends. Let AD V denote a (m o dified) adversary . In our pro of, we will create ADV and make sur e that AD V gains a total v a lue no less than P p ∈O v p . 3.1. The gener al setting Theorem 2. MG is 2 -c omp etitive for the b oun de d- delay mo del, for any 1 ≤ β ≤ α ≤ 2 . Pr o of. W e ass ume that there exists an adversary called AD V. W e modify AD V such that ADV a nd MG s ha re the same buffer at the beginning of ea ch step. AD V do es not ha ve to send every pac ket in its buffer. In a step, MG sends the pack et f . 1. Assume ADV sends the same pack et f in this step. AD V and MG gain the same v a lue. 2. Assume ADV sends a packet j ( 6 = f ) with d j < d f . W e mo dify ADV by sending both j and f in the current step. W e then insert j into ADV ’s buffer a s a g ift packet. As a s sumed, j is in MG’s buffer a t the b eginning of this step. F r om the canonica l order and MG choosing f but not j to s end, we have v j ≤ v f . Then v j + v f ≤ 2 v f . 3. Assume ADV sends a packet j ( 6 = f ) with d j > d f . As a ssumed, j is in MG’s buffer at the beg in- ning of this step. No matter f = e or f 6 = e , we ha ve v f ≥ v h /α ≥ v j /α ≥ v j / 2. Note that v f < v j (and d f < d j ) since otherwise, ADV prefers to sending f instead of j . W e then in- sert j into AD V’s buffer to replace f . A t the e nd of this step, AD V and MG share the same buffer again. The mo difica tions that we make fav or the adversary but not MG. In this step, AD V’s mo dified g ain is b ounded b y 2 times of wha t MG achiev es. 3 Theorem 3. MG is asymptotic al ly no b et t er than 2 -c omp etit ive for the b ounde d-delay mo del, with α = β = φ . A sketc hed pro o f of Theorem 3 ha s b een given in a conference paper [8]. W e detail the ana lysis in journal pa pe r. Pr o of. W e c o nstruct an example to prove Theo- rem 3. W e use ∞ in the dea dline field o f a pack e t to show that this packet’s deadline is very larg e. Let n = 2 k . The pack ets ar e rele ased in a stag e-manner. There are log n = k stages. The sup erscr ipt of a pack et shows the stage in whic h it is re leased. A t the beg inning of step 1, there are 3 pac kets in MG’s buffer. The adversar y has the same buffer. These 3 pack ets are e 1 1 := (1 + ǫ, 2), f 1 1 := ( φ − ǫ, 2 k +1 − k ), and h 1 1 := ( φ, ∞ ). MG sends h 1 1 , a nd e 1 1 is dropp ed out of the buffer due to its deadline. In ea ch of the follo wing (2 k − k + 1) time steps, say step i , a g r oup of 3 pack ets are released: e 1 i := (1 + ǫ, i + 1), f 1 i := ( φ − ǫ, 2 k +1 − k ), and h 1 i := ( φ, ∞ ). In step i , MG sends h 1 i and drops e 1 i due to its deadline. At the end of the (2 k − k + 1)-th step, MG’s buffer is full of (2 k − k + 1) f 1 i -pack e ts ( ∀ i = 1 , 2 , . . . , 2 k − k + 1). The fir st stage ends. The length of stage 1 guarantees that no f 1 i pack et, esp ecially pack et f 1 1 , b ecomes the fir st pack et in the buffer. A t the be g inning of s tep 2 k − k + 1, the sec- ond stage star ts. The a dversary releases a pair of pack ets f 2 1 := ( φ ( φ − ǫ ) − ǫ, 2 k +1 − k + 1) and h 2 1 := ( φ 2 , ∞ ). The newly relea sed pack ets hav e later dea dlines and a r e so rted cano nically a fter the pack ets already in MG’s buffer. MG sends h 2 i . Stage 2 contains 2 k − 1 − k + 2 steps. The leng th of stage 2 g uarantees that no pack et f 2 i bec omes the first packet in the buffer. In each of those 2 k − 1 − k + 2 steps, say step i , 2 pa ckets ar e r eleased f 2 i := ( φ ( φ − ǫ ) − ǫ, 2 k +1 − k + 1) and h 2 i := ( φ 2 , ∞ ). MG sends h 2 i in step i . Stag e 2 is half as long as stage 1. W e r epe at this pattern in ea ch stag e , for k stages. Stage i + 1 is half as long as stag e i . In each step j of stage i , 2 pack ets are released, f i j := ( φ ( w f i − 1 1 − ǫ ) , 2 k +1 − k + i ) and h i j := ( φ i , ∞ ). MG sends h i j in step j . In the las t stage, whic h is step 2 k +1 , the adversary only r eleases 2 pack ets f k 1 := ( φ k , 2 n ) and h k 1 := ( φ k +1 + ǫ, ∞ ). MG sends h k 1 and f k 1 is dropp ed out of the buffer due to its deadline. F or e a ch step in stage i , MG o nly delivers the h i pack ets, a nd even tually , all pack et f i are dropp ed out of the buffer due to their deadlines. On the contrary , the adversary sends all f i pack ets a nd all h i pack ets. A routine calculation shows that the optimal weight ed throughput is nearly t wic e MG’s weigh ted throughput. W e remov e ǫ in the following calculation for the sake of clearness. c = 2 φ 0 · 2 k + φ 1 · 2 k − 1 + . . . + φ k · 2 0 + φ k +1 ( φ 0 · 2 k + φ 1 · 2 k − 1 + . . . + φ k · 2 0 ) + φ k +1 = 2 φ 0 · 2 k φ 0 2 0 + φ 1 2 1 + φ 2 2 2 + . . . + φ k 2 k + φ k +1 ( φ 0 · 2 k ) φ 0 2 0 + φ 1 2 1 + φ 2 2 2 + . . . + φ k 2 k + φ k +1 = 2 k +1 1 − ( φ 2 ) k +1 1 − φ 2 + φ k +1 2 k 1 − ( φ 2 ) k +1 1 − φ 2 + φ k +1 = 2 k +1 − φ k +1 + φ k +1 − φ k +2 2 2 k − φ k +1 2 + φ k +1 − φ k +2 2 = 2 2 φ k − φ 2 2 2 φ k − 1 2 = 2 . 3.2. The agr e e able de ad line setting In [7], the a utho r s have shown that MG is φ - comp etitive for ag reeable deadline instances. The low er b ound φ constructed in [6 ] for the genera l mo del holds as well for scheduling packet s with agreea ble de a dlines and MG. W e list MG’s p er for- mance in the agreeable deadline se tting here for its optimality and significa nce. W e include this v ar iant for comparison with others. 3.3. The anti-agr e e able de ad line set ting Both Theo r em 2 and Theor em 3 hold for anti- agreea ble deadline instances. Both the upp er bo und and lower b ound for MG are 2. 3.4. The agr e e able va lue setting Both Theo r em 2 and Theor em 3 hold for anti- agreea ble deadline instances. Both the upp er bo und and lower b ound for MG are 2. 4 3.5. The anti-agr e e able value setting Theorem 4. MG is 1 -c omp etitive for the ant i- agr e e able value set ting when α = ∞ . MG is op- timal. Pr o of. When α = ∞ , MG sends the e a rliest- deadline pack et e in the o ptimal pr ovisional sched- ule in each step. T o prove Theore m 4, we only need to indu ctively s how that f or each step, an optimal offline algorithm O PT sends e in each step as w ell. In anti-agreea ble v a lue instanc e s, an y later released pack et has a v alue ≤ v e . If a ny later r eleased pa ck et belo ngs to O , so do es e . If no later released pack et belo ngs to O , OPT sends e to maximize its tota l gain. Thus, OPT s ends e in each s tep. 3.6. The agr e e able de ad line/value setting The low e r b o und φ constructed in [6] fo r the general mo del holds a s well for ag reeable dead- line/v alue instances. Theorem 5. MG is φ -c omp etitive for t he agr e e able de ad line/value setting when α = β = φ 2 ≈ 2 . 618 . MG is optima l. Pr o of. W e are us ing a charging scheme to pr ov e Theorem 5. Let O PT denote an optimal offline algorithm. Without loss of ge ner ality , we ass ume that OPT o nly a ccepts O -pa ck ets and sends them in E DF manner. Let Q OPT denote OPT’s buffer. A t time t , let the optimal pro visional schedule b e S and w e index the buffer slots as t, t + 1 , . . . . The pack ets in S are sor ted in increasing deadline order , with ties br oken in decrea sing v a lue o rder a nd these pack ets are buffered in s lots t, t + 1 , . . . , t + | S | − 1 consecutively . The pac kets not in S are app e nded at the end of S . Le t us study the optimal provi- sional schedule S at fir st. The pack ets in S thus are g roup ed in to m ultiple ( ≥ 1) b atches of p ackets G 1 , G 2 , . . . , in order of strictly incr e asing de ad- lines . The pack ets in the same batch share the s ame deadline. (Note that G 1 is the fir st batch in S .) W e hav e Remark 1. Al l the p ackets in the same b atch shar e the same de ad line. F or any two b atches G i and G j with indexes i < j , al l t he p ackets in G i have strictly e arlier de ad lines and strictly lower values t han al l the p ackets in G j . W e will introduce a charging scheme and this charging scheme may us e the following observ a - tions. Remark 2. In the agr e e able de ad line/value setting, if a p acket p is inserte d into the optimal pr ovisional sche dule, then al l the p ackets with value > v p ar e shifte d into one bu ffer slot later sinc e they have strictly lar ger de ad lines. A lso, for any t wo time steps, the r elative or der among the p ackets in b oth MG’s optimal pr ovisional s che dules is not change d. Lemma 1. In the agr e e able de ad line/value setting, if a p acket p is evicte d out of MG’s optimal pr o- visional sche dule at time t , then in e ach st ep fr om time t til l p ’s de ad line d p , MG’s op timal pr ovisional sche dules for these st eps do not c ontain any p acket with a value < d p . Pr o of. If a packet p is evic ted out o f MG’s optimal provisional schedule a t time t , then either d p < t or in each of the buffer slots t, t + 1 , . . . , d p , MG’s cur- rent optimal provisional schedule at time t buffers one packet with v alue > v p . F r om Remar k 1 a nd the assumption of agreeable deadline/v alue, d p should not b e larger than those of pac kets in the batch G 1 . • Assume MG sends the e - pack et in a step b efore d p . Then for those pa ck ets arranged in the buff er slots b elo ng ing to batch G 1 , they have their deadlines no smaller than d p and they are tight , that is, they cannot be s hifted into la ter buffer slots and provide buffer slots to acco mmo da te less-v alue pack ets with no-later deadlines ( see Remark 2). F o r pack ets in batches G 2 , G 3 , . . . , if any , they hav e strictly larger deadlines than d p and strictly larger v alues than v p . • Assume MG sends a pack et f 6 = e in a step befo re d p . All the unsent pack ets in the o ptimal provi- sional schedule can b e shifted b y at most o ne step to t heir later s teps and the relative order among all these pack ets keep unc hanged (see Remark 1 and Remark 2). Any newly released pack ets with later dea dlines hav e no smaller v alues. An y newly relea s ed pack ets with v alues < v p are rejected by MG’s optimal pr ovisional schedules since a ll the pack ets with dea dlines = d p are tight. Thus, for the new optimal pro- visional s chedule g e nerated at the b eginning of the next step, Lemma 1 still holds. 5 Lemma 2 . Consider a c hain of k s teps . In the steps 1 , 2 , . . . , k (these steps may not b e c ontin- ues), we char ge OPT the values v q 1 , v q 2 , . . . , v q k and MG t he va lues v p 1 , v p 2 , . . . , v p k , r esp e ctively. If for al l i with 1 ≤ i ≤ k − 1 , we have v q i ≤ α · v p i , and if v q i ≤ v p i +1 and v q k ≤ v p k , then P k i =1 v q i ≤ 1 α k − 1 2 − 1 α α k − α P k i =1 v p i . Pr o of. P k i =1 v q i P k i =1 v p i = v q 1 + v q 2 + · · · + v q k v p 1 + v p 2 + · · · + v p k ≤ v q 1 + v q 2 + · · · + v q k v q 1 α + max { v q 1 , v q 2 α } + · · · + v p k ≤ v q 2 α + v q 2 + · · · + v q k v q 2 α 2 + v q 2 α + · · · + v p k ≤ · · · ≤ v q k − 1 α k − 2 + · · · + v q k − 1 α + v q k − 1 + v q k v q k − 1 α k − 1 + · · · + v q k − 1 α 2 + v p k − 1 + v p k ≤ v q k − 1 α k − 2 + · · · + v q k − 1 α + v q k − 1 + v q k v q k − 1 α k − 1 + · · · + v q k − 1 α 2 + v q k − 1 α + max { v q k , v q k − 1 } ≤ v q k − 1 α k − 2 + · · · + v q k − 1 α + v q k − 1 + v q k − 1 v q k − 1 α k − 1 + · · · + v q k − 1 α 2 + v q k − 1 α + v q k − 1 = 1 − α 1 − k 1 − α − 1 + 1 1 − α − k 1 − α − 1 = (2 − α − 1 ) α k − α α k − 1 . Note that when α ≥ 1, 1 α k − 1 2 − 1 α α k − α ≤ 2 − 1 α . Als o , note φ + 1 φ 2 = 2, we have Corollary 1. Consider a chain of k steps . I n the steps 1 , 2 , . . . , k (these steps may not b e c ontin- ues), we char ge OPT the values v q 1 , v q 2 , . . . , v q k and ON the values v p 1 , v p 2 , . . . , v p k . If for al l i with 1 ≤ i ≤ k − 1 , we have v q i ≤ α · v p i , and if v q i ≤ v p i +1 , and v q k ≤ v p k , then we have P k i =1 v q i ≤ φ P k i =1 v p i when α = φ 2 . W e say that a chain of steps is op en if we hav e not charged the v alues to OPT and MG in these steps. Other wise, w e say that it is close d . Definition 1 (Canonical Order) . Packets in MG’s optimal pr ovisional sche dule ar e or der in a canoni- cal order : in incr e asing or der of de ad lines, with ties br oken i n de cr e asing or der of values. Our c harging scheme guara ntees the following three in v ariants: I 1 . In each step or in a closed chain of a g r oup of steps, the total charged v a lues to OPT are bo unded by φ times of the total charged v a lues to MG. Cha ins do not share s teps. I 2 . F or any packet q in OPT’s buffer, if v q has not bee n charged to OPT in our charging scheme, then q must map uniquely to a packet p in MG’s o ptimal pr ovisional schedule with v q ≤ v p and d q ≤ d p . ( p may be the pack e t q itself.) In the canonica l order, for any pack et j befor e p in MG’s optimal pro visional sc hedule S , if p is not in S , then we have v j ≥ v q . I 3 . A packet p in MG’s optimal provisional sched- ule S may corr esp ond to at most one op en chain and v p is no less than the v alue of the pack et OP T sends in the last step of this op en chain. If p corresp o nds to an open chain and is mapp ed by a pa ck et in OPT’s buffer, p is called overlo ade d . If p is o verloaded, then an y pack et b efore p in S is o verloaded as well. Note that Inv ariant I 1 results in Theo r em 5 au- tomatically . The charging scheme is describ ed b elow. W e consider pac ket arriv als and pac ket deliv eries sepa- rately . Packet arrivals. F or a ny pa ck et p evicted out of MG’s o ptimal pro - visional sc hedule S due to acc e pting a new arriv al p ′ , we have v p ′ ≥ v p and d p ′ ≥ d p in the a gree- able deadline/v a lue setting. After dr opping p , MG has at least o ne pack et q in S such that q is no t mapp ed by a packet in OPT’s buffer, due to In- v ariant I 2 . In the ca no nical order of S , we pic k up the first pack et not in mapping and let it b e q . q should hav e a deadline ≥ v p and thu s, v q ≥ v p , due to t he assumption of agreeable deadline/ v alue se t- ting. F urther mo re, a ny pac ket in MG’s cur rent op- timal pr ovisional sc hedule has a no-les s v alue a nd no-earlier deadline than p . W e transfer the op en chain mapping to p , if any , t o q . Hence for pack et arriv a ls, all the inv aria nts hold. 6 Packet deliveries. In each step, O P T s e nds the earliest-dea dline pack et q in its buffer . MG sends either e or f 6 = e . Remem b er that we use S denotes MG’s optimal provisional schedule and the pac kets in S are sor ted in a canonical order . Assume MG sends e and OPT sends q / ∈ S or OPT sends q = e . F rom Inv aria nt I 2 , if q has not been charged to OPT, then v q ≤ v e . Assume q maps to p in S . v q ≤ v p ≤ v e . W e charge OPT v q and the pa ck ets in the op en c ha in mapping to e , if any . W e clos e the op en chain. The ratio of total charged v alues o f this chain or this single step is bo unded by φ (see Corollar y 1). Assume MG sends e and O PT sends q ∈ S with q 6 = e . Due to Inv a riants I 2 and I 3 , there is no ov er - loaded pa ck ets in MG’s optimal provisional sc hed- ule. Otherwis e, O PT se nds a pack et with an ear- lier deadline than d q and less- v alue than v e since it sends pack ets in the E DF o r der. W e start a new op en chain from this step mapping to q in MG’s optimal provisional schedule. No te that q is no t an ov er loaded pack et yet since it is not mapped by any pack et in OPT’s buffer. Assume MG sends f 6 = e and OPT sends q / ∈ S or OPT sends q = e . F rom Algor ithm 1, we have v f ≥ αv e = φ 2 v e . If q is evicted out o f the provisional schedule, we hav e v q ≤ v e (from Lemma 1). W e close the op en chain if e belongs to a n y one. T he ratio of total charged v alues o f this chain or this single step is b o unded by φ (see Cor ollary 1 ). Assume MG sends f 6 = e and OPT sends q ∈ S with d q < d f . • Assume f = h . W e hav e v q < v h /α = v f /α = v f /φ 2 . If q = e , we close the op en chain mapping to e , if any . W e also charge v h to OP T in this step. The ratio of total charged v alues of this chain or this single step is b ounded by φ (se e Corollar y 1). If q 6 = e , then no op en chains ex is t since other- wise e is a candidate pac ket fo r OP T to send. W e charge OPT the v alue v q + v f in this step and MG the v alue v f . F urthermore, we split this step int o tw o fr actional steps: In o ne fr ac- tional step, O PT is charged a v alue v f and MG v f /φ . In this s ingle fractional step, the gain ratio is φ . In another fractional step, we charge OPT the v a lue v q and MG the v a lue v f /φ 2 ≥ v q /φ 2 . This step maps to q in MG’s optimal provisional s chedule at the end o f this step since e with d e ≥ t is not the pack et q . • Assume f 6 = h . If q is not in MG’s optimal provisional s chedule S , q must ma p to a packet p ∈ S and v q ≤ v e . F r om Algorithm 1, we have v f ≥ αv e = αv q = φ 2 v q . f is not in any open c hain (from Inv ariant I 3 ). W e close the open chain, if an y , mapping to p . W e also charge v f to OPT in this s tep. The ratio of to ta l charged v alues of this ch ain or this single step is bo unded b y φ (see Corollary 1). If q is in S , then q is not in any open chain, fr om Inv ariant 1. W e charge OPT the v a lue v q + v f in this step and MG the v a lue v f . F ur thermore, we split this step into tw o fr a ctional s teps: In one fra ctional step, O PT is c harge d a v a lue v f and MG v f /φ . In this s ingle fractiona l step, the gain ra tio is φ . In another fractional step, we charge O PT the v alue v q and MG the v a lue v f /φ 2 ≥ v q /φ 2 . This step maps to q in MG’s optimal provisional s chedule at the end o f this step since e with d e ≥ t is not the pack et q . Assume MG sends f 6 = e and OPT sends q ∈ S with d q > d f . Due to Inv a riants I 2 and I 3 , there is no ov erloaded pa ckets in MG’s optima l provi- sional schedule. F rom Algorithm 1, we ha ve v q > v f ≥ αv e = φ 2 v e . W e sta rt a new op en chain from this step mapping to q in MG’s o ptimal provisional schedule. Note that q is not an o verloaded pac ket yet since it maps no pa ck et in OPT’s buffer. 3.7. The anti-agr e e able de ad line/val ue sett ing Consider the anti-agreea ble deadline/ v alue set- ting. In MG’s optimal provisional s chedule, for any t wo packets p a nd q with d p < d q , we ha ve v p ≥ v q . Applying the same pro of of Theor em 4, we hav e Theorem 6. MG is 1 -c omp etitive for the anti- agr e e able de ad line/value setting when α = ∞ . MG is optimal. 3.8. The agr e e able slac k-time/value setting Lemma 3. In the agr e e able slack-time/value set - ting, if a p acket p is evicte d out of MG’s optimal pr ovisional sche dule at time t , then fr om time t til l p ’s de ad line d p , al l the MG’s optimal pr ovisional 7 sche dules do n ot c ontain any p acket with a value < v p . Pr o of. If a packet p is e v icted out of MG’s optimal provisional schedule at time t , then either d p < t or in each of the buffer slots t, t + 1 , . . . , d p , MG’s cur- rent optimal provisional schedule at time t buffers one pack et with v alue > v p . In ea ch step, MG either sends e o r f 6 = e . F or time t when a packet p is re jected, those pack e ts unsent by MG but staying in MG’s optimal provi- sional schedule at time t a re tight and c a nnot b e shifted into la ter buffer slo ts. Note that for a ny t wo pack ets with the s a me deadline, the ear lier re- leased one has a la rger slack time, hence, a lar ger v alue. Thus, the later relea sed pac ket is pr e fer red to b e evicted if t wo pac kets share the same dead- line and MG’s optimal provisional schedule cannot accommo date both. Lemma 3 holds. Using Lemma 3, we apply the pro of of Theor em 5 directly and have Theorem 7. MG is φ -c omp etitive for t he agr e e able slack-time/value sett ing when α = β = φ = (1 + √ 5) / 2 ≈ 1 . 618 . 3.9. The anti-agr e e able slack-time/value setting Prop ert y 1. Consider the anti-agr e e able slack- time/value setting. In MG’s optimal pr ovisional sche dule, for any two p ackets p and q with d p < d q , we have v p ≥ v q . Prop erty 1 can b e prov ed inductiv ely . Assume at time t , Pro p e r ty 1 holds. Consider a packet p in the optimal provisional schedule at the end of step t . W e hav e r p ≤ t < d p . F or any relea sed pac ket q at time t + 1, if d q < d p , w e hav e s q = d q − ( t + 1) < d p − t = s p and v q > v p . Thus, Pr o p erty 1 ho lds again. Prop erty 1 results in that all the e -pack ets in the optimal pro visional schedules ar e O -packet. Applying a slightly mo dified v ersion of the pro of of Theorem 4 , we hav e Theorem 8. MG is 1 -c omp etitive for the ant i- agr e e able slack-time/value setting when α = ∞ . MG is optima l. References [1] B. Ha jek, On the competitiveness of online sched uling of unit- l ength pack ets wi th hard deadlines in slotted time, in: Pro ceedings of 2001 Conference on Informa- tion Sciences and Systems (CISS), 2001, pp. 434–438. [2] A. Kesselman, Z. Lotk er , Y. Mansour, B. Patt-Shamir, B. Sch ieb er, M. Sviridenko, Buffer ov erflow manage- men t in Q oS switc hes, SIAM Journal on Computing (SICOMP) 33 (3) (2004) 563–583. [3] H. W. Kuhn, T he hungarian method f or the assignment problem, Na v al Researc h Logistics Quarterly 2 (1955) 83–97. [4] A. Boro din, R. El- Y aniv, Onli ne Computation and Competitive Analysis, Cambridge Universit y Press, 1998. [5] M. Englert, M. W estermann, Considering suppressed pac k ets improv es buffer managemen t in QoS switc hes, in: Pr o ceedings of the 18th Ann ual ACM-SIAM Sym- posi um on Discrete Al gorithms (SOD A), 2007, pp. 209– 218. [6] F. Y. L. Chin, S. P . Y. F ung, O nl ine sched uling with partial job v alues: Do es timesharing or randomization help?, Algorithmica 37 (3) (2003) 149–164. [7] F. Li, J. Seth uraman, C. Stein, An optimal on line al- gorithm for pack et scheduling with agreeable deadlines, in: Pr o ceedings of the 16th Ann ual ACM-SIAM Sym- posi um on Discrete Al gorithms (SOD A), 2005, pp. 801– 802. [8] F. Li, J. Seth uraman, C. Stein, Better online buffer managemen t, in: Pro ceedings of the 18th Ann ual ACM- SIAM Symp osium on Discrete Algori thms (SODA) , 2007, pp. 199–208. [9] F. Y. L. Chin, M. Chrobak, S. P . Y. F ung, W. Jaw or, J. Sgall, T. Tich y , Online comp etitive algorithms for maximizing weigh ted throughput of unit jobs, Journal of Discrete Algorithms 4 (2) (2006) 255–276. [10] M . Chrobak, W. Jaw or, J. Sgall, T. Ti c hy , Online sc heduling of equal-length j obs: Randomization and restart help?, SIAM Journal on Computing (SICOMP) 36 (6) (2007) 1709–17 28. 8
Original Paper
Loading high-quality paper...
Comments & Academic Discussion
Loading comments...
Leave a Comment