Basic Queueing Theory CS 450 : Operating Systems Michael Saelee - - PowerPoint PPT Presentation

basic queueing theory
SMART_READER_LITE
LIVE PREVIEW

Basic Queueing Theory CS 450 : Operating Systems Michael Saelee - - PowerPoint PPT Presentation

Basic Queueing Theory CS 450 : Operating Systems Michael Saelee <lee@iit.edu> Agenda - Queueing theory? Huh? - Probability refresher / Crash course - Queueing theory & Kendalls notation - Mean value analysis of basic queues


slide-1
SLIDE 1

CS 450 : Operating Systems Michael Saelee <lee@iit.edu>

Basic Queueing Theory

slide-2
SLIDE 2
  • Queueing theory? Huh?
  • Probability refresher / Crash course
  • Queueing theory & Kendall’s notation
  • Mean value analysis of basic queues

Agenda

slide-3
SLIDE 3

§ Queueing Theory? Huh?

slide-4
SLIDE 4

Remember, we started our discussion of scheduling at a high level — “policy”

  • mostly described heuristics-based (i.e., hand-wavy) approaches
slide-5
SLIDE 5

to obtain empirical data, we can examine a “live” operating system’s scheduler

slide-6
SLIDE 6

to exercise rigor, should leverage some branch of mathematics well-suited to analyzing scheduling systems

… queueing theory!

slide-7
SLIDE 7

queueing theory models wait queues using probability theory

  • e.g., arrival/service rate distributions
  • supports mathematical analysis & rigor
slide-8
SLIDE 8

wide application:

  • checkout lines
  • telecom switch
  • traffic light system
  • network quality of service
slide-9
SLIDE 9

we’ll barely scratch the surface — queueing theory is an area ripe for research — but you’ll see some basic applications

  • will also help explain underpinnings of simulators used for

scheduling!

slide-10
SLIDE 10

§ Probability refresher / Crash course

slide-11
SLIDE 11

Probability theory = quantitative analysis of random phenomena

  • assign a weighted probability to every event in a sample space (Ω)
  • use these probability distributions to better understand the

behavior of the phenomena

slide-12
SLIDE 12

Core abstraction: random variable

  • a R.V

. is a function that maps the sample space onto numeric values (e.g., X:Ω→ℝ)

  • discrete R.V

.s map to a countable set

  • continuous R.V

.s map events onto an uncountable set 
 (e.g., real-valued)

slide-13
SLIDE 13

Ω = {TT, TH, HT, HH} X(ω) =        0, if ω = TT 1, if ω = TH 2, if ω = HT 3, if ω = HH

E.g., double coin toss (discrete event space)

slide-14
SLIDE 14

Typically interested in a variety of statistics of random variables (and corresponding events):

  • probability of event n: P(X=n) (or p(n))
  • expected value (mean): E(X)
  • variance: σ2(X); standard deviation: σ(X)
  • coefficient of variance: CX=σ(X)/E(X)


(unitless measure)

slide-15
SLIDE 15

e.g., 6-sided dice roll — probability mass function Note:

X

n

P(X = n) = 1 E(X) = X

n

n · p(n) = 3.5

P(X = n) = p(n) = 1 6, n = 1, 2, 3, 4, 5, 6

