This preview shows page 1. Sign up to view the full content.
Unformatted text preview: Probability and Statistics with Reliability,
Queuing and Computer Science Applications
Second edition
by K.S. Trivedi
PublisherJohn Wiley & Sons Chapter 8 (Part 3) :Continuous Time Markov Chains
“Pure” Performance Modeling
Dept. of Electrical & Computer engineering
Duke University
Email: kst@ee.duke.edu
URL: www.ee.duke.edu/~kst
Copyright © 2003 by K.S. Trivedi 1 Performance Modeling using
Elementary Queuing Theory
• BirthDeath Process
–
–
–
–
–
– M/M/1 queue
M/M/m queue
M/M/1/n queue
Cyclic Queuing Model
Response Time in a ClientServer System
Wireless Handoff Model • NonBirthDeath Process
– M/M/2 Heterogeneous queue
– MMPP Arrival Process
– MMPP/M/1 queue
Copyright © 2003 by K.S. Trivedi 2 Continuous Time BirthDeath
Process
• A CTMC
with I={0,1,2,…} forms a BD
process, if ?i, i=0,1,2,.. and µi, i=1,2,.. exist, such that
the transition rates are given by given Birth rate ?i ≥ 0 and Death rate µi ≥ 0
Copyright © 2003 by K.S. Trivedi 3 Continuous Time BirthDeath Process (contd.)
The state diagram of the birthdeath process is given as The generator matrix Q can be shown to be as Copyright © 2003 by K.S. Trivedi 4 Continuous Time BirthDeath Process
(contd.) In Steadystate,
Copyright © 2003 by K.S. Trivedi 5 Steady State Balance Equations These are called balance eqns. Rearranging above, v ?i and µi should be > 0 for irreducibility condition, which
means every state can be reached from every other state.
Copyright © 2003 by K.S. Trivedi 6 Steady State Balance Equations
(contd.) • Note that limiting state probability vector [p0, p1, . . .]
is now completely determined and are non zero
provided
converges which also means
that all states of the CTMC are recurrent nonnull.
Copyright © 2003 by K.S. Trivedi 7 M/M/1 Queue
• Arrivals process is Poisson, i.e., interarrival times are all i.i.d,
EXP(?).
Poisson arrival
Process with rate ? • Service times are i.i.d, EXP(µ). • N(t) is a birthdeath process, with ?k=?; µk=µ. • Define, ?=?/µ (traffic intensity, in Erlangs)
Copyright © 2003 by K.S. Trivedi 8 M/M/1 queue (contd.)
• From the balance equations, we get • Uo = 1 – πo is known as server utilization and is interpreted
as the proportion of time the server is busy
• Expected # of customers, Copyright © 2003 by K.S. Trivedi 9 M/M/1 queue (contd.)
• This measure (E[N(t)]) can be viewed as a
weighted average,
.
• By choosing suitable weights for the states of a
CTMC, we can get most measures of interest and
the resulting model is known as an MRM(Markov
Reward Model). Above weighted average is the
expected reward rate in the steady state
• Other measures:
– Average queue length (E[Q])
– Average response time
– Average waiting time (avg. time spent in the queue
before service begins) etc.
Copyright © 2003 by K.S. Trivedi 10 M/M/1 queue: Little’s formula
• Let the random variable R denote the response time
(defined as the time elapsed from the instant of job
arrival until its completion)
Little’s law states
E[R] = E[N]/?
• Here • Response time (R) = waiting time (W) + service time
(S )
E[W] = E[R] – E[S] = 1/(µ(1?))  1/ µ .
Copyright © 2003 by K.S. Trivedi 11 Reward rate assignment for
Measures for M/M/1 queue
Mean no. in the system
E[N] rj=j Mean Response time E[R] rj=j/? Throughput E[T] r0=0
rj=µ ρ
1− ρ
1/ µ
1− ρ ? j>0 Copyright © 2003 by K.S. Trivedi 12 Response time distribution (Tagged job
approach)
• With FCFS scheduling and steadystate conditions
– If there are already n jobs in the system, the next job
(n+1)st will experience a response time =R=
S*+S’1+S2+..+Sn
– S* : service time for the (n+1)st job; S’1: residual
service time for job currently undergoing service (#1).
– Because of the memoryless property, these times are
EXP(µ).
– Hence, for N=n, the conditional LST of R is, Copyright © 2003 by K.S. Trivedi 13 Response time distribution (Tagged job
approach)
• With FCFS scheduling and steadystate conditions
– Note for a Poisson arrival process, it is known that, the state of
the system as seen by an arriving customer is statistically the
same as the state of the system at an arbitrary time. This
Property is known as PASTA –Poisson Arrival See Time
Average. Hence unconditioning using – Then, taking inverse transform, Copyright © 2003 by K.S. Trivedi 14 M/M/m queue
• mservers service the queue.
1 Poisson arrivals
(rate ? ) µ .
.
.
m Copyright © 2003 by K.S. Trivedi 15 M/M/m Queue Solution Copyright © 2003 by K.S. Trivedi 16 M/M/m Queue performance measures
• Average number in system E[N]: rk = k Copyright © 2003 by K.S. Trivedi 17 M/M/m Queue performance measures
• Server utilization: rv M  number of busy servers.
For number of customers 0 <= k <= m, the
number of busy servers = k. Beyond that the
number of busy servers = m. • A customer may have to join the queue if #
customers already in the system >= m
Copyright © 2003 by K.S. Trivedi 18 Separate or common queue?
• M/M/2.
• 2 cases
– Case 1: Two independent queues
Two separate Poisson streams à 2 separate M/M/1 queues
λ/2 µ λ/2 µ – Case 2: M/M/2 case
λ/2 Two separate Poisson streams
λ/2 µ 1 λ Combined Poisson steams Copyright © 2003 by K.S. Trivedi µ 2 19 Comparative performance
• Case 1: For each M/M/1 queue,
• Case 2: Common queue M/M/2 Copyright © 2003 by K.S. Trivedi 20 M/M/1/n Queue
• Finite queue size, finite buffer space à
finite state space.
Max. capacity n Poisson
Stream
λ µ
Arrivals exceeding
capacity are rejected 0 1 µ λ λ λ λ 2 µ • Steady State Solution:
n µ µ v Note that given irreducibility (?i and µi should be >0) , being a finite CTMC all
states are recurrent nonnull and hence there is no additional condition for stability.
Copyright © 2003 by K.S. Trivedi 21 M/M/1/n Queue Performance Measures
• Expected # of jobs in the system:
– rk = k,
• Loss probability
– rn = 1, rk = 0, k=0,1,..,n1
• Throughput
– rk = µ , k=1,2, ..,n; r0 = 0 (or, rk = λ , k=0,1,2, ..,n1; rn = 0)
• Mean response time E[R]=E[N]/ (λ(1−πn))
Copyright © 2003 by K.S. Trivedi 22 M/M/1/n: Response time distribution
• Response time distribution: Job may be rejected
(or accepted)
– Unconditional
– Conditional (conditioned on the job being
accepted):
• Reward assignment: for the kth state, response time
experienced by the tagged task is sum of k+1
service times, each of which is EXP(µ), i.e.,
(k+1)stage Erlang. Copyright © 2003 by K.S. Trivedi 23 M/M/1/n: Response time distribution
– Unconditional (defective) distribution: – There is a defect (or mass at infinity) equal
to πn , the probability that the job is rejected
 Conditioned on job being accepted, R has a
nondefective distribution: Copyright © 2003 by K.S. Trivedi 24 Measures for M/M/1/n system Copyright © 2003 by K.S. Trivedi 25 Model made in SHARPE GUI Copyright © 2003 by K.S. Trivedi 26 Analysis frame showing output asked
Steady State prob. in
all state asked Throughput, Mean no.
in system asked Copyright © 2003 by K.S. Trivedi 27 Reward Rate Assignment Copyright © 2003 by K.S. Trivedi 28 Output Generated by SHARPE
Steady State prob.
for all states Mean no. in the
system
Throughput Copyright © 2003 by K.S. Trivedi 29 Cyclic Queuing model Example
• Consider the cyclic queuing model shown below.
• Lengths of successive CPU execution bursts are
independent exponentially distributed rv with mean 1/µ
and that successive I/O burst times are independent
exponentially distributed variables with mean 1/?
• At the end of a CPU burst, a program requests an I/O
operation with probability q1 or it completes execution
with probability q0
q0 + q1 = 1. Copyright © 2003 by K.S. Trivedi 30 Cyclic Queuing model –Example (contd.)
• At the end of a program completion, another statistically
identical program enters the system, leaving the number of
programs in the system at a constant level n
(known as the degree of multiprogramming). Copyright © 2003 by K.S. Trivedi 31 Cyclic Queuing model –Example
(contd.)
• Let the number of programs in the CPU queue including
any being served at the CPU denote the state of the system,
i, where 0 = i = n. Then state diagram becomes • Steady State Probability is given by
where ρ = λ/(µq1) Copyright © 2003 by K.S. Trivedi 32 Cyclic Queuing model –Example
(contd.)
• System throughput is defined as
• E[T] is proportional to the CPU utilization, U0 for fixed
values of µ and q0.
• Let the random variable B0 denote the total CPU time
requirement of a tagged program. Then B0 is EXP(µq0 ).
• the average number of visits V0 to the CPU is V0 = 1/q0 ,
and thus E[B0] = V0E[S0] =1/(µq0 ), where E[S0] = 1/µ is
the average CPU time per burst. • If B1 represents the total I/O service time per
program, then
Copyright © 2003 by K.S. Trivedi 33 Cyclic Queuing model – Example
(contd.) • Defining parameter ? as • CPU utilization as a function of the degree
of multiprogramming • Thus ? indicates the relative
measure of the CPU versus
I/O requirements of a
program. If the CPU
requirement E[B0] is less
than the I/O requirement
E[B1] (i.e., ? < 1), the
program is said to be I/Obound; if ? > 1, then
program is said to be CPUbound; and otherwise it is
called balanced.
Copyright © 2003 by K.S. Trivedi 34 Model made in SHARPE GUI Copyright © 2003 by K.S. Trivedi 35 Analysis Frame Copyright © 2003 by K.S. Trivedi SS prob. and
Utilization
asked 36 Reward Rate assigned Copyright © 2003 by K.S. Trivedi 37 Output generated by SHARPE SS prob. and
Utilization
calculated Copyright © 2003 by K.S. Trivedi 38 Response Time in a ClientServer
System
• Model can be given as
• Consider a client–server system
with M clients in which
individual think times are
exponentially distributed with
mean 1/? seconds and the
service rate is µ Copyright © 2003 by K.S. Trivedi 39 Response Time in a ClientServer System
• State Diagram can be drawn as
Μλ 0 (Μ−1)λ µ 2λ …... 2 1
µ (M2)λ µ µ λ M1 M µ • Assuming service time per request, B0, is
exponentially distributed with mean E[B0] = 1/µ
seconds.
• Then the steadystate probability that there are n
requests executing or waiting on the CPU is given
by
Copyright © 2003 by K.S. Trivedi 40 Response Time in a ClientServer
System (contd.)
• Probability that the CPU is idle is • The CPU utilization U0 is 1p0, and the average rate of
request completion is E[T] = µ(1 p 0) = U0/E[B0].
• If E[R] is average response time, then on the average a
request is generated by a given client in E[R] + (1/?)
seconds.
• Thus the average request generation rate of the client
subsystem is M/[E[R] + (1/?)].
Copyright © 2003 by K.S. Trivedi 41 Response Time in a ClientServer
System (contd.)
• In the steady state, the request generation and completion
rates must be equal. •E[R] is plotted as a
function of the number
of clients, M, assuming
1/? = 15 s and 1/µ = 1 s. Copyright © 2003 by K.S. Trivedi 42 Response Time in a ClientServer
System (contd.)
• When the number of clients M = 1, there is no queuing and
the response time E[R] equals the average service time
E[B0].
• As the number of clients increases, there is increased
congestion as the server utilization U0 approaches 1. In the
limit M ? 8 ,E[R] is a linear function [ME[B0]  (1/?)] of M.
• In this limit, the installation of an additional client increases
every other client’s response time by the new client’s service
time E[B0].
• The number of clients, M*, for which the heavyload
asymptote E[R] = ME[B0]  (1/?) intersects with the lightload asymptote E[R] = E[B0] is therefore called the
saturation number and is given by
Copyright © 2003 by K.S. Trivedi 43 Handoffs in wireless cellular
networks
• Handoff: When an MS moves across a cell
boundary, the channel in the old BS is
released and an idle channel is required in
the new BS
• Hard handoff: the old radio link is broken
before the new radio link is established
(AMPS, GSM, DECT, DAMPS, and PHS)
Copyright © 2003 by K.S. Trivedi 44 Wireless Cellular System
Traffic in a cell
New Calls Common
Channel Pool Call completion Handoff Calls Handoff out From
neighboring cells To neighboring
cells A Cell
Copyright © 2003 by K.S. Trivedi 45 Performance Measures: Loss
formulas or probabilities
• When a new call (NC) is attempted in an cell covered by a
base station (BS), the NC is connected if an idle channel is
available in the cell. Otherwise, the call is blocked
• If an idle channel exists in the target cell, the handoff call
(HC) continues nearly transparently to the user. Otherwise,
the HC is dropped • Loss Formulas
– New call blocking probability, Pb : Percentage of new calls
rejected
– Handoff call dropping probability, Pd : Percentage of calls
forcefully terminated while crossing cells
Copyright © 2003 by K.S. Trivedi 46 Guard Channel Scheme
Handoff dropping less desirable than new call blocking!
Handoff call has Higher Priority: Guard Channel Scheme
GCS: g channels are reserved for handoff calls. g tradeoff between Pb Copyright © 2003 by K.S. Trivedi & Pd 47 Assumptions
•
•
•
• Poisson arrival stream of new calls ?1
Poisson stream of handoff arrivals ?2
Limited number of channels: n
Exponentially distributed completion time of ongoing
calls µ1
• Exponentially distributed cell departure time of ongoing
calls µ2 Copyright © 2003 by K.S. Trivedi 48 Markov chain model of wireless hard handoff
C(t): the number of busy channels at time t Steadystate probability Copyright © 2003 by K.S. Trivedi 49 Loss formulas for wireless
network with hard handoff
Dropping probability for handoff: Blocking probability of new calls: q Notation: if we set g=0, the above expressions reduces to the classical ErlangB loss formula Copyright © 2003 by K.S. Trivedi 50 Computational aspects
• Overflow and underflow might occur if n is large
• Numerically stable methods of computation are required
– Recursive computation of dropping probability for
wireless networks
– Recursive computation of the blocking probability
– For loss formula calculator, see webpage:
http://www.ee.duke.edu/~kst/wireless.html Copyright © 2003 by K.S. Trivedi 51 Nonbirthdeath examples
• We consider two example performance
models which give rise to nonbirthdeath
CTMC models
– M/M/2 heterogeneous queue
And
– A queue with nonPoisson arrival stream; in
fact with MMPP (Markov modulated Poisson
process) arrivals
Copyright © 2003 by K.S. Trivedi 52 M/M/2 Queue with Heterogeneous
Servers (µ1 > µ2).
• Variant of M/M/2 with homogenous rate.
• The state of the system is defined to be the tuple (n1, n2)
where n1 = 0 denotes the number of jobs in the queue
including any at the faster server, and n2 ∈{0, 1} denotes the
number of jobs at the slower server
• When both servers are idle, the faster server is scheduled for
service before the slower one.
• The block diagram of the system is given Copyright © 2003 by K.S. Trivedi 53 M/M/2 Queue with Heterogeneous
Servers (contd.)
• State Diagram is given by • Solving balance eqns. we have Copyright © 2003 by K.S. Trivedi 54 M/M/2 Queue with Heterogeneous
Servers (contd.).
• The average number of jobs in the system may now be
computed by assigning the reward rate equal rn1, n2 = n1 + n2
as the number of customers in the system in state (n1, n2).
• Therefore, the average number of jobs is given by Copyright © 2003 by K.S. Trivedi 55 Example M/M/2 server
• Assume that the job stream modeled as a Poisson
process with rate ? jobs/minute, and the service
times µ2 jobs/minute.
• Thus, ?2 = ?/µ2, and the average response time is
given by E[R2] = (1/µ2)/(1?2).
• Suppose this response time is considered
intolerable by the users and an extra server is
added to the system. Let the service rate µ1 of the
new server be equal to αµ2 for some α > 1.
• Now for both machines we have
Copyright © 2003 by K.S. Trivedi 56 Example M/M/2 server (contd.)
• Average no. of customer in the system is given by • Now only using the faster server, response time
becomes
• The condition under which E[R1] = E[R] can be
simplified to
Copyright © 2003 by K.S. Trivedi 57 Example M/M/2 server (contd.)
• Thus, for example, if ? = 0.2 and µ2 = 0.25 so that ?2 =
0.8, then if the new server is more than 3 times faster
than the old one, the inequality shown above is
satisfied, and surprisingly, it is better to disconnect the
slower machine altogether.
• Average response times (in minutes) of the three
configurations for different values of α with ? = 0.2
and µ2 = 0.25. Copyright © 2003 by K.S. Trivedi 58 M/M/2 Queue with Heterogeneous
Servers (contd.)
• Also study perceived response time and
perceived queue length idea (Problem 4 on
p. 483)
• Study the optimization problem (Problem 2
on p. 483) and see the nonintuitive result Copyright © 2003 by K.S. Trivedi 59 Poisson Process
• Consider a pure birth process (i.e. all death
rates are 0 or µk = 0, k = 0,1,2,…)
• Constant birth rate (i.e. λk = λ for k = 0,1,2,…)
• N(t) is the number of arrivals (births) in time t
The state diagram can be shown as
λ
0 λ
1 λ
2 λ …... λ
k Copyright © 2003 by K.S. Trivedi λ
k+1 ….. 60 Poisson Process (contd.) • Solving the above differential equations
with the initial conditions that
• We get, Copyright © 2003 by K.S. Trivedi 61 Markov Modulated Poisson Process
• An MMPP is a doubly stochastic Poisson process whose
arrival rate is “modulated” by an irreducible continuous time
Markov chain.
• Let Q = [qij ]m×m be the generator matrix of the CTMC with m
states. Each state i is assigned a Poisson arrival rate, ?i , i= 1,
2, . . .,m.
• The Poisson arrival rate is determined by the state of the
CTMC; thus, when the Markov chain is in state i, arrivals
occur according to a Poisson process of rate ?i .
• Let ? denote the arrival rate vector ? = [?1, ?2, . . . , ?m]T.
• Let e = [1, 1, . . . , 1]T .
Copyright © 2003 by K.S. Trivedi 62 Markov Modulated Poisson Process
(contd.)
• The reason for using this in traffic modeling is
that MMPP has the capability of capturing
some of the most important correlations
between interarrival times and still remains
analytically tractable.
• MMPP is a special case of the Markovian
arrival process (MAP).
Copyright © 2003 by K.S. Trivedi 63 MMPPthe counting process
• Lets see the associated counting process of
MMPP.
• Let N(t) be the number of arrivals in (0, t] and
J(t) the state of the modulating CTMC.
• The bivariate process {J(t),N(t), t ≥ 0} is the
counting process whose state space is {1, 2, . .
.,m} × {0, 1, . ..}.
• Transitions between states with the same
number of arrivals—say, (i, n) and (j, n)—are
the same as transitions between state i and j of
the CTMC with rate qij and qji, respectively.
• An arrival may occur in any of the modulating
CTMC states, resulting in the counter
increasing by one.
• So a transition from state (i, n) to state (i, n+1)
with rate ?i takes place.
• The state diagram of the bivariate process for a
threestate MMPP is shown.
Copyright © 2003 by K.S. Trivedi 64 MMPPthe counting process (contd.)
• The counting process is also a homogeneous CTMC.
Let π be the steadystate vector of the MMPP, which
is the solution to
• So we can see that • The result shows that steadystate expected number of
arrivals in an interval of length t is the product of time
duration t and the average arrival rate, πλ. where πλ is
the sum of rates weighted by steadystate probabilities
of the modulating CTMC.
Copyright © 2003 by K.S. Trivedi 65 MMPP/M/1 Queue
• We now consider an MMPP/M/1 queue in which
the arrival process is an MMPP characterized by
the generator matrix Q of the modulating CTMC
and the arrival rate vector ?.
• The service time is exponentially distributed with
mean 1/µ. The buffer size of the queue is assumed
to be infinite.
• The state diagram for an MMPP/M/1 queue is
shown next, in which the MMPP arrival process
has three states.
Copyright © 2003 by K.S. Trivedi 66 MMPP/M/1 Queue (contd.)
• The structure of the Markov chain
suggests that its steadystate
solution may have the same form
as that of an M/M/1 queue.
• Let pi,n be the steady state
probability that the MMPP
modulating process is in state i
and the system has n jobs.
• It can be shown that • where ?i = ?i /µ is the traffic
intensity conditioned on the
MMPP being in state i.
Copyright © 2003 by K.S. Trivedi 67 Other arrival processes
• MAP, BMAP, PH type arrival processes
have been studied [LUCA 1990, NEUT
1978, FISC 1993]
• Also periodic NHPP type arrivals have been
studied [RIND 1995] Copyright © 2003 by K.S. Trivedi 68 ...
View Full
Document
 Spring '10
 MohammadAbdolahiAzgomiPh.D

Click to edit the document details