Queuing Theory - Tripod.compsdin.tripod.com/commnet/queue.pdf · Queuing Theory • Standard...

28
Queuing Theory Little’s Theorem: N T λ = departure rate = arrival rate = System λ λ ⎯⎯⎯⎯⎯→ ⎯⎯⎯⎯⎯⎯→ Holds for any (ergodic) system with a steady state Def. () t α = the number of arrivals at the system in the interval from time 0 to time t. = number of arrivals in [0, t] () t β = the number of customer departures in the interval from time 0 to time t. = number of departure in [0, t] () Nt = Number of customers in the system at time t = () () t t α β N = average (steady-state, long run, expected) number of customers in system (waiting for service or receiving service) in equilibrium = ( ) 0 lim t t N t dt t →∞ [customers λ = average (long run) arrival rate of customers = [ ] ( ) number of arrivals in 0,t lim lim t t t t t α →∞ →∞ = T = average time in system of customers in equilibrium = () () () 1 1 lim t j t j T t α α α →∞ = System = system: N T λ = System = queue: q N W λ = System = server: s N EX λ λ µ = = Because, by definition, T W EX = + , we have q s N N N = + . Let τ = interarrival times τ i = the time between the arrival of the i-1 and the i th customer Assume that all τ i ’s are i.i.d., and thus have the same [ ] i E E τ τ = . λ = long-term arrival rate at the system = 1 E τ customers second

Transcript of Queuing Theory - Tripod.compsdin.tripod.com/commnet/queue.pdf · Queuing Theory • Standard...

Page 1: Queuing Theory - Tripod.compsdin.tripod.com/commnet/queue.pdf · Queuing Theory • Standard queuing theory nomenclature Interarrival time Service times M = exponential M = exponential

Queuing Theory Little’s Theorem: N Tλ=

departure rate = arrival rate = System λλ⎯⎯⎯⎯⎯→ ⎯⎯⎯⎯⎯⎯→

• Holds for any (ergodic) system with a steady state • Def.

( )tα = the number of arrivals at the system in the interval from time 0 to time t.

= number of arrivals in [0, t] ( )tβ = the number of customer departures in the interval from time 0 to time t.

= number of departure in [0, t] ( )N t = Number of customers in the system at time t

= ( ) ( )t tα β−

N = average (steady-state, long run, expected) number of customers in system (waiting for service or receiving service) in equilibrium

= ( )

0lim

t

t

N t dt

t→∞

′ ′∫ [customers

λ = average (long run) arrival rate of customers

= [ ] ( )number of arrivals in 0,tlim limt t

tt t

α→∞ →∞

=

T = average time in system of customers in equilibrium

= ( ) ( )

( )

1

1limt

jt jT

t

α

α α→∞=

⎧ ⎫⎪ ⎪⎨ ⎬⎪ ⎪⎩ ⎭

• System = system: N Tλ= System = queue: qN Wλ=

System = server: sN EX λλµ

= =

Because, by definition, T W EX= + , we have q sN N N= + .

• Let τ = interarrival times τi = the time between the arrival of the i-1 and the ith customer

Assume that all τi’s are i.i.d., and thus have the same [ ]iE Eτ τ= .

λ = long-term arrival rate at the system = 1Eτ

customerssecond

⎡ ⎤⎢ ⎥⎣ ⎦

Page 2: Queuing Theory - Tripod.compsdin.tripod.com/commnet/queue.pdf · Queuing Theory • Standard queuing theory nomenclature Interarrival time Service times M = exponential M = exponential

0 0

1 1limlim

n nni

i ni i

nE

n

λτ ττ

→∞

→∞= =

= = =

∑ ∑

• T = Average time each customer spent in the system Ti = Time the ith customer spent in the system = the time that elapses between the instant when

( )tα goes from i-1 to i

to the instant when ( )tβ goes from i-1 to i.

[customers]

Arrival of ith customer

Ti

α(s)

β(s)

t s

1

2

i

N(s)

• Let t = a time instant where ( ) ( )t tα β= , which implies N(t) = 0.

The area between ( )tα and ( )tβ from 0 to t:

1) horizontally, area ( )

1

t

jj

=

= ∑

Note if define di = departure time, ai = arrival time of the ith customer Then i i iT d a= − .

Note that ( )

( )( ) ( ) ( )

1 1 1 1

t t t t

j j j j jj j j j

T d a d aα α α α

= = = =

= − = −∑ ∑ ∑ ∑ ; so, order doesn’t matter.

2) vertically, area ( ) ( ) ( )( )0 0

t t

N s ds s s dsα β= = −∫ ∫

Hence, we have ( )( )

10

t t

jj

N s ds Tα

=

= ∑∫ .

Thus, ( )( )

( )( )

( ) ( )( )

( )

10

1 1

1 1lim lim

lim lim lim

tt

jt t j

t tj j

t t tj j

N N s d Tt t

T Tt tT

t t t t

α

α αα αλ

α α

→∞ →∞=

→∞ →∞ →∞= =

= =

⎛ ⎞⎛ ⎞= = =⎜ ⎟⎜ ⎟⎜ ⎟⎝ ⎠⎝ ⎠

∑∫

∑ ∑

Page 3: Queuing Theory - Tripod.compsdin.tripod.com/commnet/queue.pdf · Queuing Theory • Standard queuing theory nomenclature Interarrival time Service times M = exponential M = exponential

Queuing Theory • Standard queuing theory nomenclature

Service times Interarrival time M = exponentialM = exponential D = deterministicD = deterministic G = generalG = general 11 Service rate: =Arrival rate: = EE

Arrival process / Service timeX

X

τ

µλτ

1 server customers servers unspecified if unlimited

/ Servers / Max occupancyKc

• 1st letter ⇒ nature of the arrival process • M = Poisson process (Markov, memoryless) ⇒ exponentially distributed

interarrival times. • G = general distribution of interarrival times • D = deterministic interarrival times

• 2nd letter ⇒ nature of the probability distribution of the service times. • M = exponential • G = general • D = deterministic

• 3rd letter ⇒ number of servers • Successive interarrival times and service times are assumed to be statistically

independent of each other. • Def:

pn = Steady state probability of having n customers in the system, n = 0, 1, …

N = Average number of customers in the system = 0

nn

np∞

=∑

T = Average customer time in the system Nq = Average number of customers waiting in queue.

If there are m server, then ( )1

q nn m

N n m p∞

= +

= −∑

W = Average customer waiting time in queue Ns(t) = the number of customers that are being served at time t, and let X denote the service time. Ns = the average number of busy servers for a system in steady state X = service time, a random variable.

h = EX = 1µ

= average service time.

• Utilization factor:

• Single server: ρ = proportion of time the server is busy = 1 01 sp p Nλµ

= − = = .

