Mechanism Design for Real-Time Scheduling

22
Mechanism Design Mechanism Design for Real-Time for Real-Time Scheduling Scheduling Carl Bussema III Carl Bussema III 18 April 2005 18 April 2005 Based on "Mechanism Design Based on "Mechanism Design for Real-Time Scheduling" by for Real-Time Scheduling" by Ryan Porter Ryan Porter

description

Mechanism Design for Real-Time Scheduling. Carl Bussema III 18 April 2005 Based on "Mechanism Design for Real-Time Scheduling" by Ryan Porter. Teaser. Definition of problem Previous results Designing a mechanism Restricted cases Conclusions and questions. Clueless: Problem Definition I. - PowerPoint PPT Presentation

Transcript of Mechanism Design for Real-Time Scheduling

Page 1: Mechanism Design for Real-Time Scheduling

Mechanism Design for Mechanism Design for Real-Time SchedulingReal-Time Scheduling

Carl Bussema IIICarl Bussema III18 April 200518 April 2005

Based on "Mechanism Design for Real-Based on "Mechanism Design for Real-Time Scheduling" by Ryan PorterTime Scheduling" by Ryan Porter

Page 2: Mechanism Design for Real-Time Scheduling

TeaserTeaser

Definition of problemDefinition of problemPrevious resultsPrevious resultsDesigning a mechanismDesigning a mechanismRestricted casesRestricted casesConclusions and questionsConclusions and questions

Page 3: Mechanism Design for Real-Time Scheduling

Clueless: Problem Definition IClueless: Problem Definition I

Online real-time scheduling (uniprocessor)Online real-time scheduling (uniprocessor) Jobs released at various times, no knowledge Jobs released at various times, no knowledge

of upcoming jobsof upcoming jobs Goal: complete highest value of jobs before Goal: complete highest value of jobs before

their deadlinestheir deadlinesZero value if job not complete by deadlineZero value if job not complete by deadline

Compare results to optimal performance if all Compare results to optimal performance if all jobs known from startjobs known from start

Formally define a job to have a release time Formally define a job to have a release time rr, , a length a length ℓℓ, a value , a value vv, and a deadline , and a deadline dd

Page 4: Mechanism Design for Real-Time Scheduling

Clueless: Problem Definition IIClueless: Problem Definition II

Mechanism designMechanism design Each jobs released to a different self-interested Each jobs released to a different self-interested

agentagent Agent gets value Agent gets value vv if its job finishes before if its job finishes before dd Agent submits job with some type (Agent submits job with some type (r′, r′, ℓℓ′, v′, d′)′, v′, d′)

Scale values as needed so no job has v < ℓScale values as needed so no job has v < ℓ Server decides schedule from what it's toldServer decides schedule from what it's told Server charges agents some price Server charges agents some price pp Goal: Design competitive mechanism with Goal: Design competitive mechanism with

dominant strategydominant strategy

Page 5: Mechanism Design for Real-Time Scheduling

A Different World: MotivationA Different World: Motivation

Problem traditionally considered in non-Problem traditionally considered in non-strategic settingstrategic setting Jobs released directly to server; no chance to Jobs released directly to server; no chance to

lie; no payments requiredlie; no payments required

Strategic setting makes more sense with Strategic setting makes more sense with modern environments like grid computingmodern environments like grid computingRT setting allows model to be used for RT setting allows model to be used for mission-critical applicationsmission-critical applications

Page 6: Mechanism Design for Real-Time Scheduling

The Others: Previous resultsThe Others: Previous results

Most previous work focused on Most previous work focused on non-non-strategicstrategic settings settingsExpress competitive ratios based on Express competitive ratios based on k = k = max max / / min min ,, where where is is v/v/ℓℓ for any job for any job For k = 1, a 4-competitive algorithm exists For k = 1, a 4-competitive algorithm exists For k For k ≥ 1, a ≥ 1, a (1+(1+√k)√k)22 - competitive algorithm - competitive algorithm

existsexists Both bounds also shown tight for deterministic Both bounds also shown tight for deterministic

algorithmsalgorithms

Page 7: Mechanism Design for Real-Time Scheduling

Step by Step:Step by Step:Designing a MechanismDesigning a Mechanism