<latexit sha1_base64="3hdbwTSVxBON+FiA5gMGQhY0lE=">ACD3icbZDLSgMxFIYz9VbrbdSlm2BRKgxlptbqplB047KCvUA7lEyaUMzmSHJCGXoG7jxVdy4UMStW3e+jWk7C209kPDx/+eQnN+LGJXKtr+NzMrq2vpGdjO3tb2zu2fuHzRlGAtMGjhkoWh7SBJGOWkoqhpR4KgwGOk5Y1upn7rgQhJQ36vxhFxAzTg1KcYKS31zN6oV3lZ9WoK+uLxBOnElSmViQVx2rZJ1bZevCqvTMvF20ZwWXwUkhD9Kq98yvbj/EcUC4wgxJ2XHsSLkJEopiRia5bixJhPAIDUhHI0cBkW4y2cCT7TSh34o9OEKztTfEwkKpBwHnu4MkBrKRW8q/ud1YuVfuQnlUawIx/OH/JhBFcJpOLBPBcGKjTUgLKj+K8RDpENROsKcDsFZXHkZmqWio/munK9dp3FkwRE4BgXgEtQA7egDhoAg0fwDF7Bm/FkvBjvxse8NWOkM4fgTxmfP/s6mMs=</latexit><latexit sha1_base64="3hdbwTSVxBON+FiA5gMGQhY0lE=">ACD3icbZDLSgMxFIYz9VbrbdSlm2BRKgxlptbqplB047KCvUA7lEyaUMzmSHJCGXoG7jxVdy4UMStW3e+jWk7C209kPDx/+eQnN+LGJXKtr+NzMrq2vpGdjO3tb2zu2fuHzRlGAtMGjhkoWh7SBJGOWkoqhpR4KgwGOk5Y1upn7rgQhJQ36vxhFxAzTg1KcYKS31zN6oV3lZ9WoK+uLxBOnElSmViQVx2rZJ1bZ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KcDsFZXHkZmqWio/munK9dp3FkwRE4BgXgEtQA7egDhoAg0fwDF7Bm/FkvBjvxse8NWOkM4fgTxmfP/s6mMs=</latexit><latexit sha1_base64="3hdbwTSVxBON+FiA5gMGQhY0lE=">ACD3icbZDLSgMxFIYz9VbrbdSlm2BRKgxlptbqplB047KCvUA7lEyaUMzmSHJCGXoG7jxVdy4UMStW3e+jWk7C209kPDx/+eQnN+LGJXKtr+NzMrq2vpGdjO3tb2zu2fuHzRlGAtMGjhkoWh7SBJGOWkoqhpR4KgwGOk5Y1upn7rgQhJQ36vxhFxAzTg1KcYKS31zN6oV3lZ9WoK+uLxBOnElSmViQVx2rZJ1bZevCqvTMvF20ZwWXwUkhD9Kq98yvbj/EcUC4wgxJ2XHsSLkJEopiRia5bixJhPAIDUhHI0cBkW4y2cCT7TSh34o9OEKztTfEwkKpBwHnu4MkBrKRW8q/ud1YuVfuQnlUawIx/OH/JhBFcJpOLBPBcGKjTUgLKj+K8RDpENROsKcDsFZXHkZmqWio/munK9dp3FkwRE4BgXgEtQA7egDhoAg0fwDF7Bm/FkvBjvxse8NWOkM4fgTxmfP/s6mMs=</latexit>
slide-16
SLIDE 16

e.g., probability of rolling “snake-eyes” with two 6-sided dice: multiplication rule: for any two independent events,

P(A and B) = P(A) · P(B)

<latexit sha1_base64="HwiCp9nCwhCxrz+OS8vkvFtjcWM=">ACDnicbZDNSgMxFIUz9a/Wv1GXboKl0G7KjAi6EWrduKxgW6EzlEwm04ZmkiHJiGXoE7jxVdy4UMSta3e+jWk7C209EPg4915u7gkSRpV2nG+rsLK6tr5R3Cxtbe/s7tn7Bx0lUolJGwsm5F2AFGUk7ampG7RBIUB4x0g9HVtN69J1JRwW/1OCF+jAacRhQjbay+XWlVL6EXB+Ihg4iHcAKbNXgBjVuDHg6FNtis9e2yU3dmgsvg5lAGuVp9+8sLBU5jwjVmSKme6yTaz5DUFDMyKXmpIgnCIzQgPYMcxUT52eycCawYJ4SRkOZxDWfu74kMxUqN48B0xk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sw/+lPX5A1+KneU=</latexit><latexit sha1_base64="kF/MrdrzfgIwXm2PGYP1ZCiwao=">ACEnicbZDLSgMxFIYz9VbrbdSlm2ARdFNmVKoboejGZQV7gc5QMmDc0kQ5IRyjDP4MZXceNCEbeu3Pk2pu2AtfVA4Mv/n0Ny/iBmVGnH+bYKS8srq2vF9dLG5tb2jr271QikZg0sGBCtgOkCKOcNDTVjLRjSVAUMNIKhjdjv/VApKC3+tRTPwI9TkNKUbaSF375MoLJcKpm6XVzM9oWfuv95ZNevaZafiTAougptDGeRV79pfXk/gJCJcY4aU6rhOrP0USU0xI1nJSxSJER6iPukY5Cgiyk8nK2XwyCg9GApDtdwos5OpChSahQFpjNCeqDmvbH4n9dJdHjp5THiSYcTx8KEwa1gON8YI9KgjUbGUBYUvNXiAfIxKBNiUTgju/8iI0Tyu4bvzcu06j6MIDsAhOAYuA1cAvqoAEweATP4BW8WU/Wi/VufUxbC1Y+sw/+lPX5A1+KneU=</latexit>
slide-17
SLIDE 17