Page 4: Queuing Theory - Tripod.compsdin.tripod.com/commnet/queue.pdf · Queuing Theory • Standard queuing theory nomenclature Interarrival time Service times M = exponential M = exponential

Proof. For single-server systems, (1) system has ≥ 1 customers ≡ server is busy; hence, 0,server 0,system 0:p p p= = . Also, 1,server 1,system 1 0: 1p p p p= = = − . (2) Ns(t) can only be 0 or 1, so Ns represents the proportion of time that the server is busy ( )1,serverp . 0,server 1,server 1,server 00 1 1sN p p p p= + = = − . (3) From

Little’s theorem, sN EXλ= . Hence, 01 sp N EXλ− = = . Note that

01 p− is the proportion of time that the server is busy. For this reason, the

utilization of a single-server system is defined by EX λρ λµ

= = .

• Similarly, define utilization of a m-server system by EXm m

λ λρµ

= = .

• For finite-capacity systems, it is necessary to distinguish between the traffic load offered to a system and the actual load carried by the system • The offered load or traffic intensity is a measure of the demand made on the

system

= Xλ • The carried load is the actual demand met by the system

( )1 bP Xλ= −

Occupancy Distribution upon Arrival • Probabilistic characterization of a queuing system as seen by an arriving customer. • Unconditional steady-state probabilities

( ){ }limn tp P N t n

→∞= =

• Steady-state occupancy probabilities upon arrival

( ){ }lim an arrival occured just after time tn ta P N t n

→∞= =

• pn = an , n = 0, 1, … for queuing systems regardless of the distribution of the service times if either • the arrival process is Poisson and interarrival times and service times are

independent. • future arrivals are independent of the current number in the system.

⇒ for every time t and increment δ > 0, the number of arrivals in the interval (t,t+δ) is independent of the number in the system at time t.

Page 5: Queuing Theory - Tripod.compsdin.tripod.com/commnet/queue.pdf · Queuing Theory • Standard queuing theory nomenclature Interarrival time Service times M = exponential M = exponential

• the arrival process is Poisson and, at any time, the service times of previously arrived customers and the future interarrival times are independent.

Let ( ),A t t δ+ be the event that an arrival occurs in the interval ( ),t t δ+

( ) ( )Prnp t N t n= =⎡ ⎤⎣ ⎦ . ( )( )limn ntp p t

→∞⇒ = .

Then,

( ) ( ){ }( ) ( ){ }

0

an arrival occured just after time t

lim ,

na t P N t n

P N t n A t tδ

δ→

= =

= = +

If the event ( ),A t t δ+ is independent of ( )N t , then

( ) ( ){ } ( ){ } ( )0

limn na t P N t n P N t n p tδ →

= = = = =

Taking the limit as t → ∞, from the definition of an and pn, we obtain an = pn. • Ex. non-Poisson arrival process.

Suppose interarrival times are independent and uniformly distributed between [a,b] ; a < b. Customer service times are all equal to c < a sec. • Then, an arriving customer always finds an empty system (N = 0) . • On the other hand, the average number in the system as seen by an outside

observer looking at a system at random time is N = λT where 1 1 2

2a bE a b

λτ

= = =+ +

and T = c.

Thus, 2cN Ta b

λ= =+

.

• Ex. service times and future arrival times are correlated. Packet arrival is Poisson process. Transmission time of the nth packet equals one half the interarrival time between packets n and n+1 • Upon arrival, a packet finds the system empty. • On the other hand, the average number in the system as seen by an outside

observer looking at a system at random time is 1 1

2 2N T τλ

τ⎛ ⎞= = =⎜ ⎟⎝ ⎠

Occupancy Distribution upon Departure • The distribution of customers in the system just after a departure has occurred.

• ( ) ( ){ }a departure occured just before time tnd t P N t n= =

Page 6: Queuing Theory - Tripod.compsdin.tripod.com/commnet/queue.pdf · Queuing Theory • Standard queuing theory nomenclature Interarrival time Service times M = exponential M = exponential

• steady-state values ( )limn ntd d t

→∞= , n = 0, 1, …

• dn = an, n = 0, 1, … if • the system reaches a steady-state with all n having positive steady-state

probabilities. and • N(t) changes in unit increments.

For any sample path of the system and for every n, the number in the system will be n infinitely often (with probability 1).

⇒ For each time the number in the system increases from n to n+1 due to an arrival,

there will be a corresponding future decrease from n+1 to n due to a departure.

⇒ In the long run,

the frequency of transitions from n to n+1 out of transitions from any k to k+1 equals the frequency of transitions from n+1 to n out of transitions from any k+1 to k,

which implies that dn = an.

M/G/1 • “G” ≡ general (really, GI ≡ general independent)

Service times are i.i.d. Pr[service time ≤ t] = H(t) ≡ cdf of the service time; don’t have to be continuous

Mean service time ( )0

h tdH t∞

= ∫

1hρ λ= < which assumes stability.

M/G/1 analysis based on Pollazek-Khinchin theory • Polla(c)zek-Khinchin theory

• ( ) knkN z Ez=

• ( ) ( )*

0

sth s e dH t∞

−= ∫

• ( ) ( )( )* 1R z h zλ= −

Page 7: Queuing Theory - Tripod.compsdin.tripod.com/commnet/queue.pdf · Queuing Theory • Standard queuing theory nomenclature Interarrival time Service times M = exponential M = exponential

( ) ( )( ) ( )( )

1 1z R zN z

z R zρ− −

=−

• ( ) ( )0

1m

N mP n m N∞

=

′= = =∑ ( )2 2

2 1hλρρ

= +−

( )2

2 1hT h λρ

= +−

( )2

2 1qhW T h λρ

= − =−

( )2 2

2 1qhN λρ

=−

• Distribution of N

( ) ( )0

1 0

0!

mz

mdP n m N z

dz mm

ρ

=

− =⎧⎪⎪= = ⎨⎪ >⎪⎩

• ( ){ }N t is no longer Markov in non-expo service time case. However, can embed a discrete-time Markov chain at the departure instants

• Define nk = number of customers in system right after (upon) departure of customer k (so, not including customer k itself.) sk = service time of customer k.

Assume the sk are i.i.d. with common cdf ( ) ( ) ( )s kH t F t P s t= = ≤

Let ( )0

h tdH t∞

= ∫ be the mean service time.

rk = number of new customers arriving during service time of customer k

• 1 1

1

1 ; 0; 0

k k kk

k k

n r nn

r n− −

+ − >⎧= ⎨ =⎩

Proof • For nk-1 > 0, after the (k-1)th customer leave, there are nk-1 customer in the system

(the kth customer is included here also.) The first one which will be served right away is the kth customer. While the kth customer is served, rk customers arrive. Thus when the kth customer leave, we have nk-1+rk-1 customers left in the system. (the -1 comes from the kth customer leaving)