Agents being self-motivated want to profitAgents being self-motivated want to profitEncourage participation:Encourage participation: Non-participants get 0 utilityNon-participants get 0 utility Participants get at least 0 utilityParticipants get at least 0 utility System must be designed to handle thisSystem must be designed to handle thisCompetitive performance easier if Competitive performance easier if truthfulness ensuredtruthfulness ensured Design system such that lying can't increase Design system such that lying can't increase

utility and may decrease itutility and may decrease it

Page 8: Mechanism Design for Real-Time Scheduling

CSICSI**: An example (I): An example (I)*CSI = Conflicting Schedule Illustrated*CSI = Conflicting Schedule Illustrated

Consider jobs in the table (Consider jobs in the table (ℓℓ = v = v k = k = 11))Deciding to preempt:Deciding to preempt: Use some metric toUse some metric to

assign priorityassign priority This example: findThis example: find

expected loss based onexpected loss based on“what could be done by new job’s deadline”“what could be done by new job’s deadline”

Don't preempt if expected loss under desired ratioDon't preempt if expected loss under desired ratio This example, 2 waits for 1 and is preempted by 3This example, 2 waits for 1 and is preempted by 3

JobJob rrii ddii ℓℓii vvii

11 0.00.0 0.90.9 0.90.9 0.90.9

22 0.50.5 5.55.5 4.04.0 4.04.0

33 4.84.8 17.017.0 12.212.2 12.212.2

Page 9: Mechanism Design for Real-Time Scheduling

CSI: Example revisited (II)CSI: Example revisited (II)

If instead, job 2 If instead, job 2 lies about its lies about its deadline, an deadline, an algorithm might algorithm might preempt job 1 for preempt job 1 for it, so 2 would finish it, so 2 would finish before 3 arrivesbefore 3 arrives

JobJob rrii ddii llii vvii

11 0.00.0 0.90.9 0.90.9 0.90.9

22 0.50.5 4.74.7 4.04.0 4.04.0

33 4.84.8 17.017.0 12.212.2 12.212.2

Page 10: Mechanism Design for Real-Time Scheduling

The Practice:The Practice:Porter's MechanismPorter's Mechanism

At every time At every time tt, run the job , run the job i i with highest with highest priority = priority = vvii′ + ′ + √k (e√k (eii(t)) (t)) minmin eeii(t) is elapsed processing time for job (t) is elapsed processing time for job ii by by ttNotice:Notice: Priority based on Priority based on reported valuereported value and and elapsed elapsed

processing timeprocessing time (k and (k and min min are independent of are independent of any single job)any single job)

Priority of a job only increases when Priority of a job only increases when activeactive Requires Requires a priori a priori knowledge of knowledge of kk and and minmin

Page 11: Mechanism Design for Real-Time Scheduling

The Price is Right:The Price is Right:Payment SchemePayment Scheme

Agents whose jobs are completed by deadlines Agents whose jobs are completed by deadlines must pay server the minimum value that would must pay server the minimum value that would have completed their job, given everything else have completed their job, given everything else all agents reportedall agents reported This is similar to a second-price auctionThis is similar to a second-price auction These agents then have utility = These agents then have utility = v – pv – p Agents aware of this charging scheme and will abide Agents aware of this charging scheme and will abide

by it (could demand by it (could demand vv up front and use refund) up front and use refund)Other agents pay nothing (therefore have zero Other agents pay nothing (therefore have zero utility)utility)Thus we satisfy Individual Rationality: agents will Thus we satisfy Individual Rationality: agents will voluntarily participate because it can only helpvoluntarily participate because it can only help

Page 12: Mechanism Design for Real-Time Scheduling

To Tell the Truth:To Tell the Truth:Preventing Lies—OverviewPreventing Lies—Overview

Agents could lie about 4 things:Agents could lie about 4 things: Release timeRelease time

Prohibit: claiming r′ < rProhibit: claiming r′ < r LengthLength

Prohibit: claiming Prohibit: claiming ℓ´ < ℓℓ´ < ℓ ValueValue DeadlineDeadlineNecessary to show under- or over-stating Necessary to show under- or over-stating any of these is not beneficialany of these is not beneficial

Page 13: Mechanism Design for Real-Time Scheduling

To Tell the Truth:To Tell the Truth:Preventing Lies to ImprovePreventing Lies to Improve

