LNMB Course Advanced Queueing Theorysem/AQT/lecture02042012.pdf · 2012-04-02 · We will study...
Transcript of LNMB Course Advanced Queueing Theorysem/AQT/lecture02042012.pdf · 2012-04-02 · We will study...
/ department of mathematics and computer science 1/40
LNMB Course
Advanced Queueing Theory
Lecture 7, April 2, 2012
Onno Boxma, Sem Borst (TU/e)
http://www.win.tue.nl/˜sem/AQT/
/ department of mathematics and computer science 2/40
Course overview
1. Product-form networks: Queue lengths2. Product-form networks: Sojourn times3. The M/G/1 queue; multi-class queues4. Polling systems I5. PS, symmetric disciplines, DPS, GPS, BS networks6. Achievable delay region, delay optimization7. Size-based scheduling, SRPT, FBPS/LAS8. Heavy tails; impact of the service discipline9. Polling systems II
/ department of mathematics and computer science 3/40
Characterization of achievable mean waiting-time performance
Main result: A = A∗ = P
A = {E{Wπ} : π ∈ 5} is achievable performance region
(set of all achievable performance vectors)
A∗ := conv({E{Wπ} : π ∈ 5∗})
(convex hull of performance vectors achieved by priority strategies)provides geometric/structural description
P := {w ∈ RN: w satisfies cons. law & ineq.}
provides analytic/polyhedral characterization
/ department of mathematics and computer science 4/40
Optimization
Let us first consider case of non-preemptive strategies
Consider problem of finding scheduling strategy which minimizes meanholding cost per unit of time:
minπ∈5
N∑j=1
λ jc jE{Wπj }
Since A = A∗ = conv({E{Wπ} : π ∈ 5∗}), there must exist priority strategy
which is optimal, i.e., above problem may be reduced to solving
minπ∈5∗
N∑j=1
λ jc jE{Wπj }
/ department of mathematics and computer science 5/40
Optimization (cont’d)
To determine which strategy is optimal, suppose we swap two ad-jacent classes, i and i + 1, in (presumed) optimal priority ordering(1, 2, . . . , i, i + 1, . . . , N )
Then,E{Wi} < E{W′i},
E{Wi+1} > E{W′i+1},
while for all j 6= i, i + 1,E{W′j} = E{W j}
/ department of mathematics and computer science 6/40
Optimization (cont’d)
Because of work conservation property,
N∑j=1
ρ jE{W j} =
N∑j=1
ρ jE{W′j},
so that
ρiE{Wi} + ρi+1E{Wi+1} = ρiE{W′i} + ρi+1E{W′i+1},
or equivalently,
ρi(E{Wi} − E{W′i}) = ρi+1(E{W′i+1} − E{Wi+1}) =: 1 < 0
/ department of mathematics and computer science 7/40
Optimization (cont’d)
Thus,N∑
j=1
λ jc jE{W j} −
N∑j=1
λ jc jE{W′j} =
λiciE{Wi} + λi+1ci+1E{Wi+1} − λiciE{W′i} − λi+1ci+1E{W′i+1} =
λici(E{Wi} − E{W′i})− λi+1ci+1(E{W′i+1} − E{Wi+1}) =
ci
βiρi(E{Wi} − E{W′i})−
ci+1
βi+1ρi+1(E{W′i+1} − E{Wi+1}) =
1
(ci
βi−
ci+1
βi+1
)In order for strategy to be optimal, latter term must be non-positive, i.e.,since 1 < 0,
ci
βi≥
ci+1
βi+1
/ department of mathematics and computer science 8/40
Optimization (cont’d)
Thus, customer classes must be ranked in order of non-increasing value ofratio ci/βi , in particular
• “larger holding cost ci → higher priority”
• “larger mean service time βi → lower priority”
Recovers classical result [Fife (1965), Smith (1956)]
Conversely, that classical result shows that any linear combination of meanwaiting times is minimized by some priority strategy, which directly impliesthat A ⊆ A∗
Side-note: minimizing linear function over polyhedron P can apparently bedone efficiently using greedy algorithm, despite fact that P is described byas many as 2N
− 2 linear inequalities – reflects ‘special structure’ of P
/ department of mathematics and computer science 9/40
Interpretation
Consider consecutive service of class-i customer and class- j customer
Order i , j yields expected cost ciwi + c j(wi + βi)
Reversed order j , i yields expected cost c jwi + ci(wi + β j)
Difference in expected cost equals
ciβ j − c jβi
which must be non-negative for order i , j to be optimal, i.e.,
ci
βi≥
c j
β j
Complication in proof: need to deal with possibility of additional arrivals
/ department of mathematics and computer science 10/40
Optimization – preemptive strategies
Let us now turn to case of (possibly) preemptive strategies
As before, assume exponentially distributed service times, and considersojourn times as opposed to waiting times
Similar arguments as above then show that customer classes must beranked in order of non-increasing value of product ciµi (“cµ rule”)
/ department of mathematics and computer science 11/40
Some special cases
Minimization of mean holding cost: βi ≡ β for all i = 1, . . . , N →Customer classes must be ranked in order of non-increasing value of ci
Minimization of mean waiting time: ci ≡ c for all i = 1, . . . , N →Customer classes must be ranked in order of non-decreasing value of βi :Shortest Expected Processing Time first (SEPT)
/ department of mathematics and computer science 12/40
Some reflection on assumptions/limitations
Admissible scheduling strategies
• work-conserving
• uses no knowledge of (remaining) service times
In case of preemptive strategies, characterization / optimization results lim-ited to exponentially distributed service times
/ department of mathematics and computer science 13/40
Some reflection on assumptions/limitations(cont’d)
Work-conserving assumption is non-restrictive (for Poisson arrivals)
Knowledge of (remaining) service times may be modeled by introducing(possibly continuum of) artificial customer ‘classes’, each corresponding todifferent possible value of service time
May thus be interpreted as special case with (possibly continuum of) cus-tomer classes, each with different deterministic service time
/ department of mathematics and computer science 14/40
Non-preemptive strategies
In order to minimize mean waiting time, previous results imply that artifi-cial customer ‘classes’ must be ranked in order of non-decreasing value ofmean service time, which now equals actual service time
Thus, customers must be served in order of non-decreasing value of servicetime: Shortest Processing Time first (SPT)
In case of preemptive strategies two (related) issues remain to be addressed
• Knowledge of (remaining) service times
• Generally distributed service times
Both issues will be revisited soon
/ department of mathematics and computer science 15/40
Extensions
Multi-server queues [Federgruen & Groenevelt (1988)]
Issues
• Work conservation property does not hold, except for identical determin-istic service times
• Mean amount of work can only be evaluated for identically exponentiallydistributed service times
/ department of mathematics and computer science 16/40
Extensions (cont’d)
General multi-class stochastic system (multi-armed bandit problems,branching bandit problems, Klimov’s model)
For conciseness, let I := {1, . . . , N } index set of classes
Let 5 be class of admissible scheduling strategies
xπ performance vector for strategy π ∈ 5
/ department of mathematics and computer science 17/40
Extensions (cont’d)
Performance vector xπ is said to satisfy generalized conservation laws ifthere exist set function b : 2I
→+ and matrix (ASi )i∈I,S⊆I such that
• ∑j∈S
ASj xξj = b(S)
for all strategies ξ that give priority to classes j ∈ S, S ⊆ I, over classesj ∈ I \ S
• For all strategies π ∈ 5, ∑j∈I
AIj xπj = b(I),
and ∑j∈S
ASj xπj ≥ b(S)
for all proper subsets S ⊂ I
/ department of mathematics and computer science 18/40
Extensions (cont’d)
Define P(A, b) as polyhedron specified by generalized conservation laws
Then,
• Performance vectors achieved by priority strategies are verticesof P(A, b)
• Achievable performance region is P(A, b)
Thus, optimization problem minπ∈5
N∑j=1
c j xπj
may equivalently be expressed as linear program minx∈P(A,b)
N∑j=1
c j x j
Due to special polymatroidal structure, above linear program can be effi-ciently solved by running greedy algorithm
Simple index rules are optimal
/ department of mathematics and computer science 19/40
Preemptive strategies
Two (related) issues remain to be addressed
• Knowledge of (remaining) service times
• Generally distributed service times
We will study these two issues in context of G/G/1 queue
Specifically, we will identify strategies that minimize mean sojourn time inG/G/1 queue with possible preemption
Literature: D. Towsley (1995).Application of majorization to control problems in queueing systems.In: Scheduling Theory and its Applications, Chapter 14, Ph. Chrétienne, E.G.Coffman Jr., J.K. Lenstra, Z. Liu (eds.), John Wiley & Sons, Chichester.
/ department of mathematics and computer science 20/40
Preemptive strategies (cont’d)
First suppose we may use knowledge of (remaining) service times
We will show that Shortest Remaining Processing Time first (SRPT) strat-egy minimizes mean number of customers in system
SRPT in fact minimizes number of customers at any point in time for given‘sample path’ (i.e. realization of arrival and service times)
Because of Little’s law, SRPT also minimizes mean sojourn time
/ department of mathematics and computer science 21/40
Preemptive strategies (cont’d)
It is not possible to prove directly that SRPT outperforms any other strategyby considering number of customers in system only
Instead, we will consider vector of remaining service times of all customers,and show that this vector under SRPT ‘dominates’ that under any otherstrategy in certain sense
Dominance implies that number of customers is lower
Two proof concepts/techniques
• Majorization
• Sample-path comparison
/ department of mathematics and computer science 22/40
Majorization
Let x and y be n-dimensional (real-valued) vectors
Let x[i] and y[i] denote i -th largest component of x and y, respectively
DefinitionVector x is said to be majorized by vector y, denoted x ≺ y, if
j∑i=1
x[i] ≤j∑
i=1
y[i]
for all j = 1, . . . , n − 1, and
n∑i=1
x[i] =n∑
i=1
y[i]
Informally speaking, x ≺ y means that vector x is ‘more balanced’ thanvector y, average value of components being equal
/ department of mathematics and computer science 23/40
Sample-path comparison
Let Zπ be performance vector for strategy π ∈ 5
Want to show that some strategy π∗ optimizes some performance mea-sure Z in stochastic sense
• either Zπ∗
≤st Zπ for all admissible strategies π , i.e., P{Zπ∗ ≤ z} ≥P{Zπ ≤ z} for all z
• or Zπ∗
≥st Zπ for all admissible strategies π i.e., P{Zπ∗ ≤ z} ≤ P{Zπ ≤z} for all z
/ department of mathematics and computer science 24/40
Sample-path comparison (cont’d)
General principle (stochastic coupling): compare ‘guessed’ optimal strat-egy π∗ with with some arbitrary strategy π by constructing processes U andU∗ on common probability space such that
• U ≤ U∗ (or U ≥ U∗, depending on context)
• U =st Zπ
• U∗ =st Zπ∗
which implies Zπ ≤st Zπ∗
(or Zπ ≥st Zπ∗
)
Although existence of U and U∗ is guaranteed, constructing them is non-obvious and involves subtleties
No universal recipe or systematic framework
Requires combination of ingenuity, intuition and caution
/ department of mathematics and computer science 25/40
Proof of SRPT optimality
We will now use notion of majorization and sample path comparison toprove that π∗ = SRPT minimizes number of customers in system at anypoint in time
As mentioned earlier, considering number of customers only is not suffi-cient
Instead, we will consider vector of remaining service times of all customers,and show that this vector under SRPT majorizes that under any otherstrategy
Majorization implies that vector contains maximum number of zero com-ponents, and hence number of customers is minimized
/ department of mathematics and computer science 26/40
Proof of SRPT optimality (cont’d)
Notation
A(t): number of customers that arrive during [0, t]
Qπ(t): number of customers in system at time t under strategy π ∈ 5
Tπ(t) := (Tπ1 (t), . . . ,TπA(t)(t)): vector of remaining service times under
strategy π ∈ 5, possibly zero, arranged in non-increasing order
TheoremIf Qπ
∗
(0) = Qπ(0) = 0, then
{Qπ∗
(t)}t≥0 ≤st {Qπ(t)}t≥0
for all strategies π ∈ 5
Above inequality in fact holds sample-path wise
/ department of mathematics and computer science 27/40
Proof of SRPT optimality (cont’d)
Condition on arrival times, service times and initial queue lengths
Let 0 = t0 < t1 < · · · < tn < . . . be event times under strategies π and π∗
(arrivals, service completions, service preemptions)
We will show by forward-induction argument that
Tπ(t) ≺ Tπ∗
(t)
for all t ≥ 0 over all sample paths
Observe that latter inequality implies that vector Tπ∗
(t) contains more zerocomponents than Tπ(t), i.e.,
Qπ∗
(t) ≤ Qπ(t)
/ department of mathematics and computer science 28/40
Proof of SRPT optimality (cont’d)
Basis step
By assumption, inequality relations hold for t = t0
Induction step
Assume that inequality relation holds through t = tn
We prove relation for t ∈ (tn, tn+1]
By induction hypothesis,
k∑i=1
Tπ[i](tn) ≤
k∑i=1
Tπ∗
[i] (tn)
for k = 1, . . . ,A(tn)
/ department of mathematics and computer science 29/40
Proof of SRPT optimality (cont’d)
Strategy π∗ serves customer with smallest remaining service time – letthat be m-th largest component of vector Tπ
∗
(tn) – so Tπ∗
[i] (tn) = 0 fori = m + 1, . . . ,A(t)
Let π serve customer with l-th largest remaining service time
We need to distinguish between two cases: l ≤ m and l > m
/ department of mathematics and computer science 30/40
Case l ≤ m
π*
1 2 3 A(t) 1 2 3 A(t)
π
ml
•k∑
j=1
Tπ[ j](t) =
k∑j=1
Tπ[ j](tn) ≤
k∑j=1
Tπ∗
[ j](tn) =k∑
j=1
Tπ∗
[ j](t)
for k = 1, . . . , l − 1
/ department of mathematics and computer science 31/40
•k∑
j=1
Tπ[ j](t) =
k∑j=1
Tπ[ j](tn)− (t − tn) ≤
k∑j=1
Tπ∗
[ j](tn) =k∑
j=1
Tπ∗
[ j](t)
for k = l, . . . ,m − 1
•k∑
j=1
Tπ[ j](t) =
k∑j=1
Tπ[ j](tn)− (t − tn) ≤
k∑j=1
Tπ∗
[ j](tn)− (t − tn) =k∑
j=1
Tπ∗
[ j](t)
for k = m, . . . ,A(t)
/ department of mathematics and computer science 32/40
Case l > m
π*
1 2 3 A(t) 1 2 3 A(t)
π
ml
•k∑
j=1
Tπ[ j](t) =
k∑j=1
Tπ[ j](tn) ≤
k∑j=1
Tπ∗
[ j](tn) =k∑
j=1
Tπ∗
[ j](t)
for k = 1, . . . ,m − 1
/ department of mathematics and computer science 33/40
•k∑
j=1
Tπ[ j](t) =
k∑j=1
Tπ[ j](tn) ≤
A(t)∑j=1
Tπ[ j](tn)− (t − tn) =
A(t)∑j=1
Tπ∗
[ j](tn)− (t − tn) =k∑
j=1
Tπ∗
[ j](t)
for k = m, . . . , l − 1
•k∑
j=1
Tπ[ j](t) =
k∑j=1
Tπ[ j](tn)− (t − tn) ≤
k∑j=1
Tπ∗
[ j](tn)− (t − tn) =k∑
j=1
Tπ∗
[ j](t)
for k = l, . . . ,A(t)
/ department of mathematics and computer science 34/40
Proof of SRPT optimality (cont’d)
Thus, we conclude Tπ(t) ≺ Tπ∗
(t) for all t ∈ [tn, tn+1]
By forward induction, Tπ(t) ≺ Tπ∗
(t) for all t ≥ 0
Removal of conditioning on arrival times, service phases and initial queuelengths completes proof
/ department of mathematics and computer science 35/40
Preemptive strategies
Now suppose we have generally distributed service times with distributionfunction F(x) = P{B < x}, density f (·) = dF(x)/dx , and no longerknowledge of actual values
Failure (or hazard) rate function of B is h(x) = f (x)/(1− F(x))
/ department of mathematics and computer science 36/40
Preemptive strategies (cont’d)
Results for monotone failure rate functions and Poisson arrivals
• If B has increasing failure rate function (IFR), then serving customersin any non-preemptive manner (e.g. in order of arrival (FCFS)) stochas-tically minimizes number of customers in system, and hence mean so-journ time
• If B has decreasing failure rate function (DFR), then serving customer(s)with Least Attained Service Time (LAST) stochastically minimizes num-ber of customers in system, and hence mean sojourn time
Note that under LAST service capacity is generally shared among severalcustomers simultaneously
LAST is also known under name Foreground Background Processor Shar-ing (FBPS)
/ department of mathematics and computer science 37/40
Preemptive strategies (cont’d)
• If B has increasing failure rate function (IFR), then LAST stochasticallymaximizes number of customers in system, and hence mean sojourntime
• If B has decreasing failure rate function (DFR), then serving customersin any non-preemptive manner stochastically maximizes number of cus-tomers in system, and hence mean sojourn time
In case B is exponentially distributed, failure rate function is constant (bothDFR and IFR), and it follows that any strategy gives rise to same distributionof number of customers, and hence same mean sojourn time (but not samesojourn time distribution)
/ department of mathematics and computer science 38/40
References
D. Bertsimas (1995). The achievable region method in the optimal controlof queueing systems; formulations, bounds and policies. Queueing Systems21, 337–389.D. Bertsimas, J. Niño-Mora (1996). Conservation laws, extended polyma-troids and multiarmed bandit problems; a polyhedral approach to indexablesystems. Math. Oper. Res. 21, 257–306.P.P. Bhattacharya, L. Georgiadis, P. Tsoucas (1995). Problems of adaptiveoptimization in multiclass M/GI/1 queue with Bernoulli feedback. Math.Oper. Res. 20, 355–380.E.G. Coffman, Jr., I. Mitrani (1980). A characterization of waiting-time per-formance realizable by single-server queues. Oper. Res. 28, 810–821.G. Fayolle, I. Mitrani, R. Iasnogorodski (1980). Sharing a processor amongmany job classes. J. ACM 27, 519–532.A. Federgruen, H. Groenevelt (1988). Characterization and optimization ofachievable performance in general queueing systems. Oper. Res. 36, 733–741.
/ department of mathematics and computer science 39/40
References (cont’d)
A. Federgruen, H. Groenevelt (1988). M/G/C queueing systems with mul-tiple customer classes: characterization and control of achievable perfor-mance under nonpreemptive priority rules. Mgmt. Science 34, 1121–1138.D.W. Fife (1965). Scheduling with random arrivals and linear loss functions.Mgmt. Science 11, 429–437.L. Kleinrock (1965). A conservation law for a wide class of queueing disci-plines. Naval Res. Log. Quart. 12, 181–192.G.P. Klimov (1974). Time-sharing service systems I. Th. Prob. Appl., 532–551.A.W. Marshall, I. Olkin (1979). Inequalities: Theory of Majorization and itsApplications, Academic Press, New York.I. Mitrani, J.H. Hine (1977). Complete parameterized families of jobscheduling strategies. Acta Informatica 8, 61–73.R. Righter (1994). Scheduling. In: Stochastic Orders and their Applications,eds. M. Shaked and J.G. Shanthikumar, Academic Press.
/ department of mathematics and computer science 40/40
References (cont’d)
R. Righter, J.G. Shantikumar (1989). Scheduling multi-class single-serversystems to stochastically maximize the number of successful departures.Prob. Eng. Inf. Sc. 3, 323–333.L.E. Schrage (1968). A proof of the optimality of the SRPT discipline. Oper.Res. 16, 687–690.L.E. Schrage, L.W. Miller (1966). The queue M/G/1 with the shortest re-maining processing time discipline. Oper. Res. 14, 670–683.J.G. Shanthikumar, D.D. Yao (1992). Multiclass queueing systems: polyma-troidal structure and optimal scheduling control. Oper. Res. 40, S293–S299.W.E. Smith (1956). Various optimizers for single stage production. NavalRes. Log. Quart. 3, 59–66.P.D. Sparaggis, D. Towsley, C.G. Cassandras (1994). Sample path criteriafor weak majorization. Adv. Appl. Prob. 26, 155–171.D. Stoyan (1983). Comparison Methods for Queues, John Wiley & Sons, Berlin.