• For nk-1 = 0, after the (k-1)th customer leave, there are no customer in the system. After a while (exponentially distributed random duration), the kth customer

Page 8: Queuing Theory - Tripod.compsdin.tripod.com/commnet/queue.pdf · Queuing Theory • Standard queuing theory nomenclature Interarrival time Service times M = exponential M = exponential

arrives. While the kth customer is served, rk additional customers arrive. Thus when the kth customer leave, we have 1+rk-1 = rk customers left in the system. (The +1 and -1 is from customer k arriving and leaving.)

Another way to think about this: for the first case, nk-1 already includes the kth customer so it has to subtract 1 out when the kth customer leave.

• Generating function: ( ) kn

kN z Ez=

( ) ( ) ; not a function of krkR z Ez R z k= = because sk are i.i.d.

• Laplace-Stieltjes transform of service distribution:

( ) ( )*

0

sth s e dH t∞

−= ∫

• Let r be a generic rk, then

( ) ( ) ( ) ( )

( ) ( ) ( ) ( )

0 0 0

0 00 0! !

kr r n n

n n

n nt tn

n n

R z Ez Ez P r n z P r n s t dH t z

t e tz edH t z dH t

n n

λ λλ λ

∞∞ ∞

= =

− −∞ ∞∞ ∞

= =

⎛ ⎞= = = = = = =⎜ ⎟

⎝ ⎠

= =

∑ ∑ ∫

∑ ∑∫ ∫

Interchange the sum and the integral, then we have

( ) ( ) ( ) ( ) ( ) ( )

( )( ) ( ) ( )( )

1

00 0 0

1 *

0

!

1

nt zt t tz

n

z t

tzR z e dH t e e dH t e dH t

n

e dH t h z

λλ λ λ

λ

λ

λ

∞ ∞ ∞∞− −− −

=

∞− −

= = =

= = −

∑∫ ∫ ∫

So, ( ) ( )( )* 1krR z Ez h zλ= = − .

Note: require Poisson to prove ( ) ( )( )* 1R z h zλ= −

• Quantity of principal interest is ( ) ( )zNzNkk=

∞→lim (Will show later that ( )1N N′ = )

Recall that 1 1

1

1 ; 0; 0

k k kk

k k

n r nn

r n− −

+ − >⎧= ⎨ =⎩

; hence,

( ) ( ) ( ) ( ) ( )( ) ( ) ( )1

1 1 1 1

11 1 1

0 0 0 0

0 0 0

k k k

k k k

n n nk k k k k

r n rk k k

N z Ez P n E z n P n E z n

P n Ez P n E z n−

− − − −

+ −− − −

= = = = + > >

= = + > >

We already have ( ) ( )( )* 1krEz R z h zλ= = − . So, consider ( )1 11 0k kn r

kE z n− + −− > =

( )11

1 0k kn rkE z n

z− +

− > . Now, because nk-1 and rk are independent,

Page 9: Queuing Theory - Tripod.compsdin.tripod.com/commnet/queue.pdf · Queuing Theory • Standard queuing theory nomenclature Interarrival time Service times M = exponential M = exponential

( ) ( ) ( )( ) ( )

( ) ( )

1 1

1

1

11 1 1

1

1

10 0 0

1 0

1 0

k k k k

k k

k

n r n rk k k

n rk

nk

E z n E z n E z nz

E z n E zz

E z n R zz

− −

+ −− − −

> = > >

= >

= >

( ) ( ) ( ) ( )

( )

1 11 11 1 1 1

1

0 0 0 0

0

k k k kn r n rk k k k

k

P n E z n P n E z n

P n

− −+ − + −− − − −

> > = > >

= >( )( )

1

1

10

k

k

P n nz P n

=

>( )

( ) ( )

( ) ( ) ( )

( ) ( )( ) ( )

1

11

01 1

0

1 1

1

1 0

1 0

n

n

nk

n

nk k

n

k k

z R z

P n n z R zz

P n n z P n z R zz

N z P n R zz

=

−=

− −=

− −

⎛ ⎞⎜ ⎟⎜ ⎟⎝ ⎠

⎛ ⎞= =⎜ ⎟⎝ ⎠⎛ ⎞= = − =⎜ ⎟⎝ ⎠

= − =

Thus ( ) ( ) ( ) ( ) ( )( ) ( )zRnPzNz

zRnPzN kkkk 010 111 =−+== −−−

• As k →∞ with ρ < 1, we get • Nk(z) and Nk-1(z) → N(z) and • ( )1 00kP n p− = → .

We already know that, for a single server, 01 pρ = − .

Thus, we have

( ) ( ) ( ) ( ) ( )( ) ( )

( ) ( ) ( ) ( ) ( ) ( ) ( )

( ) ( )( ) ( )( )

11 1

1 1

1 1

N z R z N z R zz

zN z z R z N z R z R z

z R zN z

z R z

ρ ρ

ρ ρ

ρ

= − + − −

= − + − −

− −=

• To find N,

Page 10: Queuing Theory - Tripod.compsdin.tripod.com/commnet/queue.pdf · Queuing Theory • Standard queuing theory nomenclature Interarrival time Service times M = exponential M = exponential

( )

( ) ( )

( ) ( ) ( )

( ) ( )

0

0

1

0

01

m

n m

m

m

m

m

N mP n m

N z Ez P n m z

d N z N z mP n m zdz

N mP n m N

=

=

∞−

=

=

= =

= = =

′= = =

′ = = =

• May be easier to use a Taylor series approach and expand around z = 1. Introduce u = z-1, so we can expand around u = 0.

• Let

( ) ( ) ( )( ) ( ) ( )* *1

0

1 utz u

b u R z h z h u e dH tλλ λ∞

= += = − = − = ∫ , and

( ) ( ) ( ) ( )( )1

11z u

ub uG u N z

u b uρ

= +

−≡ =

+ −.

• By Taylor’s Theorem:

( ) ( ) ( ) ( ) ( )2 200 0

2b

b u b b u u o u′′

′= + + + as u → 0.

Note that ( ) ( ) ( )00

0 0

0 1tb b e dH t dH tλ∞ ∞

= = = =∫ ∫ . Also, ( ) ( )0

utb u te dH tλλ∞

′ = ∫ . Hence,

( ) ( ) ( )01

0 0

0 tb b te dH t tdH t hλλ λ λ ρ∞ ∞

′= = = = =∫ ∫ . The second derivative

( ) ( )2 2

0

utb u t e dH tλλ∞

′′ = ∫ . Therefore, ( ) ( ) ( )2 2 0 2 2 2 2

0 0

0 tb t e dH t t dH t hλλ λ λ∞ ∞

′′ = = =∫ ∫ ,

and ( ) 2 2

2

02 2

