1 / 24

Online Preemptive Scheduling with Immediate Decision or Notification and Penalties

Online Preemptive Scheduling with Immediate Decision or Notification and Penalties. Stanley P. Y. Fung. Motivation. Preemption is not really “free” E.g. context switch in CPU scheduling Introduce preemption penalty (PP) : each preemption introduces a penalty proportional to value of job

tameka
Download Presentation

Online Preemptive Scheduling with Immediate Decision or Notification and Penalties

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Online Preemptive Scheduling with Immediate Decision or Notification and Penalties Stanley P. Y. Fung

  2. Motivation • Preemption is not really “free” • E.g. context switch in CPU scheduling • Introduce preemption penalty (PP): each preemption introduces a penalty proportional to value of job • Related but different scenario: we want commitment to process a job • If a job cannot be processed, better to let the client know early • Introduce non-completion penalty: if an accepted job is later not finished, gives a penalty

  3. Immediate Decision/Notification • How to model “commitment”: • Immediate Notification (IMM NOTIF): • Upon a job’s arrival, have to decide immediately whether to accept the job, or reject it right away • If rejected, no value (customer goes away) • If an accepted job is eventually not completed, incurs a penalty (cannot charge customer since work not done; in addition, customer is unhappy when he finds this out) • Immediate Decision (IMM DEC): • A stronger notion where in addition, an accepted job needs to be immediately allocated a time window for execution (“your delivery will take place on Friday morning”)

  4. Problem Formulation • Input: a set of jobs • Parameters: release time r(j), deadline d(j), length p(j), weight w(j) • Value of a job v(j) = p(j) x w(j) • Unit length (UL) case: p(j) = 1 for all j • Unit weight (UW) case: w(j) = 1 for all j • Objective: Find a schedule with maximum total value of completed jobs, minus any penalties • Penalty model: penalty = × v(j) • Preemptive • We mainly consider the restart model • But also some on resume model • (Doesn’t matter in IMM DEC)

  5. Online Algorithms • Jobs arrive online • No information about future • Decisions irrevocable • Measure of performance: competitive ratio • An online algorithm A is c-competitive if for any input instance I, OPT(I)/A(I) ≤ c • Where OPT = offline optimal algorithm, A(I) = value of A on instance I

  6. Previous and Our Results (PP)

  7. Previous and Our Results (PP)

  8. Previous and Our Results (IMM) • Previous results: • IMM DEC + UW: an upper bound from [TL09] • No other prior result for preemptive case • Non-preemptive case considered in various papers (usually UL, and parallel machines) • Our results: • IMM DEC (or IMM NOTIF + restart) • UW: • UL: • Lower bound 4(1+) carries over to here • Lower bound with laxity

  9. UW Lower Bound (PP/IMM) • Tight jobs: PP = IMM NOTIF = IMM DEC • No algorithm gives competitive ratio better than 4(1+) • Idea: (similar to [BKM+92, Woeg94]) • If switch to short job, stop • If not preempt from vi to vi+1, v0 v1 v2

  10. Lower Bound (cont’d) • Lemma: if  < 4(1+), {vi} cannot be strictly increasing forever • Let vn be the last term. Then • If ONL is about to finish vn, release another job of value vn just before it finishes vn-1 vn vn

  11. PP + UW: Algorithm • 4(1+)-competitive algorithm: • Let  = 2(1+)  2,  = 2( – 1)  • Job arrival: add to pool • When idle, start the pending job with earliest expiry time • While j is running, if another job k reaches its expiry time: • If v(k) >  v(j) and j has preempted other jobs before, or • If v(k) >  v(j) and j has not preempted others before • Then preempt j and start k; j never considered again • Else continue with j (and k will expire)

  12. Ideas of Proof • Basic subschedules: sequence of preemption followed by one job completion • vk-1≤ vk / , vk-2 ≤ vk-1 / , …, v1 ≤ v2 /  • Value obtained = vk – (v1+…+vk-1) • Times in OPT when ONL is busy  OK (1 to 1) • Times in OPT when ONL is idle • For each (part of) such job j executed by OPT, map it to some basic subschedule in ONL vk v1

  13. Ideas of Proof • When OPT starts (part of) a job j while ONL idle: • If ONL is idle at x(j) (expiry time of j), only possible if j started/completed before its expiry  j is the first job in a basic subschedule  map to it • Otherwise, x(j) falls within some basic subschedule (v1…vk)  map to it  can show total of v(j) < vk (or v1 if k=1) • Each basic subschedule is mapped by: vk v1 v1+…+vk OPT ONL v1 vk

  14. IMM DEC + UW: Algorithm • At any time, the algorithm maintains the provisional schedule of accepted jobs • Execute according to provisional schedule • When a new job j arrives: • Identify a set of jobs { ji } in the provisional schedule so that their preemption create a long enough timeslot to fit the new job, and that  v(ji) < v(j)/  • If no such set exists, reject j • Else preempt those ji, schedule j in the new empty interval (as early as possible)

  15. Properties of Provisional Schedule • Theorem:-competitive • Simple but useful properties of provisional schedule: • “No gap”, i.e. no idle period between planned jobs in it • “monotone”, i.e. once a time t becomes busy, won’t become idle later on • If a preemption happens, it preempts a suffix of the provisional schedule • Only linear number of potential job sets to consider (prov. sch.)

  16. Ideas of Proof • Classify jobs in OPT into four sets: • C: Completed in both OPT and ONL • R: Rejected by ONL (upon arrival) • D: Discarded by ONL (preempted before getting started) • A: Aborted by ONL (preempted while execution) • Jobs in R: • Cannot start in idle time in ONL • If start in a busy period with completed jobs j1,…,jm, then v(j) <  v(ji) <(v(j1)+v(j2)) OPT A j1 j2

  17. Bounding R jobs • Suppose an R-job j starts at t when ONL is idle • St[t] is empty. By monotone property, Sr(j)[t] is also empty • By no-gap property, Sr(j)[u] is all empty for u > t • Hence j could not be rejected • Suppose j starts at t when ONL is busy • Rejected due to a set X of jobs in Sr(j)[t] s.t. v(j) < v(X) • Jobs in X may be preempted but replaced by other (higher-value) jobs in the same busy period (no-gap) • Eventually goes to one of ji’s j t <(v(j1)+v(j2)) j1 j2

  18. Ideas of Proof • Consider one busy period • Let V(C) = V • Jobs in D/A: • Can prove v(D) + v(A)  V/( – 1) • Jobs in R: v(R)  L + V where L = length of b.p.  v(C) + v(A)  (1+1/( – 1))V • OPT  v(C) + v(A) + v(D) + v(R) • ONL  v(C) – (v(D)+v(A)) • Competitive ratio = OPT/ONL, choose a optimised 

  19. IMM DEC + UL • Same algorithm • Provisional schedule different properties: • Each preemption preempts either one job, or two including the currently executing one • Efficient identification of candidate preemption sets • Theorem: -competitive • Proof: • Similar ideas for C, A, D • Different bound for R

  20. Proof for UL Case • Each job in R is “blocked” by at most 2 jobs in provisional schedule (i.e. jobs in C/A/D) • Total value  (value of R-job)/ • Distribute the values to them • Each job in C/A/D “blocks” at most two jobs in R (i.e. in OPT) • V(R)  2( v(C)+v(A)+v(D) ) < (v1+v2) OPT v1 v2 v1 v1 Prov.sch. v1 v2 v1

  21. Unit Jobs • Discrete time steps, p(j) = 1 = time step size • No issue of preemption • Without immediate decision/notification: unit job scheduling problem • Motivation: buffer management in QoS switches • Previous results: • Deterministic UB 1.828, LB 1.618 • Randomized UB 1.582, LB 1.25 • Various restricted cases, adversary models etc

  22. Unit Jobs + IMM NOTIF • Algorithm: • Keep a provisional schedule S • When each job j arrives: • Find the earliest slot u before d(j) in S such that w(St[u]) < w(j)/ for some . Evict this job (call it j’) and j takes its place. If no such slot, reject j • Repeat above for the evicted job j’ (but with different condition w(St[u]) < w(j’)), the subsequently evicted j’’, … • -competitive • Lower bound?

  23. Unit Jobs + IMM DEC • Algorithm: • Keep a provisional schedule S • When a new job j arrives, find any slot u such that w(St[u]) < w(j)/ for some  • Replace St[u] with j • 4(1+)-competitive • () lower bounds

  24. Future Work • PP + UL: gap still exists • E.g. between (4, 4.56) for restart without penalty • Better bounds for IMM DEC + UL (=UW?) • Upper/lower bounds to separate the competitive ratio of IMM DEC / IMM NOTIF / no-commitment • Algorithms here works for IMM NOTIF, but trivially • Unit jobs lower bounds • IMM DEC but limited re-scheduling / wider interval / …

More Related