Because of 2Because of 2ndnd-price auction, lying about value -price auction, lying about value can't helpcan't helpClaiming an early release time or a shorter Claiming an early release time or a shorter length are prohibitedlength are prohibitedClaiming a later deadline could possibly helpClaiming a later deadline could possibly help We avoid this by "holding" jobs on the server until We avoid this by "holding" jobs on the server until

reported deadline, only then return to agentreported deadline, only then return to agent Thus agents will not get their jobs by their real Thus agents will not get their jobs by their real

deadlines, and thus get no utilitydeadlines, and thus get no utilityMore interesting is the problem of lying to More interesting is the problem of lying to worsenworsen

Page 14: Mechanism Design for Real-Time Scheduling

Law & Order:Law & Order:Proof of Truthfulness – Proof of Truthfulness – rri i (I)(I)

Ground rule: can't declare r′ < rGround rule: can't declare r′ < rAssume for some reported (Assume for some reported (rrii′, ′, ℓℓii′, v′, vii′, d′, dii′) ′) job job ii finishes before finishes before dd, but not under (, but not under (rrii, , ℓℓii′, ′, vvii′, d′, dii′) ′) ℓℓ′ ′ ≥ ≥ ℓ ℓ by ground rules, by ground rules, d′d′ < d by rationality< d by rationality

We will show this is impossibleWe will show this is impossible

Page 15: Mechanism Design for Real-Time Scheduling

Law & Order:Law & Order:Proof of Truthfulness – Proof of Truthfulness – rri i (II)(II)

Consider case with truthful Consider case with truthful rr:: Let Let ttpp be the first time be the first time ii is is

preempted; preempted; ttaa bebe time time IIabandoned abandoned (not enough(not enoughtime left)time left)

Claim: all jobs that execute during (tClaim: all jobs that execute during (tpp,t,taa] either arrive ] either arrive during that same time and have higher priority at their during that same time and have higher priority at their release than release than ii or are or are II

If a job If a job x x was released before was released before ttpp, , clearly clearly ii has priority over has priority over xx, , because at some point before because at some point before ttpp, , ii ran instead of ran instead of xx

If a job If a job z z is released during the interval, then by definition it has is released during the interval, then by definition it has lower priority at its releaselower priority at its release

Inactive jobs do not increase in priority, so the claim holdsInactive jobs do not increase in priority, so the claim holds

Page 16: Mechanism Design for Real-Time Scheduling

Law & Order:Law & Order:Proof of Truthfulness – Proof of Truthfulness – rri i (III)(III)

Now consider case where agent declares Now consider case where agent declares rrii′′ > r> rii SS must change during (t must change during (tpp, t, taa] vs. when ] vs. when rrii declareddeclared

ii can't run longer outside this range when can't run longer outside this range when rrii′ > r′ > rii

The change could be any job for another, not necessarily The change could be any job for another, not necessarily ii Call tCall tcc

first time change occurs, yfirst time change occurs, ycc job running then job running then

under original under original SS. How can any job have higher priority . How can any job have higher priority at tat tcc than y than ycc under S′? under S′?

Before tBefore tp p the job ran longer under the job ran longer under S′S′ (had to replace (had to replace ii)—won’t )—won’t increase priority enough to outweigh a job that beats increase priority enough to outweigh a job that beats I I at tat tpp

During (tDuring (tpp,t,tcc) the job ran longer under ) the job ran longer under S′S′ (again has to replace (again has to replace or be or be ii). Contradicts “first time change occurs.”). Contradicts “first time change occurs.”

Since no job can have higher priority than ySince no job can have higher priority than ycc at t at tcc under under S′S′ than under than under SS, no change can occur, and a later , no change can occur, and a later release time can’t helprelease time can’t help

Page 17: Mechanism Design for Real-Time Scheduling

Law & Order:Law & Order:Proof of Truthfulness – Proof of Truthfulness – ℓℓii & & ddii

Recall: Recall: ℓ′ < ℓ disallowed; ℓ′ < ℓ disallowed; ddii′ ′ > d> dii unhelpful unhelpfulOnly effect these have is on defining set of Only effect these have is on defining set of "available" jobs"available" jobs Incomplete: those with elapsed time < Incomplete: those with elapsed time < ℓ′ ℓ′ Abandoned: elapsed time + time to Abandoned: elapsed time + time to dd′ ≤ ℓ′′ ≤ ℓ′ If job completes with ℓ′ and If job completes with ℓ′ and d′d′, the 1, the 1stst condition must condition must