b hb λ′′= = .

• ( )

2 2

2 1hN λρρ

= +−

Page 11: Queuing Theory - Tripod.compsdin.tripod.com/commnet/queue.pdf · Queuing Theory • Standard queuing theory nomenclature Interarrival time Service times M = exponential M = exponential

Proof. ( )G u ( ) ( )( )

( ) ( )( )

( )

2 20 1 2

1 11 1

1

ub u ub uu b u u b b u b u o u

u

ρ ρ

ρ

− −= =

+ − + − − − +

−=

( )b u

u1

1 1+ − 1b u− 22b u− 2o u− ( )

( ) ( )( ) ( )1 2

11

b ub b u o u

ρ−=

− − −

( )( )21

1

1 11 1

1

b u bb u o ub

ρ−=

− − +−

Now, note that as x → 0, ( ) ( )1 1

1x o x

x o x= + +

− +.

Pf. First, note that ( )1 11

x o xx= + +

−. We will show that if

( ) ( ) ( )1 g x o xf x

= + , then ( ) ( ) ( ) ( )1 g x o x

f x o x= +

+.

Start with ( ) ( ) ( )1 g x o x

f x= + , we have

( )( )

0

1lim 0x

g xxf x x→

⎛ ⎞− =⎜ ⎟⎜ ⎟

⎝ ⎠.

Now, ( ) ( ) ( )

( ) ( )20 0

1 1 1lim limx x

g xx f x o x xf x o x→ →

⎛ ⎞− =⎜ ⎟⎜ ⎟+ +⎝ ⎠

( )

0

0

g xx

⎛ ⎞⎜ ⎟⎜ ⎟−⎜ ⎟⎜ ⎟⎝ ⎠

=

.

Hence, ( ) ( )( ) ( )

( )

21

1 1

21

1 1

1 1 11 1

1 11 1

bG u b u o u u o ub b

bb u o ub b

ρ

ρ

⎛ ⎞−= + + + +⎜ ⎟− −⎝ ⎠

⎛ ⎞⎛ ⎞−= + + +⎜ ⎟⎜ ⎟⎜ ⎟− −⎝ ⎠⎝ ⎠

From ( )0 0r′ = for continuous ( ) ( )r x o x= as x → 0, we then have

( ) ( ) 21

0 1 1

101 1u

d bG G u bdu b b

ρ

=

⎛ ⎞−′ = = +⎜ ⎟− −⎝ ⎠

Thus, ( ) ( ) 21

1 1

11 01 1

bN G bb bρ ⎛ ⎞−′ ′= = +⎜ ⎟− −⎝ ⎠

.

We finally have

Page 12: Queuing Theory - Tripod.compsdin.tripod.com/commnet/queue.pdf · Queuing Theory • Standard queuing theory nomenclature Interarrival time Service times M = exponential M = exponential

( ) 21

1 1

1 111 1 1

bN N bb bρ ρ

ρ⎛ ⎞− −′= = + =⎜ ⎟− − −⎝ ⎠ ( )

2 2

2 22

1 2 1

hh

λλρ ρ

ρ ρ

⎛ ⎞⎜ ⎟⎜ ⎟+ = +

− −⎜ ⎟⎜ ⎟⎝ ⎠

.

• ( )

2 2

2 1qhN N λρρ

= − =−

• ( )( )

2 2

22 12 1

hN hT h

λρρ λ

λ λ ρ

+−

= = = +−

• ( )

2

2 1qhW T h λρ

= − =−

• ( ) ( )0

1 0

0!

m

mz

m

dP n m N zdz

mm

ρ

=

− =⎧⎪⎪= = ⎨⎪ >⎪⎩

Proof. ( ) ( ) ( ) ( ) ( )1 2

00 1 2m

mN z P n m z P n P n z P n z

=

= = = = + = + = +∑ …

( ) ( ) ( )( ) ( )( )

1 0 1 00 0 1

0 0R

P n NR

ρρ

− −= = = = −

( ) ( ) ( ) ( )1

11 2m

mN z mP n m z P n P n z

∞−

=

′ = = = = + = +∑ …

( ) ( )0 1N P n′ = = .

Hence, ( ) ( )0

1 0

0!

m

mz

m

dP n m N zdz

mm

ρ

=

− =⎧⎪⎪= = ⎨⎪ >⎪⎩

• Distribution of waiting time.

( )( ) ( )( )( )( )

**

1 11

1z

w zz h z

ρλ

λ− −

− =− −

( )( )( )

*

*

1

1 1w s

h ss

ρλ

−=

− −

Page 13: Queuing Theory - Tripod.compsdin.tripod.com/commnet/queue.pdf · Queuing Theory • Standard queuing theory nomenclature Interarrival time Service times M = exponential M = exponential

Observe that, in the steady-state, the random variable n that represents the system population at the point of departure of a customer may also be thought of as the arrivals during the total system time (sojourn time) of that customer. Said sojourn time is the sum of the waiting random variable, w, and the service random variable, s. The same sort of reasoning that gave us ( ) ( )( )* 1R z h zλ= − can be applied to give us the moment generating function of the number of arrivals during w + s as ( ) ( )( )* 1N z f zλ= −

where *f is the Laplace transform of the distribution of w + s

during s → r, R

during w + s → n, N

Since w and s are independent, the pdf of w + s is the convolution of the pdf of w and pdf of s. This implies that the Laplace transform is the multiplication:

( ) ( ) ( )* * *f s w s h s=

( ) ( )( ) ( )( ) ( )( )* * *1 1 1N z f z w z h zλ λ λ= − = − − .

where *w is the L-S transform of the distribution of w.

( )( ) ( )( )( )

( )( ) ( )( )

( )( )

( )( ) ( )( )*

** *

1 1 11 1

11 1

z h zz R zN z z R z

w zh z h z

ρ λρ

λλ λ

− − −− −−

− = = =− −

( )( )( )( )

*

*

1

1

z h z

h z

λ

λ

− −

( )( )( )( )*

1 11z

z h zρλ

− −=

− −

Let ( )1s zλ= −

( )( )

( ) ( ) ( )( )*

* **

11 1

1 1 11

s

w ss h s h sh s

s s s

ρρ ρλ

λ λ λλ

⎛ ⎞− −⎜ ⎟ − −⎝ ⎠= = =⎛ ⎞ − + + − −− −⎜ ⎟⎝ ⎠

• We did explicitly use the fact that the number of arrivals during a service of length s is Poisson with parameter λs. Our justification for equating the statistics just after a departure instant in equilibrium to those at a randomly chosen instant in equilibrium also depended on the Poisson nature of the arrivals. (need dn = an = pn).

• Average length of an idle period = 1λ

Proof. Since an idle period occurs when the system is waiting for a customer to arrive after the queue becomes empty. At the moment that server becomes