FX(n) = P(X ≤ n) = X

x≤n

p(x)

e.g., likelihood of rolling ≤ 3 with a 6-sided dice: cumulative distribution function (CDF):

FX(3) = P(X ≤ 3) = 1 6 + 1 6 + 1 6 = 1 2 FX(6) = 1

slide-18
SLIDE 18

1 2 3 4 5 6 0.2 0.4 0.6 0.8 1.0 n P(X≤n) 1 2 3 4 5 6 0.10 0.14 0.18 0.22 P(X=n)

6-sided dice PMF, CDF

slide-19
SLIDE 19

Many well known probability distributions are used to model real world phenomena

from “Brains and Careers,” by D. Keirsey

slide-20
SLIDE 20

¶ Two discrete probability distributions

slide-21
SLIDE 21

E(X) = 1 − p p , σ2(X) = 1 − p p2 P(X = n) = (1 − p)np, n = 0, 1, 2, . . .

Geometric distribution

  • parameter p = chance of success in a trial
  • gives probability of n failures before success
slide-22
SLIDE 22

5 10 15 20 25 0.0 0.2 0.4 0.6 0.8 1.0 x P(X≤x) 5 10 15 20 25 0.0 0.1 0.2 0.3 0.4 0.5 x P(X=x)

Geometric distribution

p=0.5, p=0.3, p=0.1

slide-23
SLIDE 23

Poisson distribution

  • gives probability of n events occurring in a fixed time

interval, when

  • average rate λ is known, and
  • each event is independent of previous ones

P(X = n) = λn n! e−λ, n = 0, 1, 2, . . . E(X) = λ, σ2(X) = λ

slide-24
SLIDE 24

5 10 15 20 25 0.0 0.2 0.4 0.6 0.8 1.0 x P(X≤x) 5 10 15 20 25 0.00 0.05 0.10 0.15 x P(X=x)

Poisson distribution

λ=5, λ=10, λ=15

slide-25
SLIDE 25

¶ Two continuous probability distributions

slide-26
SLIDE 26

It doesn’t make sense to measure probability at a point (sample space is uncountable!) Instead, assign probabilities to intervals:

P(a≤X ≤b) = Z b

a

f(x)dx

f is the probability density function

P(X ≤x) = F(x) = Z x

−∞

f(t)dt

F is the cumulative distribution function

slide-27
SLIDE 27

Gaussian (Normal) distribution

f(x; µ, σ2) = 1 σ √ 2π e

−(x−µ)2 2σ2

E(X) = µ, σ2(X) = σ2

  • parameters μ (mean) and σ2 (variance)
  • produces “bell curve” around μ
slide-28
SLIDE 28
  • 10
  • 5

5 10 0.0 0.2 0.4 0.6 0.8 1.0 x P(X≤x)

Gaussian (Normal) distribution

μ=0; σ2=1, σ2=2, σ2=3

  • 10
  • 5

5 10 0.0 0.1 0.2 0.3 0.4 x p(x)

slide-29
SLIDE 29

Exponential distribution