become false before 2become false before 2ndnd becomes true becomes trueDeclaring earlier release and later deadline will Declaring earlier release and later deadline will only make "incomplete" false earlier and only make "incomplete" false earlier and "abandoned" false later, so it will not help to lie "abandoned" false later, so it will not help to lie about these.about these.

Page 18: Mechanism Design for Real-Time Scheduling

NUMB3RS: Competitive RatioNUMB3RS: Competitive RatioProofsketch (recall k=Proofsketch (recall k=max max / / minmin, , =v/=v/ℓ)ℓ)::

List only jobs List only jobs completedcompleted by schedule and divide time into intervals by schedule and divide time into intervals (t(tff

openopen,t,tffcloseclose]:]:

ttffclose close = time when job = time when job ff finished; t finished; tff

openopen = t = tf-1f-1closeclose (0 for t (0 for t11))

Prove no interval length Prove no interval length ≥ ≥ (1+1/(1+1/√k)v√k)vff (induction) (induction) Prove max OPT can get per interval for jobs we abandoned is Prove max OPT can get per interval for jobs we abandoned is

(1+√k)v(1+√k)vf f (we wouldn't have abandoned them)(we wouldn't have abandoned them) Give OPT per interval:Give OPT per interval:

kk times interval length (almost entire interval on max. dense job) times interval length (almost entire interval on max. dense job)+ bonus for doing some job we abandoned (short, dense)+ bonus for doing some job we abandoned (short, dense)+ v+ vff (it might finish this later) (it might finish this later)

Add results: Add results: (t(tff

closeclose - t - tffopenopen)k + v)k + vff + (1+ √k)v + (1+ √k)vf f ≤ ((1+ √k)² +1)v≤ ((1+ √k)² +1)vff

vvff is what we achieve each interval; so ratio is O((1+ √k)² +1) is what we achieve each interval; so ratio is O((1+ √k)² +1)

Page 19: Mechanism Design for Real-Time Scheduling

The Outer Limits: Special caseThe Outer Limits: Special case

If k=1 and agents can't lie about length, If k=1 and agents can't lie about length, payments will no longer be required to payments will no longer be required to keep agents honestkeep agents honestProof mirrors above, only simplerProof mirrors above, only simplerSame as above, achieves 5-competitive Same as above, achieves 5-competitive ratio, but has advantage of not needing ratio, but has advantage of not needing paymentspayments

Page 20: Mechanism Design for Real-Time Scheduling

Happy Days: ConclusionHappy Days: Conclusion

Porter also proves his bound is a lower Porter also proves his bound is a lower bound for any deterministic online bound for any deterministic online mechanism with non-negative paymentsmechanism with non-negative paymentsRT grid computing increasingly popularRT grid computing increasingly popular Need for competitive scheduling algorithmsNeed for competitive scheduling algorithms

Insights here show strategic setting not Insights here show strategic setting not significantly worse than non-strategicsignificantly worse than non-strategic

Page 21: Mechanism Design for Real-Time Scheduling

Unsolved MysteriesUnsolved Mysteries

Extend results to multiprocessor environment?Extend results to multiprocessor environment?Apply strategic concepts to bidding for CPU time Apply strategic concepts to bidding for CPU time in resource augmentation environment (online in resource augmentation environment (online algorithm gets faster CPU(s) than OPT)?algorithm gets faster CPU(s) than OPT)?Find better bound with randomized Find better bound with randomized mechanisms?mechanisms?Would knowing exact range of densities instead Would knowing exact range of densities instead of just of just minmin and k lead to stronger bound? and k lead to stronger bound?

Your questions?Your questions?

Page 22: Mechanism Design for Real-Time Scheduling

The A-Team: ReferenceThe A-Team: Reference

[1] Porter, Ryan. [1] Porter, Ryan. Mechanism Design for Mechanism Design for Real-Time Scheduling. Real-Time Scheduling. In Proc. of the In Proc. of the ACM Conference on Electronic Commerce ACM Conference on Electronic Commerce (EC'04), 2004 (EC'04), 2004