Page 14: Queuing Theory - Tripod.compsdin.tripod.com/commnet/queue.pdf · Queuing Theory • Standard queuing theory nomenclature Interarrival time Service times M = exponential M = exponential

empty, by memoryless property, have to wait ( )λE with average 1λ

for the

next customer to arrive, independent of how long it has already been from the moment when the last customer arrived.

• Average length of busy period = 1µ λ−

.

Proof. Let B = average length of buy period. We have shown that average length of

an idle period is 1λ

. Note that the busy period and idle period are alternating

sequence. Hence,

( )

,1

,1

, , , ,1 1 1

limlim 1

lim lim

n

n busy ii

busy ini

n n nn

idle i busy i idle i busy ii i i

n n

Bn

B

n n

ττ

ρτ τ τ τ

λ

=

→∞=

→∞

= = =

→∞ →∞

= = =++

+

∑∑

∑ ∑ ∑.

Solving for B, we get ( )

11 1

hB ρλ ρ ρ µ λ

= = =− − −

.

• Avergae number of customers served in a busy period = 11 ρ−

Idea. Bh

= .

M/G/1 analysis based on the concept of the mean residual service time • Ri = Residual service time seen by the ith customer.

By this we mean that if customer j is already being served when i arrives, Ri is the remaining time until customer j’s service time is complete. If no customer is in service (i.e., the system is empty when i arrives), the Ri = 0.

• R = mean residual time = lim iiER

→∞

• R = mean residual service time given that one is arrived when the server is busy

By renewal theory: 21

2XRX

=

• Note: If M/M/1, service time is exponentially distributed, and thus memoryless. Therefore, given that the service time does not end there, what’s left is also

exponentially distributed with the same mean. So, 1Rµ

= .

Page 15: Queuing Theory - Tripod.compsdin.tripod.com/commnet/queue.pdf · Queuing Theory • Standard queuing theory nomenclature Interarrival time Service times M = exponential M = exponential

Using the above equation gives the same result:

2

21 1

1 112

R µ µµ

µ

⎛ ⎞+ ⎜ ⎟⎝ ⎠= = .

• 212

R Xλ=

Proof. We know that the probability of server being busy for single server is 1p EXλ ρ= = . Hence,

22

0 11 102 2

XR Rp p R XX

ρ ρ λ= + = = =

Proof. (Graphical argument)

t Xi

Xi

Residual Service time

r(τ) = the remaining time for completion of the customer in service at time τ When a new service of duration X begins, r(τ) starts at X and decays linearly for X time units.

( )( )

2

10

12

t M t

ii

r d Xτ τ=

= ∑∫

M(t) = number of triangles in [0,t] = number of service completions in [0,t]

( ) ( )( )

( ) ( )( )

( )2 2

1 10

2

1 1 1lim lim lim lim2 2

12

t M t M ti i

t t t ti i

M t M tX XR r dt t M t t M t

X

τ τ

λ

→∞ →∞ →∞ →∞= =

⎛ ⎞⎛ ⎞= = = ⎜ ⎟⎜ ⎟⎜ ⎟⎝ ⎠⎝ ⎠

=

∑ ∑∫

• ( )

2

2 1XW λρ

=−

Proof. Note that the time waiting in the queue of the ith customer = residual service time seen by the ith customer + time used to service all customers already in the queue.

Page 16: Queuing Theory - Tripod.compsdin.tripod.com/commnet/queue.pdf · Queuing Theory • Standard queuing theory nomenclature Interarrival time Service times M = exponential M = exponential

1 1qW R N R W R Wλ ρ

µ µ= + = + = + .

( )

22

12

1 1 2 1

XR XWλ λ

ρ ρ ρ= = =

− − −.

• The average customer in queue qN and the mean residual time R as seen by an arriving customer are also equal to the average number in queue and mean residual time seen by an outside observer at a random time. This is due to the Poisson character of the arrival process, which implies that the occupancy distribution upon arrival is typical.

• M/G/1 is a renewal process when busy M/G/1 has occasional (with probability 1-ρ of occurrence) ( )λE random variable inserted into service time renewal process.

• M/G/1 queue can have ρ < 1 but infinite W if the second moment 2X →∞ • The formula is valid for any order of servicing customers as long as the order is

determined independently of the required service time To see this, suppose the ith and jth customers are both in the queue and that they exchange places. The expected queuing time of customer i will then be exchanged with that for customer j, but the average, over all customers, is unchanged. Since any service order can be considered as a sequence of reversals in queue position, the P-K formula remains valid.

M/G/1 with vacations • At the end of each busy period, the server goes on “vacation” for some random

interval of time. A new arrival to an idle system, rather than going into service immediately, waits for the end of the vacation period. If the system is still idle at the completion of a vacation, a new vacation starts immediately.

• Let Vi’s be the durations of the successive vacations taken by the server. Assume Vi’s are i.i.d. random variables and independent of the customer interarrival times and service times.

• 21

2XRX

= = mean residual time given that arrive when the server is serving someone

212

VV

= mean residual time given that arrive when the server is on vacation (idle)

Page 17: Queuing Theory - Tripod.compsdin.tripod.com/commnet/queue.pdf · Queuing Theory • Standard queuing theory nomenclature Interarrival time Service times M = exponential M = exponential

{ } { }

( ) ( )

2 2

2 2 22

1 1server busy server idle2 2

1 1 1 11 12 2 2 2

X VR P PX VX V VXX V V

ρ ρ λ ρ

= +

= + − = + −

• ( )

2 211 2 1 2

R X VWV

λρ ρ

= = +− −

• ( )

2 2 2

w/ vacation w/o vacation 1 1

2 1 2 2X V VW W

V Vλ

ρ= + = +

M/M/1

• 0 1: 1serversp N pλρ

µ= = − = =

( )1nnp ρ ρ= − ; 0,1,n = …

1N ρ λ

ρ µ λ= =

− −

1Tµ λ

=−

W ρµ λ

=−

2

1qN ρρ

=−

• Transient if ρ > 1; Null recurrence if ρ = 1; Ergodic if ρ < 1 • 01 pρ = − = utilization factor = the long-term proportion of time the server is busy

Proof. (1) If the system has ≥ 1 customers, the server is busy (serving surely 1

customer). This occur with probability 01 p− . Note also that if the server is busy, then the system has ≥ 1 customers (at least one in the server). Hence, 0 0 0system server

p p p= = . If the system has 0 customer, the server is idle

(serving 0 customer). This occur with probability 0p . So, the long-term proportion of time the server is busy 01 p= − . Average number of customer in the server = 0 1 1 00 1 1sN p p p p= × + × = = −

(2) Now, Apply Little’s theorem to the server. Then 1 :sN EXλ λ ρµ

= = = .