f(t; µ) = µe−µt, t ≥ 0 E(X) = 1 µ, σ2(X) = 1 µ2 , CX = 1

  • parameter μ = rate
  • gives probability of time t elapsing between successive

independent events

slide-30
SLIDE 30

Exponential distribution (continuous)

μ=0.5, μ=0.2, μ=0.1

5 10 15 20 0.0 0.1 0.2 0.3 0.4 0.5 x p(x) 5 10 15 20 0.0 0.2 0.4 0.6 0.8 1.0 x P(X≤x)

slide-31
SLIDE 31

Important property of the exponential distr. — it is “memoryless”, i.e.,

P(X > t+∆t | X > t) = P(X > ∆t) for all t, ∆t ≥ 0

slide-32
SLIDE 32

e.g., Given exponential bus arrival times: If P(X>20min)=0.3, and you’ve already waited 15 minutes, how likely is it that the bus won’t arrive for another 20 minutes? P(X>35 | X>15) = P(X>20) = 0.3

slide-33
SLIDE 33

Exponential vs. Gaussian arrival times

50 100 150 200 t

Exponential (μ=0.1) Gaussian (μ=10, σ2=2.5)

5 10 15 20 25

slide-34
SLIDE 34

¶ Stochastic processes

slide-35
SLIDE 35

A stochastic process is a collection of random variables {Ft,t ∈T} defined on Ω

  • t is typically a time parameter
  • so Ft may describe how some system behaves over time

period t

slide-36
SLIDE 36

Poisson Process; {Nt, t ≥ 0}

  • Nt = number of arrivals in [0,t]
  • Nt is Poisson distributed with param λt
  • time between arrivals is exponentially distributed with rate 1/λ
  • inherently memoryless
slide-37
SLIDE 37
  • range of Xi = state space (S) of the chain

Markov Chain

  • next state depends only on the current state


(future is independent of past)

  • sequence of r.v.s, X1, X2, X3, … such that:

P(Xt+1 = x | Xt = xt, Xt−1 = xt−1, . . . , X2 = x2, X1 = x1) = P(Xt+1 = x | Xt = xt)

slide-38
SLIDE 38

sunny

(S0)

cloudy

(S1)

rainy

(S2)

0.6 0.3 0.1 0.3 0.5 0.4 0.3 0.3 0.2

e.g., P(Xt+1=sunny | Xt=rainy) P(Xt+2=sunny | Xt=rainy)?

pij = P(Xt+1 = j | Xt = i)

= p20 = 0.3 = = 0.35

p20p00 + p21p10 + p22p20

P =   p00 p01 p02 p10 p11 p12 p20 p21 p22   =   0.6 0.3 0.1 0.2 0.5 0.3 0.3 0.4 0.3  

“transition matrix”

slide-39
SLIDE 39

p(2)

20 =

P × P = P 2 =   0.45 0.37 0.18 0.31 0.43 0.26 0.35 0.41 0.24   p(n)

ij

= P n[i][j] = (P × P)[i][j] p(2)

ij =

X

k∈S

pikpkj

= 0.35

p20p00 + p21p10 + p22p20

slide-40
SLIDE 40

P 2 =   0.45 0.37 0.18 0.31 0.43 0.26 0.35 0.41 0.24   P 3 =   0.398 0.392 0.210 0.350 0.412 0.238 0.364 0.406 0.230   P 5 =   0.374 0.402 0.224 0.369 0.404 0.227 0.370 0.404 0.226   P 4 =   0.380 0.399 0.220 0.364 0.406 0.230 0.369 0.404 0.227   P 6 =   0.372 0.403 0.225 0.370 0.404 0.226 0.371 0.403 0.226   P 7 =   0.371 0.403 0.226 0.371 0.403 0.226 0.371 0.403 0.226  

all rows are equal to the same vector , where

π π = π × P and X

i∈S

πi = 1

converges to a steady-state distribution

lim

k→∞ P k

slide-41
SLIDE 41

sunny

(S0)

cloudy

(S1)

rainy

(S2)

0.6 0.3 0.1 0.3 0.5 0.4 0.3 0.3 0.2

independent of starting state:

