You are on page 1of 14

Recitation 10: Continuous-time Queueing Systems

Hung-Bin (Bing) Chang1 and Yu-Yu Lin2


hungbin@seas.ucla.edu1 and skywoods2001@ucla.edu2

Prof. Izhak Rubin (UCLA)

EE 132B

2014 Fall

1 / 14

Outline

Birth and Death Process

Continuous-time Queueing Systems

M/M/m/N Queueing System (QS)

Example

Prof. Izhak Rubin (UCLA)

EE 132B

2014 Fall

2 / 14

Birth and Death Process

Birth and Death Process - Definition

A continuous-time process X = {Xt , t 0} is said to birth and


death process if it is a CTMC with the following generator


i
qij =

i i

, for j = i + 1,
, for j = i 1, i 0,

(1)

, for j = i, i 0,
, otherwise.

where qi = qii = i + i , 0 = 0.
qii = limh0
qij = limh0

Prof. Izhak Rubin (UCLA)

1Ph (i,i)
: transition rate out of state i.
h
Ph (i,j)
h : transition rate from state i to state

EE 132B

j, i 6= j.

2014 Fall

3 / 14

Birth and Death Process

Birth and Death Process - Balanced Equation


By using Kolmogorovs Forward Equations (KFE), we obtain the
following set of balanced equations:
P
P
P(j)qj = k 6=j P(k )qkj , j S; jS P(j) = 1.
(2)
Flow into a node = flow out of a node

0 P(0) = 1 P(1)

, for state 0,

(k + k )P(k ) = k 1 P(k 1) + k +1 P(k + 1) , for state k .


After arrangement, we can obtain
k
P(k + 1) =
P(k )
k +1
Qk 1


i
k
k 1
=
P(k 1) = = Qi=0
P(0).
k
k +1
k
i=1 i
|
{z
}

(3)

(4)

P(k )

Prof. Izhak Rubin (UCLA)

EE 132B

2014 Fall

4 / 14

Birth and Death Process

Birth and Death Process - Condition for Existence of


Steady-state Stationary Distribution
Define
Qk 1

ak = Qi=0
k

i=1 i

(5)

where a0 = 1.
A unique stationary distribution exists for

P(k ) =

k =0

k =0 ak

< .

ak P(0) = 1

k =0

P(0) = P

k =0 ak

Prof. Izhak Rubin (UCLA)

aj

; P(j) = P

k =0 ak

EE 132B

(6)
, j = 0, 1, . . . .

2014 Fall

5 / 14

Continuous-time Queueing Systems

M/M/m/N Queueing System (QS)


M: The inter-arrival times follows exponential distribution:


A(t) = 1 et u(t),

(7)

where is the transmission rate.


M: The service times follows exponential distribution:

B(t) = 1 et u(t),

(8)

where is the service rate.


m: m servers.
N: System capacity is N.

Prof. Izhak Rubin (UCLA)

EE 132B

2014 Fall

6 / 14

Continuous-time Queueing Systems

M/M/1 Queueing System (QS)


The system size process X = {Xt S, t 0}, where
S = {0, 1, 2, . . . } is a continuous-time birth-and-death Markov
chain with following generator:


i
qij =

i i

, for j = i + 1,
, for j = i 1, i 1,

(9)

, for j = i, i 0,
, otherwise,

where i = and j = .
=

is traffic density.

Prof. Izhak Rubin (UCLA)

EE 132B

2014 Fall

7 / 14

Continuous-time Queueing Systems

Apply Continuous-time Birth and Death Markov Chain


to M/M/1 QS
Consequently, we also have
 j

; a0 = 1.
aj =

(10)

A steady-state stationary distribution exists iff

aj =

j=0

j < < 1.

(11)

j=0

If 1, the system will overflow!


if < 1, the stationary distribution is given by
P(j) = lim P(Xt = j) = (1 )j , j 0.

(12)

Prof. Izhak Rubin (UCLA)

EE 132B

2014 Fall

8 / 14

Continuous-time Queueing Systems

M/M/1 QS - Summary

i = , i 0.
E[X ] =

i = , i 1.
=

E[D] =

<1

j=0 jP(j) = 1 ,
1
1
D E[X ] = (1) ,

Note: For M/M/1 QS,


D = .

P(j) = (1 )j , j 0.
W (t) =

1 e(1)t u(t), t 0.

E[W ] = E[D]

E[Q] = D E[W ] =

D(t) =

1 e(1)t u(t), t 0.

Prof. Izhak Rubin (UCLA)

EE 132B

(1) ,

2
1 .

2014 Fall

9 / 14

M/M/m/N Queueing System (QS)

Performance Metrics for M/M/m/N (QS)


(
i =

, 0 i N 1,
0 , i = N.

i = min(i, m), i 1
f = , =

P(j) = aj P(0), j 0
P

P(0) =
aj =
j
f

j!

fj

m!mjm
a0 = 1

N
j=0

aj

Performance Metrics:
]
E[D] = E[X
D
E[W ] = E[D] 1
PN
E[X ] = j=0 jP(j)
E[Q] = D E[W ]

1

, 0 < j < m,
,m j N
N

PB = P(N) = P(0) m!mf Nm


D = (1 PB )
Prof. Izhak Rubin (UCLA)

EE 132B

2014 Fall

10 / 14

Example

Example 1

What effect does doubling and have on


L = E[X ], Lq = E[Q], E[D] and E[W ] in an M/M/1 queueing
system?

Prof. Izhak Rubin (UCLA)

EE 132B

2014 Fall

11 / 14

Example

Example 1 - Solution
For an M/M/1 queueing system,

< 1,

L
1
E[X ] = L =
, E[D] = =
,
1

(1 )
Lq
2

E[Q] = Lq =
, E[W ] =
=
.
1

(1 )
=

Doubling and
is the same and, thus, E[X ] = L and E[Q] = Lq remain the same.
E[D] and E[W ] = Wq become half their original value.

Prof. Izhak Rubin (UCLA)

EE 132B

2014 Fall

12 / 14

Example

Example 2
A graduate research assistant "moonlights" in the food court in the
student union in the evenings. He is the only one on duty at the
counter during the hours he works. Arrivals to the counter seem to
follow the Poisson distribution with mean of 10/hr. Each customer
is served one at a time and the service time is thought to follow an
exponential distribution with a mean of 4 min.
Beware of units!
(a)
(b)
(c)
(d)

What is the probability of having a queue?


What is the average queue length?
What is the average time a customer spends in system?
What is the probability of a customer spending more than 5 min in
the queue before being serviced?
(e) The graduate assistant would like to spend his idle time grading
papers. If he can grade 22 papers an hour on average when
working continuously, how many papers per hour, can he average
while working his shift?
Prof. Izhak Rubin (UCLA)

EE 132B

2014 Fall

13 / 14

Example

Example 2 - solution
=

1
6

[customer/min], =

1
4

[customer/min] and =

(a) P(having a queue) = P(X 2) = 2 =


(b) E[Q] =
(c) E[D] =

2
1
E[X ]

4
9

= 23 .

0.44.

= 1.33.
=

= 12 mins.
1

(d) Since W (t) = 1 e(1)t = 1 23 e 12 t , t 0,


1

P(W 5 mins) = 1 32 e 12 5 = 0.56. Then,


P(W > 5 mins) = 1 0.56 = 0.44.
t is in unit of min.

(e) P(idle) = P(0) = 1 = 13 . Thus, the number of papers graded is


equal to 31 22 = 7.33 papers/hour.

Prof. Izhak Rubin (UCLA)

EE 132B

2014 Fall

14 / 14

You might also like