Page 18: Queuing Theory - Tripod.compsdin.tripod.com/commnet/queue.pdf · Queuing Theory • Standard queuing theory nomenclature Interarrival time Service times M = exponential M = exponential

From (1) and (2), 0 1: 1serversp N pλρ

µ= = − = = .

• State diagram

1 0

λ

µ

i-1 i

λ

µ

• ( )1nnp ρ ρ= − ; 0,1,n = …

Proof. This is a birth-and-death process.

• 1

N ρ λρ µ λ

= =− −

Proof. ( ) ( )( )2

0 0

1 11

nn

n nN np n ρρ ρ ρ

ρ

∞ ∞

= =

= = − = −−

∑ ∑ .

• 11NT

ρρ

λ λ µ λ−= = =

• ( )

1 1W T X λ ρµ λ µ µ µ λ µ λ

= − = − = =− − −

• 2

11qN W

λ ρλρ ρµλ λµ λ ρ

µ

= = = =− −−

or ( )

( ) ( ) ( )

( ) ( ) ( )

( ) ( )( )

0 1 2 3

2 2

1 1

1 1 12

20

0 0 1 2 1

1 1 1

1 1 1

1 111

q i

ii

i i

m m m

m m m

m

m

N p p p p i p

i p i

m m m

m

ρ ρ

ρ ρ ρ ρ ρ ρ ρ ρ

ρ ρρ ρ ρ ρ ρρρ

∞ ∞

= =

∞ ∞ ∞+ +

= = =

=

= + + + + + − +

= − = − −

= − = − = −

= − = − =−−

∑ ∑

∑ ∑ ∑

… …

• Effect of scale on performance • m separate M/M/1 systems each: λ, µ

Page 19: Queuing Theory - Tripod.compsdin.tripod.com/commnet/queue.pdf · Queuing Theory • Standard queuing theory nomenclature Interarrival time Service times M = exponential M = exponential

ET = 1

1µρ−

• One consolidated system: mλ, mµ mm

λ λ λρ ρµ µ µ′

′ = = = =′

ET′ = 1 1

11 1

m ETm

µ µρ ρ′= =

− − (less delay)

• The improved performance of the combined system arises from improved global usage of the processors. • In the separate systems,

some of the queues may be empty while others are not. Consequently, some processors can be idle, even though there is work to be done in the system.

• In the combined system, the processor will stay busy as long as customers are waiting to be served

Applying M/G/1 analysis to M/M/1 • Mean residual service time

As noted above, since service time for M/M/1 is exponentially distributed, and thus memoryless. Therefore, given that the service time does not end when the packet arrive, what’s left of service time for the currently serviced packet is also

exponentially distributed with the same mean. So, 1Rµ

= .

Thus, ( )1 11 0 QW Nρ ρµ µ

⎛ ⎞= + − +⎜ ⎟⎝ ⎠

. The average waiting time in the queue is the

summation of 1) the residual time of the currently serviced packet which is 0 if server

is idle and 1µ

if server is busy and 2) The time required to service the customers

already waiting in the queue which is NQ times the average service time.

and 1 1W W ρρ λµ µ µ λ

= + =−

as before.

• ( ) tdH t e dtµµ −=

1hµ

= , 22

2hµ

=

( ) ( ) ( )2 2

2

2 1 2 1 1hW

λλ ρ ρµ

ρ ρ µ ρ µ λ= = = =

− − − −as expected.

Page 20: Queuing Theory - Tripod.compsdin.tripod.com/commnet/queue.pdf · Queuing Theory • Standard queuing theory nomenclature Interarrival time Service times M = exponential M = exponential

• pmf for N for M/M/1 system:

( ) ( )* 1Lth t e h ss s

µ µµ µµ µ

−= ⎯⎯→ = =+ +

( ) ( )( ) ( )( )( )( )

( )( ) ( )

( )( )( )( )( )

( )( )( ) ( )

( )( )( ) ( )

( )

*

*

1 11 1 1 1

11

1 1 1 1 1 11 1 1 1

1 11

zz h z z

N zz h z z

z

z z zz z z z z z z z

z z

µρρ λ λ µ

µλλ µ

ρ µ ρ µ ρ µλ µ µ λ µ µ λ µ

ρ µ ρµ λ ρ

− −− − − − +

= =− − −

− +

− − − − − −= = =

− + − − + − − + −

− −= =

− −

By expanding N(z) in a power series, we have ( ) ( ) ( )0

1 i

iN z zρ ρ

=

= −∑ .

Since ( ) ( )0

i

iN z P n i z

=

= =∑ , ( ) ( )1 iP n i ρ ρ= = − for k = 0, 1, 2, …

• pdf of W for M/M/1 system: ( ) ( ) ( ) ( ) ( )11 1 tWf t t e µ ρρ δ ρ λ − −= − + −

( )( )( )

( ) ( ) ( ) ( ) ( )

*

*

1 1 1 1

1 1 11 1 1

1 1 1 1

w ssh s

s ss s s s

sss s s

ρ ρ ρ ρλ λλ µ λ

µµ µ

µ λ λµ λρ ρ ρµ λ µ λ µ λ

− − − −= = = =

⎛ ⎞ ⎛ ⎞− − −− − −⎜ ⎟ ⎜ ⎟ ++ +⎝ ⎠ ⎝ ⎠⎛ ⎞+ − +⎛ ⎞+

= − = − = − +⎜ ⎟⎜ ⎟ ⎜ ⎟+ − + − + −⎝ ⎠ ⎝ ⎠

( ) ( ) ( ) ( )( ) ( ) ( ) ( ) ( )11 1 1t tWf t t e t eµ λ µ ρρ δ λ ρ δ ρ λ− − − −= − + = − + − ; t > 0

• pdf of T for M/M/1 system: ( ) ( ) ( )11 tTf t e µ ρµ ρ − −= −

( ) ( ) ( )* * *T s w s h s=

( ) ( ) ( ) ( ) ( )* * * 1 1sT s w s h ss s s

µ µ µρ ρµ λ µ µ λ

⎛ ⎞⎛ ⎞+= = − = −⎜ ⎟⎜ ⎟+ − + + −⎝ ⎠⎝ ⎠

( ) ( ) ( ) ( ) ( )11 1t tTf t e eµ λ µ ρρ µ µ ρ− − − −= − = −

M/D/1 • “D” ⇒ deterministic

service time = h for every customer

• h h= , 2 2h h=

Page 21: Queuing Theory - Tripod.compsdin.tripod.com/commnet/queue.pdf · Queuing Theory • Standard queuing theory nomenclature Interarrival time Service times M = exponential M = exponential

( ) ( )

( ) ( )

2 2

2

2 1 2 11

2 1 2 1

h hWh

λ λρ λ

λρµ

ρ µ ρ

= =− −

= =− −