sunny cloudy rainy

P(Xt=sunny) = 0.371 i.e., fraction of sunny days ≈ 37%

π = [0.371 0.403 0.226]

slide-42
SLIDE 42

sunny

(S0)

cloudy

(S1)

rainy

(S2)

0.6 0.3 0.1 0.3 0.5 0.4 0.3 0.3 0.2

π = [0.371 0.403 0.226]

Also note that, for every state, rate of flow out = rate of flow in e.g., for S0

rate out = (0.371)(0.1 + 0.3) 


= 0.148 rate in = (0.403)(0.2) + (0.226)(0.3) = 0.148

i.e., the system is in equilibrium

slide-43
SLIDE 43

§ Queueing theory

slide-44
SLIDE 44

queueing system wait queue server arriving customers leaving customers

Basic model:

slide-45
SLIDE 45
  • = T (sojourn / turnaround time)

# = L (total customers)

  • = Tq (wait time)

# = Lq (waiting customers) λ μ (arrival rate) (service rate)

  • = Ts

(service time)

slide-46
SLIDE 46

typically, queue characteristics vary over time…

goal: given distributions for λ, μ, derive the rest!

e.g., distribution of Tq, T distribution of Lq, L distribution of busy periods (i.e., when 
 server is continuously busy)

slide-47
SLIDE 47

P(Lq = 0) P(Lq ≥ x) P(T ≤ t) E(Tq), E(T) E(Lq), E(L)

given distributions, can compute things like: (queue is empty) (x or more in line) (sojourn time threshold) (avg. wait, sojourn time) (avg. queue/system size)

slide-48
SLIDE 48

interested in limiting distribution; i.e., after system reaches equilibrium — over a long period of time, # customers leaving system = # customers entering

slide-49
SLIDE 49

λ μ

require ρ = λ

µ , “intensity” < 1

is the utilization for a stable system

ρ

queue cannot grow unboundedly!

slide-50
SLIDE 50

¶ Little’s Law

slide-51
SLIDE 51

Little’s Law: E(L) = λE(T)

# customers in system = arrival rate sojourn time ×

E(Lq) = λE(Tq)

applied to queue:

ρ = λE(Ts)

applied to server:

slide-52
SLIDE 52

† Little’s Law does not assume anything about arrival/service
 distributions or any other server characteristics! (but
 requires that E(L), E(T), λ be bounded)

slide-53
SLIDE 53

e.g., 35th St. Jimmy John’s: 12 customers arrive per hour, Average time spent in store = 15 minutes. Average # customers in store?

12 hour × 1 hour 60 min × 15 min = 3

slide-54
SLIDE 54

e.g., Customer appreciation day! 100 customers arrive per hour, Average line length = 15 Average wait time?

15 × 1 hour 100 = 0.4 hour = 9 min

slide-55
SLIDE 55

e.g., Packet switching system with 2 inputs: λ1=200 packets/s, λ2=150 packets/s, On average 2,500 packets in system. Mean packet delay?

λ1 λ2

E(T) = E(L) λ1 + λ2 = 2, 500 200 + 150 ≈ 7.1s

slide-56
SLIDE 56

¶ Kendall’s Notation

slide-57
SLIDE 57

A/S/c/k/n/d

A : interarrival time distribution S : service time distribution c : number of servers k : buffer size (default=∞) n : customer population size (default=∞) d : queueing discipline (default=FCFS)

slide-58
SLIDE 58

Arrival/Service distributions:

D : Deterministic M : Markovian (Memoryless) Geom : Geometric G : General (unknown/arbitrary)

slide-59
SLIDE 59

Favorite: Markovian (Exponential)

  • combination of multiple independent distributions ⇒

exponential distribution

  • when distribution is unknown, exp is a fair compromise:

medium variability (CX=1)

  • it really simplifies the math!
slide-60
SLIDE 60

¶ M/M/1 queueing system

slide-61
SLIDE 61

M/M/1 =

  • Poisson arrival process
  • Exponential service times
  • 1 server
  • ∞ buffer length
  • ∞ population
  • FCFS queue discipline