( ) ( )2

2 1 2 1qN W λρ ρλµ ρ ρ

= = =− −

( ) ( ) ( ) ( )1 1 1 2 2 21

2 1 2 1 2 1 2 1T W h ρ ρ ρ ρ ρ

µ ρ µ µ ρ µ ρ µ ρ⎛ ⎞ ⎛ ⎞+ − −

= + = + = + = =⎜ ⎟ ⎜ ⎟⎜ ⎟ ⎜ ⎟− − − −⎝ ⎠ ⎝ ⎠

( ) ( ) ( )2 2 2 22 2 2

2 1 2 1 2 1qN N ρ ρ ρ ρ ρ ρρ ρρ ρ ρ

+ − −= + = + = =

− − −

M/M/1/K • Equilibrium (stable):

• 1n np pλ µ+= 1

11 0 0

nn

n np p p pλ λ ρµ µ

+

++

⎛ ⎞= = =⎜ ⎟

⎝ ⎠ ; n = 0, 1, …, K-1

• 0

1K

nn

p=

=∑ ⇒ 1

0 00

1 11

KKn

np p ρρ

ρ

+

=

−= =

−∑ ⇒ 0 1

11 Kp ρ

ρ +

−=

• pn = 1

11

nK

ρ ρρ +

−−

; n = 0, 1, …, K

• P(blocking or loss) = pK = proportion of time that the system is full = 1

11

KK

ρ ρρ +

−−

Proof. This is a truncated birth-and-death process. • For ρ < 1 ⇒ λ < µ

• the probabilities decrease exponentially as n increases • N tends to cluster around n = 0 • adding more buffers (K) is beneficial since the result is a reduction in loss

probability • For ρ = 1

• all state are equally probable

• pn = 11K +

• For ρ > 1 ⇒ λ > µ • pn increase with n

Page 22: Queuing Theory - Tripod.compsdin.tripod.com/commnet/queue.pdf · Queuing Theory • Standard queuing theory nomenclature Interarrival time Service times M = exponential M = exponential

• pn tend to cluster toward n = K ⇒ the system tends to be full • adding buffers is counterproductive since the system will fill up the additional

buffers.

• N =

( ) 1

1

1for 1

1 1

for 12

K

K

K

K

ρρ ρρ ρ

ρ

+

+

⎧ +− ≠⎪⎪ − −

⎨⎪ =⎪⎩

• For ρ < 1,

1 10 0 0

1 11 1

K K Kn n

n K Kn n n

np n nρ ρρ ρρ ρ+ +

= = =

− −= =

− −∑ ∑ ∑

( )

2 3

2 3 3 1

2 3 1

1 1

1 2 31 2 3

1

11 1 1

K

K

K K

K K

K sK s

s K

Ks

ρ ρ ρ ρρ ρ ρ ρ ρ

ρ ρ ρ ρ ρ ρ

ρ ρ ρρ ρ ρ

+

+

+ +

⋅ + ⋅ + ⋅ + + =+ ⋅ + ⋅ + + =

− = + + + + −

⎛ ⎞−= −⎜ ⎟− − −⎝ ⎠

……

( )

( )

( )

1 1

21 1 10

1 1 11

1 1 1

1 1 11

1

1 1 11

1

1 1 11 1 1 11

1 11 1 1 1 1

11 1

11 1

K KKn

K K Kn

K K KK

K K K

K K KK

K

K K KK

K

Kn

K K

K

K

ρ ρ ρ ρ ρ ρρρ ρ ρ ρρ

ρ ρ ρ ρ ρ ρρ ρ ρ ρ ρ

ρ ρρ ρρ ρρ

ρ ρ

ρ ρρ ρρ ρρ

ρ ρ

+ +

+ + +=

+ + ++

+ + +

+ + ++

+

+ + ++

+

− − − −= −

− − − −−

⎛ ⎞− −= − = −⎜ ⎟− − − − −⎝ ⎠

⎛ ⎞− + −⎜ ⎟= −⎜ ⎟− −⎝ ⎠⎛ ⎞− + −⎜ ⎟= −⎜ ⎟− −⎝ ⎠

=

( ) ( )

( ) ( ) ( )

1 11

1

1 11

1 1

1 111 1

1 11 11 1 1 1

K KK

K

K KK

K K

K

KK

ρ ρ ρ ρρ

ρ ρ

ρ ρ ρρρρ ρ ρ ρ

+ ++

+

+ ++

+ +

⎛ ⎞− + −⎜ ⎟−⎜ ⎟− −⎝ ⎠⎛ ⎞− +⎜ ⎟= − + = −⎜ ⎟− − − −⎝ ⎠

• For ρ = 1, ( )

0 0

11 11 1 2 2

K K

nn n

K K Knp nK K= =

+= = =

+ +∑ ∑

• T = ( )1 K

Npλ −

• For ρ → 0,

Page 23: Queuing Theory - Tripod.compsdin.tripod.com/commnet/queue.pdf · Queuing Theory • Standard queuing theory nomenclature Interarrival time Service times M = exponential M = exponential

• N = ( ) 1

1

11 1

K

K

K ρρρ ρ

+

+

+−

− −→ 0

• W → 0

• pK = Ploss = 1

11

KK

ρ ρρ +

−−

= 0

• T = W+X → T = X • For ρ → ∞,

• N → K • pK → 1

• T → Kµ

= KEX

M/M/m • m server.

1 0

λ

µ

i-1 i

λ

λ

m-1

m i-1 i

• 1mλρµ

= < 1

• ( ) ( )

( )

0 1

0

1

! ! 1

i mm

i

pm m

i mρ ρ

ρ

=

=

+−∑

( )0

0

0!

!

i

i m i

mp i m

ipm p i m

m

ρ

ρ

⎧≤ ≤⎪⎪= ⎨

⎪ ≥⎪⎩

• Erlang C formula ( )( )

0

! 1 1

mm

Q

p m pPm

ρρ ρ

= =− −

= P{W > 0}

• 1

QQ

PN

ρρ

=−

• ( )1

QPW

ρλ ρ

=−

Page 24: Queuing Theory - Tripod.compsdin.tripod.com/commnet/queue.pdf · Queuing Theory • Standard queuing theory nomenclature Interarrival time Service times M = exponential M = exponential

• 1T Wµ

= +

• 1

QQ

PN N m m

ρρ ρ

ρ= + = +

• For 1 ≤ i ≤ m

( )1 1 11 1

i i i i ii p p p p m pi iλµ λ ρµ− − −= ⇒ = =

( )0 ,1

!

i

i

mp p i m

= ≤ ≤

For i > m

1 1 11

i i i i im p p p p pmλµ λ ρµ− − −= ⇒ = =

( )0 0! !

m m ii m i m

i m

m mp p p pm mρ ρρ ρ− −= = =

0 , 1!

m i

imp p i m

= ≥ +

( ) ( ) ( )0 0 0

0 0 0

1 0 0 1! ! !

1 1! ! !

i i i

i m i m i m i

m m mp i m p i m p i m

i i ipm m mp i m p i m p i m

m m m

ρ ρ ρ

ρ ρ ρ

⎧ ⎧ ⎧≤ ≤ ≤ ≤ ≤ ≤ −⎪ ⎪ ⎪⎪ ⎪ ⎪= = =⎨ ⎨ ⎨

⎪ ⎪ ⎪≥ + ≥ + ≥⎪ ⎪ ⎪⎩ ⎩ ⎩

Note: for i = m, can use any equation. • PQ = P{Queuing} = probability that an arrival will find all servers busy and will be

forced to wait in queue

• Erlang C formula: ( )( )

0

! 1 1

mm

Q

p m pPm

ρρ ρ

= =− −

• probability that an arrival will find all servers busy and will be forced to wait in queue = Pblock

• Since an arriving customer finds the system in “typical” state { }

( )( )

0 0 00

0 0 00 0

;! ! !

! ! ! 1

Q

m i m i m k m

ii m i m i m k

mm k m m mk

k k

P P N m

m m mp p p p k i mm m m

mm mp p pm m m

ρ ρ ρ

ρρ ρ ρ ρρ

+∞ ∞ ∞ ∞

= = = =

∞ ∞

= =

= ≥

= = = = = −

= = =−

∑ ∑ ∑ ∑

∑ ∑

Page 25: Queuing Theory - Tripod.compsdin.tripod.com/commnet/queue.pdf · Queuing Theory • Standard queuing theory nomenclature Interarrival time Service times M = exponential M = exponential

• The probability of a call request finding all of the m circuits of a transmission line busy, assumed that such a call request “remains in queue,” that is, continuously attempts to find a free circuit.

• ( ) ( )

( )

0 1

0

1

! ! 1

i mm

i

pm m

i mρ ρ

ρ

=

=

+−∑

( ) ( ) ( )( )

( ) ( )( )

1 1 1

0 0 00 0 0 0

1

00

! ! ! 1

! ! 1

i i mm m m

i i i Qi i i m i i

i mm

i

m m mp p p p P p p

i i m

m mp

i m

ρ ρ ρρ

ρ ρρ

∞ − ∞ − −

= = = = =

=

= + = + = +−

⎛ ⎞= +⎜ ⎟

⎜ ⎟−⎝ ⎠

∑ ∑ ∑ ∑ ∑

Set 0

1ii

p∞

=

=∑ gives ( ) ( )

( )

0 1

0

1

! ! 1

i mm

i

pm m

i mρ ρ

ρ

=

=

+−∑

• ( ) ( )( )0 0 0 2

0 0 0! ! ! 11

m mm i mi

Q i m Qi i i

m mmN ip i p p i p Pm m m

ρ ρρ ρ ρρρρ

+∞ ∞ ∞

+= = =

= = = = =−−

∑ ∑ ∑

• Q SN N N= +

SN m λρµ

= =

QN N mρ= +

• Another way to find NS

Page 26: Queuing Theory - Tripod.compsdin.tripod.com/commnet/queue.pdf · Queuing Theory • Standard queuing theory nomenclature Interarrival time Service times M = exponential M = exponential

( )

( )( )

( )( )

( )( )

( )( )

( )( )

( ) ( )( )( )

( )( )

( ) ( )( )

1 1

00 0

1

0 01

01

11

00

0

!

1 ! ! 1

1 ! 1 ! ! 1

1! ! 1 ! 1

! ! 1

im m

S i i Qi i m i

i mm

i

i m mm

i

k m mm

k

k m

k

mN ip mp i p mP

i

m mp mp

i m

m m mp m

i m m

m m m mp m

k m m

m mp m m

k m

ρ

ρ ρρ

ρ ρ ρρ

ρ ρ ρ ρρ ρ

ρ ρρ ρ

ρ

− ∞ −

= = =

=

=

+−

=

=

= + = +

= +− −

⎛ ⎞⎛ ⎞⎜ ⎟= − +⎜ ⎟⎜ ⎟⎜ ⎟− − −⎝ ⎠⎝ ⎠⎛ ⎞⎛ ⎞−⎜ ⎟= + − +⎜ ⎟

⎜ ⎟⎜ ⎟− −⎝ ⎠⎝ ⎠

= +−

∑ ∑ ∑

( ) ( )( )

1

0

1

0 ! ! 1

m

k mm

k

m mm

k mρ ρ

ρρ

=

⎛ ⎞⎜ ⎟⎜ ⎟⎝ ⎠

⎛ ⎞+⎜ ⎟⎜ ⎟−⎝ ⎠

=

( ) ( )( )

1

0 ! ! 1

i mm

i

m mi mρ ρ

ρ

=

+−∑

mρ=

M/M/m/m ⇒ Erlang model

• λρµ

=

• 0

0

1

!

im

i

p

=

=

• 0

0

!!

!

n

n

n im

i

np pn

i

ρρ

ρ=

= =

• Erlang B formula:

0

!

!

m

lost m im

i

mp p

i

ρ

ρ=

= =

Page 27: Queuing Theory - Tripod.compsdin.tripod.com/commnet/queue.pdf · Queuing Theory • Standard queuing theory nomenclature Interarrival time Service times M = exponential M = exponential

1 0

λ

µ

i-1 i

λ

λ

m-1

m

M/M/∞

1 0

λ

µ

i-1 i

λ

• λρµ

=

• 0

0

1 1

!

i

i

p ee

i

ρρρ

−∞

=

= = =

• 0 ! !

i i

ip p ei i

ρρ ρ−= = ⇒ Poisson

Comparison Engsett:

1 0

µ

i i+1

(k-i)λ

(i+1)µ

(k-c+1)λ

c-1

c

Erlang:

1 0

λ

µ

i i+1

λ

(i+1)µ

λ

c-1

c

M/M/1

Page 28: Queuing Theory - Tripod.compsdin.tripod.com/commnet/queue.pdf · Queuing Theory • Standard queuing theory nomenclature Interarrival time Service times M = exponential M = exponential

1 0

λ

µ

i-1 i

λ

µ

M/M/m

1 0

λ

µ

i-1 i

λ

λ

m-1

m i-1 i

M/M/m/m

1 0

λ

µ

i-1 i

λ

λ

m-1

m

M/M/∞

1 0

λ

µ

i-1 i

λ

Etc • Burke’s theorem:

For an M/M/1. M/M/c, or M/M/∞ queuing system at steady state with arrival rate λ, then • The departure process is Poisson with rate λ • At each time t, the number of customers in the system n(t) is independent of the

sequence of departure times prior to t.