slide-62
SLIDE 62

λ μ

i.e., queueing system above with exponential arrival rate λ,
 exponential service rate μ

slide-63
SLIDE 63

L (# of customers in system) can be used
 to describe the state of the system. λ and μ are rates of flow between each state

1 2 3 ... λ μ λ μ λ μ λ μ

model as a Markov chain:

slide-64
SLIDE 64

1 2 3 ... λ μ λ μ λ μ λ μ

is probability of L=n at time t want the limiting distribution (i.e., at equilibrium):

P(Lt = n) pn = lim

t→∞ P(Lt = n | L0 = i), i = 0, 1, 2, . . .

slide-65
SLIDE 65

1 2 3 ... λ μ λ μ λ μ λ μ

“balance” equations (apply at equilibrium):

λp0 = µp1 (λ + µ)pn = λpn−1 + µpn+1

slide-66
SLIDE 66

X

n=0

pn = 1 λp0 = µp1 (λ + µ)pn = λpn−1 + µpn+1

1 2 3 ... λ μ λ μ λ μ λ μ

together with can derive distribution of L ,

slide-67
SLIDE 67

but we will limit ourselves to mean value analysis

slide-68
SLIDE 68

P(Lq = 0) P(Lq ≥ x) P(T ≤ t) E(Tq), E(T) E(Lq), E(L)

don’t really need the distributions to compute these mean values …

slide-69
SLIDE 69

Big help: PASTA property “Poisson Arrivals See Time Averages” i.e., arriving customers in a Poisson process see,

  • n average, the same number of customers in the


system as predicted by the steady-state average

slide-70
SLIDE 70

E(L) = 5 people in store

  • i.e., to the outside observer, there are 5

people in the store on average

  • given Poisson arrivals, new customers on

average also see 5 people in the store

slide-71
SLIDE 71

not true in general!

consider deterministic system:

  • arrival times = 1, 3, 5, 7, …
  • service time = 1 (constant)
  • E(L) = 1/2

but arriving customers always see 0 in store!

slide-72
SLIDE 72

E(Tq) = E(Lq)E(Ts) + ρE(Tr) E(Tq) − λE(Tq)E(Ts) = ρE(Tr) E(Tq)(1 − λE(Ts)) = ρE(Tr) E(Tq) = ρE(Tr) 1 − λE(Ts) = ρE(Tr) 1 − ρ

Start analysis with mean wait time: E(Tq)

time for waiting customers ahead

  • f me to be served

E(Tq) =

if the server is busy, the residual service time

  • f customer in service

+

= λE(Tq)E(Ts) + ρE(Tr)

(by Little’s Law) Pollaczek-Khinchin formula

slide-73
SLIDE 73

E(Tr)? consider deterministic case:

  • if mean service time = 1 min, and we arrive


to find server occupied, E(Tr) = ?

  • Ans: 30 sec (E(Ts)/2)
slide-74
SLIDE 74

E(Tr)? what about Poisson arrival process?

  • by PASTA, new arrivals sees average!
  • i.e., E(Tr) = E(Ts)
slide-75
SLIDE 75

M/M/1 mean value formulae:

E(Tr) = E(Ts) = 1 µ E(Tq) = ρE(Tr) 1 − ρ = ρ µ(1 − ρ) E(T) = E(Tq) + E(Ts) = ρ µ(1 − ρ) + 1 µ = 1 µ(1 − ρ) E(L) = λE(T) = λ µ(1 − ρ) = ρ 1 − ρ

slide-76
SLIDE 76

e.g., Suppose a network server receives 40 requests per second, and the average service time is 20ms. Assuming requests are exponentially distributed: 1.What is the average server utilization? 2.What is the average time spent in the server’s queue? 3.What is the average turnaround time for a request?

E(L) = λE(T)

Little’s Law: Mean wait time:

E(Tq) = ρ µ(1 − ρ)

slide-77
SLIDE 77

λ = 40/s, E(Ts) = 20ms = 0.02s

Given:

E(Tq) = 0.02 × 0.8 1 − 0.8 = 0.08s = 80ms

Mean wait time:

E(T) = E(Tq) + E(Ts) = 80ms + 20ms = 100ms

Mean sojourn time:

ρ, E(Tq), E(T)

Find:

ρ = λE(Ts) = 40 × 0.02 = 0.8

Utilization:

slide-78
SLIDE 78

e.g., Suppose we upgrade the server and lower mean service time from 20ms to

  • 15ms. By how much does this improve turnaround time? (Arrival rate still = 40/s)

ρ = 40 × 0.015 = 0.6 E(T) = 15ms 1 − 0.6 = 37.5ms 100 − 37.5 100 = 62.5% improvement! 20 − 15 20 = 25% decrease in service time

slide-79
SLIDE 79

e.g., A new cafeteria has just opened on campus, and is set up to service, on average, 2 students/minute. Students are only starting to trickle in, but the manager has already decided that when the average time needed for them to get their food approaches 5 minutes, capacity will be increased. Assuming a M/M/1 system:

  • 1. What would the mean arrival rate need to be for the manager to increase capacity?
  • 2. How many students would be waiting for service at this point?

E(T) = 1 µ(1 − ρ)

E(L) = λE(T)

slide-80
SLIDE 80

Given: Find: λ, E(Lq) µ = 2/min, E(T) → 5min

5 = 1 µ − λ ⇒ λ = µ − 1 5 E(T) = 1 µ − λ = 1.8/min E(Tq) = E(T) − E(Ts) = 5 − 1 2 = 4.5 E(Lq) = λE(Tq) = 1.8 × 4.5 = 8.1

slide-81
SLIDE 81

e.g., Potbelly's is getting ready to open a new store at the MTCC, and is expecting approximately 8 students to arrive per minute during the lunch rush. If they want to guarantee that no more than 10 students, on average, are waiting in line to get serviced, how quickly must they be able to take and complete orders?

E(L) = λE(T)

Little’s Law: Mean wait time:

E(Tq) = ρ µ(1 − ρ)

slide-82
SLIDE 82

Given: λ = 8

E(Lq) ≤ 10

, want Find:

µ 1.25 = λ µ2(1 − ρ) = λ µ2 − µλ µ2 − 8µ − 6.4 = 0 E(Tq) = E(Lq) λ = 10 8 = 1.25 = ρ µ(1 − ρ)

slide-83
SLIDE 83

¶ M/G/1 queueing system

slide-84
SLIDE 84

Arbitrary (General) service distribution, but:

  • Can assume stable system (ρ<1)
  • Little’s Law still applies
  • Still have PASTA!
slide-85
SLIDE 85

E(Tq) = ρE(Tr) 1 − ρ

E(Tr) depends on mean and variance of service times

for exponential, C2

Ts = 1, so E(Tr) = 1 + 1

2 · E(Ts) = E(Ts) for deterministic, C2

Ts = 0, so E(Tr) = 0 + 1

2 · E(Ts) = E(Ts) 2

Intuition: larger variance means that residual time is a bigger fraction of the mean E(Tr) = σ2(Ts) + E(Ts)2 2E(Ts) = C2

Ts + 1

2 · E(Ts)

slide-86
SLIDE 86

e.g., A print shop has 4 clients, each of which sends in a job every half hour on average, distributed exponentially. It takes an average of 6 minutes to print each job (there is one printer), and the service distribution can be described with C2=1.5. 1.How many jobs are, on average, waiting? 2.What is the average job turnaround time?

slide-87
SLIDE 87

λ = 4 × 2/hour = 8/hour E(Ts) = 6 min = 0.1 hour E(Tq) = ρ 1 − ρ · C2

Ts + 1

2 · E(Ts) E(Lq) = λE(Tq) = 8 × 0.5 = 4 E(T) = E(Tq) + E(Ts) = 0.6 hour = 36 min = 0.8 0.2 × 2.5 2 × 0.1 = 0.5 hour C2

Ts = 1.5

Given:

ρ = 8 × 0.1 = 0.8 E(Lq), E(T)

Find: