SlideShare une entreprise Scribd logo
1  sur  101
Télécharger pour lire hors ligne
Communication Networks
Sanjay K. Bose
Lecture Set VI
Queuing Theory
Model of a Queue
Arrivals Departures
Waiting
Position
s
Server(s)
A “Queue” is basically a model of a node providing service where
arrivals come at possibly random times and ask for service of
possibly random length from the one or more servers that may be
present in the queue. A Computer Network may then be modelled
as a set of interconnected queues, i.e. a “Queuing Network”
Input Specifications for a
Queue
• Arrival Process Description
• Service Process Description
• Number of Servers
• Number of Waiting Positions
• Special Queueing Rules, e.g. -
• order of service (FCFS, LCFS, SIRO, etc.)
• baulking, reneging, jockeying for queue position
Additional Input Specifications for
a Queueing Network
For networks of queues, one must provide additional
information, such as -
• Interconnections between the queues
• Routing Strategy - deterministic, class based or
probabilistic with given routing probabilities
• Strategy followed to handle blocking if the
destination queue is one of finite capacity (i.e. with
finite number of waiting positions)
An Open Queueing Network
Jobs (Arrivals) enter the network from outside and eventually
leave the network after obtaining service from one or more queues
in the queueing network.
A Closed Queueing Network
A fixed number of jobs perpetually circulate in the network,
moving to the next queue after obtaining the required service
at the earlier one.
No additional jobs enter the system nor do jobs leave the
network.
A Queue or a Queueing Network
may be studied in different ways
The results may be provided
from different points of view
Analysis
Simulation
and/or
That of a customer entering
the system for service
That of a service provider
who provides the resources
(servers, buffers etc.)
Consider analytical
approaches here
Parameters of interest for a customer
arriving to the queue for service
(Service Parameters)
• Queueing delay
• Total delay
• Number waiting in queue
• Number in the system
• Blocking probability (for finite
capacity queues)
• Probability that the customer
has to wait for service
Transient Analysis
or
Equilibrium Analysis
Mean Results
or
Probability
Distributions
Parameters of interest for the
Service Provider
(Service Parameters)
• Server Utilization/Occupancy
• Buffer Utilization/Occupancy
• Total Revenue obtained
• Total Revenue lost
• Customer Satisfaction (Grade
of Service)
Transient Analysis
or
Equilibrium Analysis
Mean Results
or
Probability
Distributions
General approach to the study of queues
and queueing networks
“Subject to appropriate modelling assumptions, obtain
exact analytical results for the mean performance
parameters under equilibrium conditions”
In some special cases, we may also be obtain results on higher moments
(variance etc.) or probability distributions and/or their transforms.
Transient analysis is generally not feasible, except for some very simple
cases. For this, simulation methods are preferred.
In some case, especially for queueing networks, exact analysis is not
feasible but good approximate analytical methods are available.
Analysis of a Simple Queue
(with some simplifying assumptions)
Arrivals
with an
average
arrival
rate of 
Infinite Buffer
(infinite number
of waiting
positions)
Single
Server
Service rate 
at the server
Assume that, as t0
P{one arrival in time t} = t
P{no arrival in time t} =1- t
P{more than one arrival in time t} = O((t)2) = 0
P{one departure in time t} = t
P{no departure in time t} =1-  t
P{more than one departure in time t} = O((t)2) = 0
P{one or more arrival and one or more departure in time t}
= O((t)2) = 0
Arrival Process
Mean Inter-arrival time
=

1
Service Process
Mean Service time =

1
We have not really explicitly said it, but the implications
of our earlier description for the arrivals and departures
as t0 is that -
• The arrival process is a Poisson process with
exponentially distributed random inter-arrival times
• The service time is an exponentially distributed
random variable
• The arrival process and the service process are
independent of each other
The state of the queue is defined by defining an appropriate
system state variable
System State at time t = N(t) = Number in the system at t
(waiting and in service)
Let pN(t) = P{system in state N at time t}
Note that, given the initial system state at t=0 (which is
typically assumed to be zero), if we can find pN(t) then we
can actually describe probabilistically how the system will
evolve with time.
By ignoring terms with (t)2 and higher order terms, the
probability of the system state at time t+t may then be
found as -
ttpttpttp   )(]1)[()( 100 N=0 (1.1)
ttpttptttpttp NNNN    )()(]1)[()( 11
N>0 (1.2)
subject to the normalisation condition that 

i
i tp 1)( for all t0
Taking the limits as t0, and subject to the same normalisation, we get
)()(
)(
10
0
tptp
dt
tdp
  N=0 (1.3)
)()()()(
)(
11 tptptp
dt
tdp
NNN
N
   N>0 (1.4)
These equations may be solved with the proper initial conditions
to get the Transient Solution.
If the queue starts with N in the system, then the corresponding
initial condition will be
pi(0)=0 for iN
pN(0)=1 for i=N
For the equilibrium solution, the conditions
invoked are -
0
)(

dt
tdpi
and
pi(t)=pi for i=0, 1, 2…..
For this, defining  =/ erlangs, with <1 for stability, we get
p1=p0
pN+1=(1+)pN - pN-1 = pN = N+1
p0 N1
Applying the Normalization Condition



0
1
i
ip we get
)1(   i
ip i = 0, 1, ……,
as the equilibrium solution for the state distribution when
the arrival and service rates are such that =/ < 1
Note that the equilibrium solution does not depend on the
initial condition but requires that the average arrival rate
must be less than the average service rate
(1.5)
(1.6)
Mean Performance Parameters of the Queue
(a) Mean Number in System, N
(b) Mean Number Waiting in Queue, Nq




 



 1
)1(
00 i
i
i
i iipN












 

 11
)1(
1
)1(
2
0
1
ppiN
i
iq
(1.7)
(1.8)
Mean Performance Parameters of the Queue
(c) Mean Time Spent in System W
This would require the following additional assumptions
• FCFS system though the mean results will hold for any queue
where the server does not idle while there are customers in the
system
• The equilibrium state probability pk will also be the same as the
probability distribution for the number in the system as seen by
an arriving customer (PASTA: Poisson Arrivals See Time Averages)
• The mean residual service time for the customer currently in
service when an arrival occurs will still be 1/
Memory-less Property satisfied only by the exponential
distribution.
Mean Performance Parameters of the Queue (continued)
Using these assumptions, we can write
(d) Mean Time Spent Waiting in Queue Wq
This will obviously be one mean service time less than W
)1(
1)1(
0  


 


k
k
p
k
W
)1(
1


 
WWq
(1.9)
(1.10)
Mean Performance Parameters of the Queue (continued)
Alternatively, Wq may be obtained using the same kind of
arguments as those used to obtain W earlier. This will give
which is the same result as obtained earlier.
(e) P{Arriving customer has to wait for service} = 1-p0 = 
)1(0 

 
 


k
k
q p
k
W
Mean Performance Parameters of the Queue (continued)
(f) Server Utilization “Fraction of time the server is busy”
= P{server is not idle}
=1-p0 = 
The queue we have analyzed is the single server M/M/1/
queue with Poisson arrivals, exponentially distributed service
times and infinite number of buffer positions
The analytical approach given here may actually be applied
for simple queueing situations where -
• The arrival process is Poisson, i.e. the inter-arrival
times are exponentially distributed
• The service times are exponentially distributed
• The arrival process and the service process are
independent of each other
Some other simple queues which may be similarly analyzed,
under the same assumptions -
• Queue with Finite Capacity
• Queue with Multiple Servers
• Queue with Variable Arrival Rates
• Queue with “Balking”
Stochastic Processes
Markov Processes and Markov Chains
Birth Death Processes
•Summary Review
•Needed for easily obtaining Equilibrium Solutions
Stochastic Process X(t)
Process takes on random values, X(t1)=x1,………., X(tn)=xn at
times t1,…….., tn
The random variables x1,…….., xn…. are specified by specifying
their joint distribution.
One can also choose the time points t1,…….., tn …. (where the
process X(t) is examined) in different ways.
Markov Processes
X(t) satisfies the Markov Property (i.e. it has the
memoryless property) if
for any choice of time instants ti, i=1,……, n where tj>tk for
j>k
P{X(tn+1)=xn+1| X(tn)=xn ……. X(t1)=x1}=P{X(tn+1)=xn+1| X(tn)=xn}
Memoryless property as the state of the system at future time
tn+1 is decided only by the system state at the current time tn and
does not depend on the state at earlier time instants t1,…….., tn-1
Restricted versions of the Markov Property lead to -
(a) Markov Chains over a Discrete State Space
(b) Discrete Time and Continuous Time Markov Processes
and Markov Chains
Markov Chain State Space is discrete (e.g. set of non-
negative integers)
Discrete Time State changes are pre-ordained to occur
only at the integer points 0, 1, 2, ......, n
(that is at the time points t0, t1, t2,......, tn)
Continuous Time State changes may occur anywhere in
time
In the analysis of simple queues, the state of the
queue may be represented by a single random
variable X(t) which takes on integer values {i, i=0,
1…..,} at any instant of time.
The corresponding process may be treated as a
Continuous Time Markov Chain since time is
continuous but the state space is discrete
Homogenous Markov Chain
A Homogenous Markov Chain is one where the
transition probability of going from state i to state j,
i.e.
P{Xn+1=j | Xn=i}
is the same regardless of n.
Therefore, the transition probability pij of going from
state i to state j may be written as
pij = P{Xn+1=j | Xn=i} n.
It should be noted that for a Homogenous Markov chain, the
transition probabilities depend only on the terminal states (i.e.
the initial state i and the final state j) but do not depend on
when the transition (i j ) actually occurs.
p
1-p
A
Discrete Time Markov Chain
(Transition from State A)
P{system stays in state A for N time units | given that the
system is currently in state A} = pN
P{system stays in state A for N time units before exiting
from state A} = pN(1-p)
Distribution is Geometric, which is memoryless in nature
1-t
t
A
Continuous Time Markov Chain
Transition from State A
P{system in state A for time T | system currently in
state A}
This is the (1- cdf) of an exponential distribution
Tt
T
et 
   )1(
Distribution is Exponential, which is memoryless in nature
t0
Important Observation
"In a homogenous Markov Chain, the distribution of
time spent in a state is (a) Geometric for discrete
time or (b) Exponential for continuous time"
Semi-Markov Processes
In these processes, the distribution of time spent in
a state can have an arbitrary distribution but the
one-step memory feature of the Markovian property
is retained.
Discrete-Time Markov Chains
The sequence of random variables X1, X2, ..........
forms a Markov Chain if for all n (n=1, 2, ..........) and
all possible values of the random variables, we have
that –
P{Xn=j | X1=i1...........Xn-1=in-1}=P{Xn=j | Xn-1=in-1}
Note that this once again, illustrates the one step
memory of the process
Homogenous Discrete-Time Markov Chain
The homogeneity property additionally implies that the state
transition probability
pij= P{Xn=j | Xn-1=i}
will also be independent of n, i.e. the instant when the
transition actually occurs.
In this case, the state transition probability will only depend
on the value of the initial state and the value of the next
state, regardless of when the transition occurs.
Homogenous Discrete-Time Markov Chain
The homogeneity property also implies that we can define a
m-step state transition probability as follows -


 
k
kj
m
iknmn
m
ij ppiXjXPp )1()(
}|{
where pij
(m) is the probability that the state changes
from state i to state j in m steps.
This may also be written in other ways, though the value
obtained in each case will be the same. For example, we
can also write it as -
m= 2, 3,…...


 
k
m
kjiknmn
m
ij ppiXjXPp )1()(
}|{
m= 2, 3,…...
Irreducible Markov Chain
This is a Markov Chain where every state can be
reached from every other state in a finite number of
steps.
This implies that k exists such that pij
(k) for i, j.
If a Markov Chain is not irreducible, then -
(a) it may have one or more absorbing states which will
be states from which the process cannot move to any of
the other states,
or
(b) it may have a subset of states A from where one
cannot move to states outside A, i.e. in AC
Recurrent Non-null
or Positive Recurrent
if Mj<
Recurrent Null
if Mj=
Recurrent
if fj=1
Transient if fj<1
State j
Classification of States for a Markov Chain




1
)(
n
n
jj ff




1
)(
n
n
jj nfM
fj
(n) = P{system returns to
state j exactly n steps after
leaving state j}
fj = P{system returns to state j some time after leaving state j}
Mj = Mean recurrence time for state j
= Mean number of steps to return to state j after leaving state j
State j is periodic with respect to  ( >1), if the only
possible steps in which state j may occur are , 2, 3 ............
In that case, the recurrence time for state j has period .
State j is said to be aperiodic if =1
A recurrent state is said to be ergodic if it is both positive
recurrent and aperiodic.
An ergodic Markov chain will have all its states as ergodic.
An Aperiodic, Irreducible, Markov Chain with a finite number
of states will always be ergodic.
The states of an Irreducible Markov Chain are either all
transient, or all recurrent null or all recurrent positive. If
the chain is periodic, then all states have the same period .
All states are recurrent positive - in this case a
stationary distribution giving the equilibrium state
probabilities exists and is given by pj=1/Mj j.
In an irreducible, aperiodic, homogenous Markov Chain, the limiting
state probabilities pj=P{state j} always exist and these are
independent of the initial state probability distribution
and
All states are transient, or all states are recurrent
null - in this case, the state probabilities pj’s are zero
for all states and no stationary state distribution will
exist.
either
or
The stationary distribution of the states (i.e. the equilibrium
state probabilities) of an irreducible, aperiodic, homogenous
Markov Chain (which will also be ergodic), may be found by
solving a set of simultaneous linear equations and a normalization
condition.


i
ijij ppp j Balance Equations


i
ip 1 Normalization
Condition
If system has N states, j=0, 1, ….., (N-1), then we need to
solve for p0, p1,….., pN-1 using the Normalization Condition and
any (N-1) equations from the N Balance Equations
Birth-Death Processes
Homogenous, aperiodic, irreducible (discrete-time or
continuous-time) Markov Chain where state changes can
only happen between neighbouring states.
If the current state (at time instant n) is Xn=i, then the state
at the next instant can only be Xn+1 = (i+1), i or (i-1).
Note that states are represented as integer-valued without
loss of generality.
Pure Birth Process
No decrements, only
increments
Pure Death Process
No increments, only
decrements
Continuous Time Birth-Death Markov Chain
Let k be the birth rate in state k
k be the death rate in state k
Then P{state k to state k+1 in time t}=kt
P{state k to state k-1 in time t} =kt
P{state k to state k in time t} = 1- kt - kt
P{other transitions in time t}= 0
t0
System State X(t) = Number in the system at time t
= Total Births - Total Deaths in (0, t)
The initial condition will not matter when we are only
interested in the equilibrium state distribution
k-1
0
1
2
k+1
k
0
1
2
k-1
k
1
2
3
k
k+1
State Transition Diagram for a Birth-Death Process
pk(t) = P{X(t)=k}
= Probability {system in
state k at time t}
The state transitions from time t to t+t will then be
governed by the following equations -







0
1111
11000
1)(
)()(])(1)[()(
)(]1)[()(
k
k
kkkkkkkk
tp
ttpttpttpttp
ttpttpttp


t0







0
1111
1100
0
1)(
)()()()(
)(
)()(
)(
k
k
kkkkkkk
k
tp
tptptp
dt
tdp
tptp
dt
tdp


(2.6)
We can now obtain the equilibrium solutions by setting
i
dt
tdpi
 0
)(
and obtaining the state distribution pi i such that the
normalization condition
is satisfied.




0
1
i
ip
This yields the following equations to be solved for
the state probabilities under equilibrium conditions-
0 p0 = 1 p1 k=0
k-1 pk--1 + k+1 pk+1= (k+k)pk k=1,2,3,……,




0
1
i
ip






 

 
1
0 1
0
k
i i
i
k pp


(2.7)




 


1
1
0 1
0
1
1
k
k
i i
i
p

 (2.8)
The solution is -
Product Form Solution
Instead of writing differential equations, one can obtain the
solution in a simpler fashion by directly considering flow
balance for each state.
(a) Draw the state transition diagram
(b) Draw closed boundaries and equate flows across this
boundary. Any closed boundary may be chosen for
this.
If the closed boundary encloses state k, then we get
Flow entering state k =k-1pk--1 + k+1pk+1= (k+k)pk = Flow
leaving state k
as the desired equation for state k.
(c) Solve the equations in (b) along with the normalization
condition to get the equilibrium state distribution.
Global Balance
Equation for
state k
k
It would be even simpler in this
case to consider a closed boundary
which is actually closed at infinity
kk-1
The solution for this will be the same as that obtained earlier
This would lead to the following equation
Flow from state k-1 to k = Flow from state k to k-1
k-1pk--1=kpk
Detailed
Balance
Equation
In general, the equations expressing flow balance
in a Birth-Death Chain of this type will be -
  

ji ji
jijiji pppp
jijiji pppp 
Global Balance Equations
Closed boundary encircling each
state j
Detailed Balance Equations
Equates flows between states i and
j, in a pair-wise fashion.
Boundary between states i and j,
closed at + and -
Conditions for Existence of Solution for
Birth-Death Chain
 



 







0
1
0 1k
k
i i
i








 

0
1
0 1
1
k
k
i i
i
k




(a) All states are transient, if
and only if  =,  <
(b) All states recurrent null, if
and only if  =,  =
(c) All states ergodic, if and
only if  <,  =
Equilibrium State Distribution will
exist only for the case where all the
states are ergodic and hence, the chain
itself is also ergodic
Analyzing M/M/-/- Type Queues
(under equilibrium conditions)
Kendall’s Notation for Queues
Shorthand notation where A, B, C, D, E describe the
queue
Applicable to a large number of simple queueing scenarios
A/B/C/D/E
A Inter-arrival time distribution
B Service time distribution
C Number of servers
D Maximum number of jobs that can be there
in the system (waiting and in service)
Default  for infinite number of waiting
positions
E Queueing Discipline (FCFS, LCFS, SIRO
etc.), Default is FCFS
M exponential
D deterministic
Ek Erlangian (order k)
G general
M/M/1 or M/M/1/ Single server queue with Poisson
arrivals, exponentially distributed service times and
infinite number of waiting positions
Kendall’s Notation for Queues A/B/C/D/E
Little’s Result
N=W (2.9)
Nq=Wq (2.10)
Result holds in general for virtually all types of
queueing situations where 
 = Mean arrival rate of jobs that actually enter the
system
Jobs blocked and refused entry into the system will
not be counted in 
Time t
Numberofcustomers
(arrivals/departures)
(t), Arrivals in (0,t)
(t), Departures in (0,t)
N
(t
)
increments by
one
Graphical Illustration/Verification of Little's Result
Little’s Result
Consider the time interval (0,t) where t is large, i.e.
t
 
t
dttt
0
)]()([ Area(t) = area between (t) and (t) at time t =
Average Time W spent in system =
)(
)(
lim
t
tArea
t


Average Number N in system =
)(
)()(
lim
)(
lim
t
tArea
t
t
t
tArea
tt


 
Therefore, N=W
t
t
t
)(
lim

 Since,
Little’s Result
The PASTA Property
“Poisson Arrivals See Time Averages”
pk(t) =P{system is in state k at time t }
qk(t) =P{an arrival at time t finds the system in state k}
N(t) be the actual number in the system at time t
A(t, t+t) be the event of an arrival in the time interval (t, t+t)
 
   
 
)(
,(
)(|)(|,(
lim
,(|)(lim)(
0
0
tp
tttAP
ktNPktNtttAP
tttAktNPtq
kt
tk






Then
because P{A(t, t+t)|N(t) = k} = P{A(t, t+t)}
Equilibrium Solutions for M/M/-/- Queues
Method 1: Obtain the differential-difference equations.
Solve these under equilibrium conditions along with the
normalization condition.
Method 2: Directly write the flow balance equations for
proper choice of closed boundaries as illustrated and solve
these along with the normalization condition.
Method 3: Identify the parameters of the birth-death
Markov chain for the queue and directly use equations (2.7)
and (2.8) .
In the following, we have used this approach. However,
Method 2 is also interesting and should be tried as it allows
various complicated models to be easily analyzed.
M/M/1 (or M/M/1/ ) Queue
(Single Server Queue with Infinite Buffer)
,.......3,2,1
00



k
k
k
k
k



k
k
k ppp 


00 






)1(0 p
For  <1




 



 1
)1(
00 i
i
i
i iipN
)1(
1
 

N
W
Using
Little’s
Result
)1(
1


 
WWq
)1(
2




 qq WN
Using
Little’s
Result
M/M/1/ Queue with Discouraged Arrivals
,.......3,2,1
00
1





k
k
k
k
k
k




For  = / < 












1
0
00
!
1
)1(
k
i
k
k
k
p
i
pp




)exp(0


p
(2.14)
(2.15)


 

0k
kkpN 









0
)exp(1
k
kkeff p



Effective Arrival
Rate







)exp(12




eff
N
W Little’s
Result
In this case, PASTA is not applicable as the overall arrival process
is not Poisson
r = P{arriving customer sees r in system
(before joining the system)}
Let E be the event of an arrival in (t, t+t)
Ei is the event of the system being in state i









0
}|{}{
}|{}{
}{
}|{}{
}|{
i
ii
rrrr
rr
EEPEP
EEPEP
EP
EEPEP
EEP
!
1
}{ /
i
epEP
i
ii 





 


1
}|{



i
t
EEP i















 





 /
/1
1)!1(
1
e
e
r
r
r 







0
/2
)1(
1
k
k
e
k
W 




M/M/1/ Queue with Discouraged Arrivals
M/M/m/ Queue
(m servers, infinite number of waiting positions)
kk  
mkm
mkkk



 )1(0
For  = / < m
mkfor
mm
p
mkfor
k
pp
mk
k
k
k



!
!
0
0


1
1
0
0
)(!!












 
m
k
mk
mm
m
k
p


(2.16)
(2.17)


 

mk
m
k
mm
m
pmCp
)(!
),( 0


 (2.18)P{queueing} =
Erlang’s
C-Formula
M/M/m/m Queue
(m server loss system, no waiting)
)(0 ConditionLossorBlockingotherwise
mkk

 
otherwise
mkkk
0
0

 
otherwise
mkfor
k
pp
k
k
0
!
0




 m
k
k
k
p
0
0
!
1

(2.19)
(2.20)
For




Simple model for a telephone exchange where a line is
given only if one is available; otherwise the call is lost
Blocking Probability B(m,) = P{an arrival finds all servers
busy and leaves without service}
!
),( 0
m
pmB
m

  Erlang’s B-Formula (2.21)
1),0( B
m
mB
m
mB
mB
),1(
1
),1(
),(






 (2.22)
M/M/m/m Queue
(m server loss system, no waiting)
M/M/1/K Queue
(single server queue with K-1 waiting positions)
)(0 ConditionLossorBlockingotherwise
Kkk

 
otherwise
Kkk
0
 
otherwise
Kkforpp k
k
0
0

 
)1(
)1(
10 


 K
p


(2.23)
(2.24)
For




M/M/1/-/K Queue
(single server, infinite number of waiting positions, finite customer
population K )
otherwise
Kkk
0
 
)(0
)(
ConditionLossorBlockingotherwise
KkkKk

 
(2.25)
(2.26)
)!(
!
0
kK
K
pp k
k

 
 
 K
k
k
kK
K
p
0
0
)!(
!
1

k=1,.….,K
For




Departure Process from a M/M/m/ Queue
Q3
Q1
Q2 Q4
p
1-p
p

(1-p)
p
p
(1-p)
Knowledge of the nature
of the departure
process from a queue
would be useful as we
can then use it to
analyze simple cases of
queueing networks as
shown.
The key result here is that the departure process from a
M/M/m/ queue is also Poisson with the same rate as the
arrival rate entering the queue. (Burke’s Theorem)
It should also be noted that the result of randomly splitting
or combining independent Poisson processes also yields a
Poisson process. (Useful in analyzing queueing networks)
How can we handle queues where the service
time distribution is not exponential?
[A] If we can express the actual service time as
combinations of exponentially distributed time
intervals, then the Method of Stages may be used.
(Section 2.9)
[B] The M/G/1 queue and its variations may be
analyzed.
[C] Approximation methods may be used if the mean
and variance of the service time are given. ( e.g. A
GI/G/m approximation)
Method of Stages
Consider a M/-/1/ example where
the actual service time is the sum of
two random variables, each of which
is exponentially distributed.

Stage 1
1/1
Stage 2
1/2
State of the system represented as (n, j) where n is the total
number of customers in the system where the customer currently
being served is at Stage j, n=0,1,......,, j=1, 2
State (0,0) represents the state when the system is empty
(1, 1)(0,0) (2, 1)
(1, 2) (2, 2)
 

1
1
2
2
State Transition
Diagram of the
System
.......
)(
)(
)(
)(
21112222
32211211
111122
22200111
12200
etc
ppp
ppp
pp
ppp
pp










(2.38)Balance Equations
for the System
These Balance Equations may be solved along with the
appropriate Normalization Condition to obtain the state
probabilities of the system.
Once these are known, performance parameters of the
queue may be appropriately evaluated.
Method of Stages
The method illustrated for the M/-/1/ example may be
extended for the following types systems.
1. Have k stages of service times - more rows in the state
transition diagram
2. Finite Number of Waiting Positions in the Queue - make
the arrival rate a function of the number in the system and
make it go to zero once all the waiting positions have been
filled
3. Multiple Servers - approximate this by allowing more
than one job to enter service at a time
4. More General Service Time Distributions - see next slide
Method of Stages
For more general service time distributions, the Method of
Stages may be used if the Laplace Transform of the pdf
of the service time may be represented as a rational
function of s, LB(s)=N(s)/D(s), with simple roots.
Stage 1
1
Entry
1
2
1-1 1-2
Stage 1
1
Exit
 



j
i i
i
jj
j
B
s
sL
1
111 )1(......)1()(



With multiple stages like this, the
L.T. of the service time pdf will
be of the form -
 

i i
i
B
s
sL


0)(
This leads to -
Method of Stages
Given a service time pdf as LB(s)=N(s)/D(s) with simple
roots -
1. Obtain the multiple stage representation in the form
shown earlier
2. Draw the corresponding state transition diagram and
identify the flows between the various states
3. Write and solve the flow balance equations along with
the normalization condition to obtain the state
probabilities
4. Use the state probabilities to obtain the required
performance parameters
Method of Stages
Some Examples of Service Time
Distributions

1
2
Service Facility
Buffer
0.5
0.5

))((
)(5.0
)(
21
2121





ss
s
sLB
Stage 1
1/
Stage 2
1/
0.5
0.5
2
2
)(
5.05.0
)(








ss
sLB
Queues with Bulk (or Batch) Arrivals
• Batches arriving as a Poisson process with exponentially
distributed inter-arrival times between batches
• Batch size = Number of jobs in a batch (random variable)
M[X] Poisson Batch Arrival Process
 = Average Batch Arrival
Rate
r = P{r jobs in a batch} r=1,2,….




1
)(
r
r
r zz 




1r
rr
The M[X]/M/1 Queue
010  kforpp 
1)(
1
0
1  


 kforppp
k
i
iikkk 
Balance
Equations
Though these may be solved in the standard
fashion, we will consider a solution approach for
directly obtaining P(z), the Generating Function for
the number in the system. For this, we would need
to multiply the kth equation above by zk and sum
from k=1 to k=.




0
)(
n
n
n zpzP
 












1 1
1
0
1
1
1
)(
k k
k
i
k
iki
k
k
k
k
k zpzp
z
zp 


)](1[)1(
)1(
)(
)()(])([])()[(
0
100
zzz
zp
zP
zzPzppzP
z
pzP








Simplifying,
we get
Note that, P(1)=1 is effectively the same as the Normalization
Condition. Using this, we get -
10p


 Define as the offered traffic
)](1[)1(
)1)(1(
)(
zzz
z
zP




Therefore (2.42)
We can invert P(z) or expand it as a power series in zi i=0,1,… to
get the state probability distribution. The mean number N in
the system may be directly calculated from P(z) as -
)1(2
)()( 2
0 




zdz
zdP
N (2.43)
The M[X]/-/-/K Queue
Batch Arrival Queue with Finite Capacity
For operating queues of this type, one must also specify the batch
acceptance strategy to be followed if a batch of size k or more
arrrives in a system where the number of waiting positions available is
less than k.
Partial Batch
Acceptance Strategy
(PBAS)
Randomly choose as many
jobs from the batch as
may be accommodated in
the buffer
Whole Batch
Acceptance Strategy
(WBAS)
Accept the batch only if
all its jobs may be
accommodated;
otherwise, reject all
jobs of the batch
P1 2
Class 1
jobs
Class P
jobs
P Priority Classes
Class P Highest Priority Class
Class 1 Lowest Priority Class
Head of Line (HOL) Priority Operation of M/G/1 Queue
Priority Operation of an M/G/1 Queue
Open and Closed Networks
of
M/M/m Type Queues
(Jackson’s Theorem for Open and Closed
Networks)
p1
Poisson Process
Average Rate 
Poisson
Rate p1
pj
pN
Poisson
Rate pj
Poisson
Rate pN
Splitting a Poisson process probabilistically (as in
random, probabilistic routing) leads to processes
which are also Poisson in nature.


N
i
ip
1
1
1-p
p
Routing Probabilities are p and (1-p)
 
p p
(1-p) (1-p)
Q1
Q2
Q3
Under equilibrium
conditions, average flow
leaving the queue will
equal the average flow
entering the queue.
For M/M/m/ queues at equilibrium, Burke’s Theorem assures us
that the departure process of jobs from the network will also be
Poisson. From flow balance, the average flow rate leaving the queue
will also be the same as the average flow rate entering the queue.
Poisson Process
Average Rate 1
Poisson Process
Average Rate 2
Poisson Process
Average Rate 1+2
Combining independent Poisson processes leads to a
process which will also be Poisson in nature.
Q1
Q2
Q3
Q4
0.4
0.4
0.2
0.4
0.6
1
2
Example:
An Acyclic
(Feedforward)
Network of
M/M/m Queues
External arrivals with rates 1
and 2 from Poisson processes
Probabilistic routing with the
routing probabilities as shown
• Applying flow balance to each queue, we get
Q1 = Average job arrival rate for Q1 = 1
Q2 = Average job arrival rate for Q2 = 0.41+2
Q3 = Average job arrival rate for Q3 = 0.41
Q4 = Average job arrival rate for Q4 = 0.841+2
• Burke’s Theorem and the earlier quoted results on splitting and
combining of Poisson processes imply that, under equilibrium
conditions, the arrival process to each queue will be Poisson.
• Given the mean service times at each queue and using the
standard results for M/M/m queues, we can then find the
individual state probability distribution for each of the queues
• This process may be done for any system of M/M/m queues as
long as there are no feedback connections between the queues
• It should be noted that this analysis can only give us the state
distributions for each of the individual queues but cannot really
say what will be the joint state distribution of the number of
jobs in all the queues of the network.
• Jackson’s Theorem, presented subsequently, is needed to get
the joint state distribution. This gives the simple, and elegant
result that -
)()()()(),,,( 443322114321 npnpnpnpnnnnP QQQQ
Product Form Solution for
Joint State Distribution of
the Queueing Network
Jackson’s Theorem for Open Networks
• Jackson’s Theorem is applicable to a Jackson Network.
This is an arbitrary open network of M/M/m queues where
jobs arrive from a Poisson process to one or more nodes and
are probabilistically routed from one queue to another until
they eventually depart from the system.
The departures may also happen from one or more queues
The M/M/m nodes are sometimes referred to as Jackson
Servers
• Jackson’s Theorem states that provided the arrival rate at each
queue is such that equilibrium exists, the probability of the
overall system state (n1…….nK) for K queues will be given by the
product-form expression


K
i
iQiK npnnP
1
1 )(),......,(
Jackson Network: Network of K (M/M/m) queues,
arbitrarily connected
External Arrival to Qi : Poisson process with average rate i
At least one queue Qi must be such that i  0. Note that j  0
if there are no external arrivals to Qj. This is because we are
considering an Open Network. (Closed Networks are considered
later).
Routing Probabilities: pij = P{a job served at Qi is routed to Qj}








 
K
j
ijp
1
1 = P{a job served at Qi exits from the network}
Arrival Process of Jobs to Qi
= [External Arrivals, if any, to Qi]


K
j 1
Jobs which finish service at Qj and are then
routed to Qi for the next stage of service
Let i = Average Arrival Rate of Jobs to Qi {external and rerouted}
Given the external arrival rates to each of the K queues in the
system and the routing probabilities from each queue to another,
the effective job arrival rate to each queue (at equilibrium) may
be obtained by solving the flow balance equations for the
network.
Flow Balance Conditions at Equilibrium imply that -


K
i
ijijj p
1
 for j=1,….., K (5.2)
• For an Open Network, at least one of the j’s will be non-zero
(positive)
• The set of K equations in (5.2) can therefore be solved to find
the effective job arrival rate to each of the K queues, under
equilibrium conditions.
• The network will be at equilibrium if each of the K queues are
at equilibrium. This can happen only if the effective traffic
offered to each queue is less than the number of servers in the
queue. i.e. j =  j /j < mj j=1,….., K where mj is the number of
servers in Qj.
For a network of this type with M/M/m/ queues (i.e. Jackson
Servers) at each node, Jackson's Theorem states that provided
the arrival rate at each queue is such that equilibrium exists,
the probability of the overall system state (n1,......., nK) will be -


K
j
jjK npnnPnP
1
1 )(),......,()~( (5.4)
with pj(nj)=P{nj customers in Qj}
This individual queue state probability may be found by
considering the M/M/m/ queue at node j in isolation with its
total average arrival rate j, its mean service time 1/j and the
corresponding results for the steady state M/M/m/ queue.
Stability requirement for the existence of the solution of (5.4)
is that -
For each queue Qj j=1,….., K in the network, the traffic offered
should be such that
j
j
j
j m









where mj is the number of servers in the M/M/m/ queue
at Qj
Implications of Jackson’s Theorem
• Once flow balance has been solved, the individual queues may be
considered in isolation.
• The queues behave as if they are independent of each other (even
though they really are not independent of each other) and the joint
state distribution may be obtained as the continued product of the
individual state distributions (product-form solution)
• The flows entering the individual queues behave as if they are
Poisson, even though they may not really be Poisson in nature (i.e. if
there is feedback in the network).
Note that Jackson’s Theorem does require the external arrival
processes to be Poisson processes and the service times at each
queue to be exponentially distributed in nature with their
respective, individual means.
Performance Measures
Total Throughput = 

K
j
j
1
 (5.5)
Average traffic load at node j (i.e. Qj) =
j
j
j


  (5.6)
Visit Count to node j =

 j
jV  (5.7)
These may also be obtained by directly solving the
following K linear equations -




K
i
iji
j
j pVV
1
j =1,……, K (5.8)
Scaled Flow Balance Equations
Average number of jobs at node j = 



0
)(
k
jj kkpN (5.9)
Average number of jobs in system = 

K
j
jNN
1
(5.10)
Interpretation of the Visit Ratio Vj : Average number of times a
job will visit Qj every time it actually enters the (open) queueing
network.
Mean Sojourn Time (W): The mean total time spent in the system
by a job before it leaves the network.


K
j
jNN
W
1 
(5.11)
Copyright 2013, Sanjay K. Bose 97
Example: Open Jackson Network
Q1
M/M/1
Q2
M/M/1
 1 1
=1p1
2
2
p1
2 =1p2
p2
p1+p2=1
Service Rate of Q1=1
Service Rate of Q2=2
1
1
p

 
1
1
2
)1(
p
p



11
1
p

 
12
1
2
)1(
p
p





)1()1(),( 221121
21
  nn
nnP
1
1
1
1 


N
2
2
2
1 


N
Mean Number
in the Queues
)1()1( 2
2
1
1




 



N
WMean Sojourn Time
Copyright 2013, Sanjay K. Bose 98
Example
Q1
M/M/1
r
2r
2

p
1-p
p
p
1-2p
1
2
Q2
M/M/1
pprpr 21221 )1(2)21(  
)1(2
)53(
1
pp
pr



)1(2
)3(
2
pp
pr



)1(4
)53(
1
pp
pr





)1(2
)3(
2
pp
pr





21
212121 )1)(1(),( nn
nnP  
)1(6
53
1
pp
p
V



Joint Probability
)1(6
3
2
pp
p
V



Visit
Ratios
1
1
1
1 


N
2
2
2
1 


N
2
2
1
1
11 






N
Mean Number in Q1, Q2 and in the
system
Mean Sojourn Time W
r
N
3

Copyright 2013, Sanjay K. Bose 99
Example
Q1
M/M/1

0.2
0.2
0.2
0.2
0.2
0.4
0.4
0.6
0.6
Q4
M/M/1
Q2
M/M/1
Q3
M/M/1













3214
132
132
6.06.02.0
4.0
2.02.0



)8095.0,4762.0,4762.0,1905.1(
),,,(
~
4321




)6190.1,9524.0,9524.0,1905.1(
),,,(~
0000
4321




4321
4214
2
214321 )1()1)(1(),,,( nnnn
nnnnP  

 4321 ,,,0 nnnn
1
1
1
1 


N
2
2
32
1 


 NN
4
4
4
1 


N
Note that as λ increases,
system eventually becomes
unstable because
This, therefore, implies that
ρ0<0.6176 or λ<0.6176μ for
the queueing network to be
stable.
for
14 
1 2 3 41 0.5      
When does the Product-Form Solution hold?
The product-form expression for the joint
state probabilities hold for any open or
closed queueing network where local
balance conditions are satisfied.
Specifically, open or closed networks with the following types
of queues will have a product-form solution -
1. FCFS queue with exponential service times
2. LCFS queues with Coxian service times
3. Processor Sharing (PS) queues with Coxian service times
4. Infinite Server (IS) queues with Coxian service times
A Coxian service time has a distribution of the following type -
 

 

i
j j
j
ii
L
i
B
s
sL
1
12
1
11 .....)(



ii  1with for Li 1 and 11 L

Contenu connexe

Tendances

Uncertain Knowledge and Reasoning in Artificial Intelligence
Uncertain Knowledge and Reasoning in Artificial IntelligenceUncertain Knowledge and Reasoning in Artificial Intelligence
Uncertain Knowledge and Reasoning in Artificial IntelligenceExperfy
 
Neural Networks: Radial Bases Functions (RBF)
Neural Networks: Radial Bases Functions (RBF)Neural Networks: Radial Bases Functions (RBF)
Neural Networks: Radial Bases Functions (RBF)Mostafa G. M. Mostafa
 
Knowledge Engineering in FOL.
Knowledge Engineering in FOL.Knowledge Engineering in FOL.
Knowledge Engineering in FOL.Megha Sharma
 
Lesson 7: Vector-valued functions
Lesson 7: Vector-valued functionsLesson 7: Vector-valued functions
Lesson 7: Vector-valued functionsMatthew Leingang
 
Computer Networks Unit 2 UNIT II DATA-LINK LAYER & MEDIA ACCESS
Computer Networks Unit 2 UNIT II DATA-LINK LAYER & MEDIA ACCESSComputer Networks Unit 2 UNIT II DATA-LINK LAYER & MEDIA ACCESS
Computer Networks Unit 2 UNIT II DATA-LINK LAYER & MEDIA ACCESSDr. SELVAGANESAN S
 
2.3 bayesian classification
2.3 bayesian classification2.3 bayesian classification
2.3 bayesian classificationKrish_ver2
 
Fuzzy Set Theory
Fuzzy Set TheoryFuzzy Set Theory
Fuzzy Set TheoryAMIT KUMAR
 
Mathematical foundations of computer science
Mathematical foundations of computer scienceMathematical foundations of computer science
Mathematical foundations of computer scienceBindhuBhargaviTalasi
 
Machine Learning 3 - Decision Tree Learning
Machine Learning 3 - Decision Tree LearningMachine Learning 3 - Decision Tree Learning
Machine Learning 3 - Decision Tree Learningbutest
 
Fuzzy Logic ppt
Fuzzy Logic pptFuzzy Logic ppt
Fuzzy Logic pptRitu Bafna
 
Adaline madaline
Adaline madalineAdaline madaline
Adaline madalineNagarajan
 
Syntax and semantics of propositional logic
Syntax and semantics of propositional logicSyntax and semantics of propositional logic
Syntax and semantics of propositional logicJanet Stemwedel
 
Probabilistic Reasoning
Probabilistic ReasoningProbabilistic Reasoning
Probabilistic ReasoningJunya Tanaka
 

Tendances (20)

Uncertain Knowledge and Reasoning in Artificial Intelligence
Uncertain Knowledge and Reasoning in Artificial IntelligenceUncertain Knowledge and Reasoning in Artificial Intelligence
Uncertain Knowledge and Reasoning in Artificial Intelligence
 
Neural Networks: Radial Bases Functions (RBF)
Neural Networks: Radial Bases Functions (RBF)Neural Networks: Radial Bases Functions (RBF)
Neural Networks: Radial Bases Functions (RBF)
 
Knowledge Engineering in FOL.
Knowledge Engineering in FOL.Knowledge Engineering in FOL.
Knowledge Engineering in FOL.
 
Lesson 7: Vector-valued functions
Lesson 7: Vector-valued functionsLesson 7: Vector-valued functions
Lesson 7: Vector-valued functions
 
Computer Networks Unit 2 UNIT II DATA-LINK LAYER & MEDIA ACCESS
Computer Networks Unit 2 UNIT II DATA-LINK LAYER & MEDIA ACCESSComputer Networks Unit 2 UNIT II DATA-LINK LAYER & MEDIA ACCESS
Computer Networks Unit 2 UNIT II DATA-LINK LAYER & MEDIA ACCESS
 
2.3 bayesian classification
2.3 bayesian classification2.3 bayesian classification
2.3 bayesian classification
 
Fuzzy Set Theory
Fuzzy Set TheoryFuzzy Set Theory
Fuzzy Set Theory
 
Fuzzy Set
Fuzzy SetFuzzy Set
Fuzzy Set
 
AI Lecture 7 (uncertainty)
AI Lecture 7 (uncertainty)AI Lecture 7 (uncertainty)
AI Lecture 7 (uncertainty)
 
First order logic
First order logicFirst order logic
First order logic
 
Mathematical foundations of computer science
Mathematical foundations of computer scienceMathematical foundations of computer science
Mathematical foundations of computer science
 
Machine Learning 3 - Decision Tree Learning
Machine Learning 3 - Decision Tree LearningMachine Learning 3 - Decision Tree Learning
Machine Learning 3 - Decision Tree Learning
 
Fuzzy Logic ppt
Fuzzy Logic pptFuzzy Logic ppt
Fuzzy Logic ppt
 
Adaline madaline
Adaline madalineAdaline madaline
Adaline madaline
 
Ontology engineering
Ontology engineering Ontology engineering
Ontology engineering
 
Fuzzy arithmetic
Fuzzy arithmeticFuzzy arithmetic
Fuzzy arithmetic
 
Syntax and semantics of propositional logic
Syntax and semantics of propositional logicSyntax and semantics of propositional logic
Syntax and semantics of propositional logic
 
AI Lecture 3 (solving problems by searching)
AI Lecture 3 (solving problems by searching)AI Lecture 3 (solving problems by searching)
AI Lecture 3 (solving problems by searching)
 
Probabilistic Reasoning
Probabilistic ReasoningProbabilistic Reasoning
Probabilistic Reasoning
 
Defuzzification
DefuzzificationDefuzzification
Defuzzification
 

En vedette

Open and closed queueing network
Open and closed queueing networkOpen and closed queueing network
Open and closed queueing networkFahmida Afrin
 
Queuing theory
Queuing theoryQueuing theory
Queuing theoryAmit Sinha
 
Queuing Theory - Operation Research
Queuing Theory - Operation ResearchQueuing Theory - Operation Research
Queuing Theory - Operation ResearchManmohan Anand
 
MLPI Lecture 2: Monte Carlo Methods (Basics)
MLPI Lecture 2: Monte Carlo Methods (Basics)MLPI Lecture 2: Monte Carlo Methods (Basics)
MLPI Lecture 2: Monte Carlo Methods (Basics)Dahua Lin
 
Inventory models
Inventory modelsInventory models
Inventory modelsJavi Dela
 
basics of stochastic and queueing theory
basics of stochastic and queueing theorybasics of stochastic and queueing theory
basics of stochastic and queueing theoryjyoti daddarwal
 
Queuing theory and simulation (MSOR)
Queuing theory and simulation (MSOR)Queuing theory and simulation (MSOR)
Queuing theory and simulation (MSOR)snket
 
Queuing theory and traffic flow analysis
Queuing theory and traffic flow analysisQueuing theory and traffic flow analysis
Queuing theory and traffic flow analysisReymond Dy
 
Inventory models with two supply models
Inventory models with two supply modelsInventory models with two supply models
Inventory models with two supply modelsMOHAMMED ASIF
 
QUEUING THEORY
QUEUING THEORYQUEUING THEORY
QUEUING THEORYavtarsingh
 

En vedette (15)

Open and closed queueing network
Open and closed queueing networkOpen and closed queueing network
Open and closed queueing network
 
Queuing theory
Queuing theoryQueuing theory
Queuing theory
 
Queuing Theory - Operation Research
Queuing Theory - Operation ResearchQueuing Theory - Operation Research
Queuing Theory - Operation Research
 
MLPI Lecture 2: Monte Carlo Methods (Basics)
MLPI Lecture 2: Monte Carlo Methods (Basics)MLPI Lecture 2: Monte Carlo Methods (Basics)
MLPI Lecture 2: Monte Carlo Methods (Basics)
 
Queueing notes
Queueing notesQueueing notes
Queueing notes
 
Inventory models
Inventory modelsInventory models
Inventory models
 
Queuing theory
Queuing theoryQueuing theory
Queuing theory
 
basics of stochastic and queueing theory
basics of stochastic and queueing theorybasics of stochastic and queueing theory
basics of stochastic and queueing theory
 
Queuing theory and simulation (MSOR)
Queuing theory and simulation (MSOR)Queuing theory and simulation (MSOR)
Queuing theory and simulation (MSOR)
 
Queuing theory and traffic flow analysis
Queuing theory and traffic flow analysisQueuing theory and traffic flow analysis
Queuing theory and traffic flow analysis
 
Inventory models with two supply models
Inventory models with two supply modelsInventory models with two supply models
Inventory models with two supply models
 
Queueing theory
Queueing theoryQueueing theory
Queueing theory
 
QUEUING THEORY
QUEUING THEORYQUEUING THEORY
QUEUING THEORY
 
Heizer 01
Heizer 01Heizer 01
Heizer 01
 
Queuing theory
Queuing theoryQueuing theory
Queuing theory
 

Similaire à Lecture set 6

Simple queuingmodelspdf
Simple queuingmodelspdfSimple queuingmodelspdf
Simple queuingmodelspdfAnkit Katiyar
 
International Journal of Engineering Research and Development
International Journal of Engineering Research and DevelopmentInternational Journal of Engineering Research and Development
International Journal of Engineering Research and DevelopmentIJERD Editor
 
Stat 2153 Introduction to Queiueng Theory
Stat 2153 Introduction to Queiueng TheoryStat 2153 Introduction to Queiueng Theory
Stat 2153 Introduction to Queiueng TheoryKhulna University
 
Lecture-2-01-02-2022.pdf
Lecture-2-01-02-2022.pdfLecture-2-01-02-2022.pdf
Lecture-2-01-02-2022.pdfZakria Bilal
 
Self-adaptive container monitoring with performance-aware Load-Shedding policies
Self-adaptive container monitoring with performance-aware Load-Shedding policiesSelf-adaptive container monitoring with performance-aware Load-Shedding policies
Self-adaptive container monitoring with performance-aware Load-Shedding policiesNECST Lab @ Politecnico di Milano
 
Time dependent solution of batch arrival queue
Time dependent solution of batch arrival queueTime dependent solution of batch arrival queue
Time dependent solution of batch arrival queueAlexander Decker
 
Analysis of single server fixed batch service queueing system under multiple ...
Analysis of single server fixed batch service queueing system under multiple ...Analysis of single server fixed batch service queueing system under multiple ...
Analysis of single server fixed batch service queueing system under multiple ...Alexander Decker
 
Queing theory and delay analysis
Queing theory and delay analysisQueing theory and delay analysis
Queing theory and delay analysisPriyanka Negi
 
Queuing theory and traffic analysis in depth
Queuing theory and traffic analysis in depthQueuing theory and traffic analysis in depth
Queuing theory and traffic analysis in depthIdcIdk1
 
Order of instruments.ppt
Order of instruments.pptOrder of instruments.ppt
Order of instruments.pptANURUPAa
 

Similaire à Lecture set 6 (20)

Simple queuingmodelspdf
Simple queuingmodelspdfSimple queuingmodelspdf
Simple queuingmodelspdf
 
Queueing theory
Queueing theoryQueueing theory
Queueing theory
 
International Journal of Engineering Research and Development
International Journal of Engineering Research and DevelopmentInternational Journal of Engineering Research and Development
International Journal of Engineering Research and Development
 
Stat 2153 Introduction to Queiueng Theory
Stat 2153 Introduction to Queiueng TheoryStat 2153 Introduction to Queiueng Theory
Stat 2153 Introduction to Queiueng Theory
 
14 queuing
14 queuing14 queuing
14 queuing
 
Lecture-2-01-02-2022.pdf
Lecture-2-01-02-2022.pdfLecture-2-01-02-2022.pdf
Lecture-2-01-02-2022.pdf
 
Queue
QueueQueue
Queue
 
Unit V - Queuing Theory
Unit V - Queuing TheoryUnit V - Queuing Theory
Unit V - Queuing Theory
 
Self-adaptive container monitoring with performance-aware Load-Shedding policies
Self-adaptive container monitoring with performance-aware Load-Shedding policiesSelf-adaptive container monitoring with performance-aware Load-Shedding policies
Self-adaptive container monitoring with performance-aware Load-Shedding policies
 
Ijetr021226
Ijetr021226Ijetr021226
Ijetr021226
 
5 2020 04_06!09_40_10_pm
5 2020 04_06!09_40_10_pm5 2020 04_06!09_40_10_pm
5 2020 04_06!09_40_10_pm
 
Time dependent solution of batch arrival queue
Time dependent solution of batch arrival queueTime dependent solution of batch arrival queue
Time dependent solution of batch arrival queue
 
Analysis of single server fixed batch service queueing system under multiple ...
Analysis of single server fixed batch service queueing system under multiple ...Analysis of single server fixed batch service queueing system under multiple ...
Analysis of single server fixed batch service queueing system under multiple ...
 
Queuing theory
Queuing theoryQueuing theory
Queuing theory
 
Queing theory and delay analysis
Queing theory and delay analysisQueing theory and delay analysis
Queing theory and delay analysis
 
Queuing theory and traffic analysis in depth
Queuing theory and traffic analysis in depthQueuing theory and traffic analysis in depth
Queuing theory and traffic analysis in depth
 
Time domain analysis
Time domain analysisTime domain analysis
Time domain analysis
 
Sample final report
Sample final reportSample final report
Sample final report
 
Order of instruments.ppt
Order of instruments.pptOrder of instruments.ppt
Order of instruments.ppt
 
HIGH SPEED NETWORKS
HIGH SPEED NETWORKSHIGH SPEED NETWORKS
HIGH SPEED NETWORKS
 

Plus de Gopi Saiteja

Plus de Gopi Saiteja (20)

Trees gt(1)
Trees gt(1)Trees gt(1)
Trees gt(1)
 
Topic11 sortingandsearching
Topic11 sortingandsearchingTopic11 sortingandsearching
Topic11 sortingandsearching
 
Heapsort
HeapsortHeapsort
Heapsort
 
Hashing gt1
Hashing gt1Hashing gt1
Hashing gt1
 
Ee693 sept2014quizgt2
Ee693 sept2014quizgt2Ee693 sept2014quizgt2
Ee693 sept2014quizgt2
 
Ee693 sept2014quizgt1
Ee693 sept2014quizgt1Ee693 sept2014quizgt1
Ee693 sept2014quizgt1
 
Ee693 sept2014quiz1
Ee693 sept2014quiz1Ee693 sept2014quiz1
Ee693 sept2014quiz1
 
Ee693 sept2014midsem
Ee693 sept2014midsemEe693 sept2014midsem
Ee693 sept2014midsem
 
Ee693 questionshomework
Ee693 questionshomeworkEe693 questionshomework
Ee693 questionshomework
 
Dynamic programming
Dynamic programmingDynamic programming
Dynamic programming
 
Cs105 l15-bucket radix
Cs105 l15-bucket radixCs105 l15-bucket radix
Cs105 l15-bucket radix
 
Chapter11 sorting algorithmsefficiency
Chapter11 sorting algorithmsefficiencyChapter11 sorting algorithmsefficiency
Chapter11 sorting algorithmsefficiency
 
Answers withexplanations
Answers withexplanationsAnswers withexplanations
Answers withexplanations
 
Sorting
SortingSorting
Sorting
 
Solution(1)
Solution(1)Solution(1)
Solution(1)
 
Pthread
PthreadPthread
Pthread
 
Open mp
Open mpOpen mp
Open mp
 
Introduction
IntroductionIntroduction
Introduction
 
Cuda
CudaCuda
Cuda
 
Vector space interpretation_of_random_variables
Vector space interpretation_of_random_variablesVector space interpretation_of_random_variables
Vector space interpretation_of_random_variables
 

Lecture set 6

  • 1. Communication Networks Sanjay K. Bose Lecture Set VI Queuing Theory
  • 2. Model of a Queue Arrivals Departures Waiting Position s Server(s) A “Queue” is basically a model of a node providing service where arrivals come at possibly random times and ask for service of possibly random length from the one or more servers that may be present in the queue. A Computer Network may then be modelled as a set of interconnected queues, i.e. a “Queuing Network”
  • 3. Input Specifications for a Queue • Arrival Process Description • Service Process Description • Number of Servers • Number of Waiting Positions • Special Queueing Rules, e.g. - • order of service (FCFS, LCFS, SIRO, etc.) • baulking, reneging, jockeying for queue position
  • 4. Additional Input Specifications for a Queueing Network For networks of queues, one must provide additional information, such as - • Interconnections between the queues • Routing Strategy - deterministic, class based or probabilistic with given routing probabilities • Strategy followed to handle blocking if the destination queue is one of finite capacity (i.e. with finite number of waiting positions)
  • 5. An Open Queueing Network Jobs (Arrivals) enter the network from outside and eventually leave the network after obtaining service from one or more queues in the queueing network.
  • 6. A Closed Queueing Network A fixed number of jobs perpetually circulate in the network, moving to the next queue after obtaining the required service at the earlier one. No additional jobs enter the system nor do jobs leave the network.
  • 7. A Queue or a Queueing Network may be studied in different ways The results may be provided from different points of view Analysis Simulation and/or That of a customer entering the system for service That of a service provider who provides the resources (servers, buffers etc.) Consider analytical approaches here
  • 8. Parameters of interest for a customer arriving to the queue for service (Service Parameters) • Queueing delay • Total delay • Number waiting in queue • Number in the system • Blocking probability (for finite capacity queues) • Probability that the customer has to wait for service Transient Analysis or Equilibrium Analysis Mean Results or Probability Distributions
  • 9. Parameters of interest for the Service Provider (Service Parameters) • Server Utilization/Occupancy • Buffer Utilization/Occupancy • Total Revenue obtained • Total Revenue lost • Customer Satisfaction (Grade of Service) Transient Analysis or Equilibrium Analysis Mean Results or Probability Distributions
  • 10. General approach to the study of queues and queueing networks “Subject to appropriate modelling assumptions, obtain exact analytical results for the mean performance parameters under equilibrium conditions” In some special cases, we may also be obtain results on higher moments (variance etc.) or probability distributions and/or their transforms. Transient analysis is generally not feasible, except for some very simple cases. For this, simulation methods are preferred. In some case, especially for queueing networks, exact analysis is not feasible but good approximate analytical methods are available.
  • 11. Analysis of a Simple Queue (with some simplifying assumptions) Arrivals with an average arrival rate of  Infinite Buffer (infinite number of waiting positions) Single Server Service rate  at the server
  • 12. Assume that, as t0 P{one arrival in time t} = t P{no arrival in time t} =1- t P{more than one arrival in time t} = O((t)2) = 0 P{one departure in time t} = t P{no departure in time t} =1-  t P{more than one departure in time t} = O((t)2) = 0 P{one or more arrival and one or more departure in time t} = O((t)2) = 0 Arrival Process Mean Inter-arrival time =  1 Service Process Mean Service time =  1
  • 13. We have not really explicitly said it, but the implications of our earlier description for the arrivals and departures as t0 is that - • The arrival process is a Poisson process with exponentially distributed random inter-arrival times • The service time is an exponentially distributed random variable • The arrival process and the service process are independent of each other
  • 14. The state of the queue is defined by defining an appropriate system state variable System State at time t = N(t) = Number in the system at t (waiting and in service) Let pN(t) = P{system in state N at time t} Note that, given the initial system state at t=0 (which is typically assumed to be zero), if we can find pN(t) then we can actually describe probabilistically how the system will evolve with time.
  • 15. By ignoring terms with (t)2 and higher order terms, the probability of the system state at time t+t may then be found as - ttpttpttp   )(]1)[()( 100 N=0 (1.1) ttpttptttpttp NNNN    )()(]1)[()( 11 N>0 (1.2) subject to the normalisation condition that   i i tp 1)( for all t0
  • 16. Taking the limits as t0, and subject to the same normalisation, we get )()( )( 10 0 tptp dt tdp   N=0 (1.3) )()()()( )( 11 tptptp dt tdp NNN N    N>0 (1.4) These equations may be solved with the proper initial conditions to get the Transient Solution. If the queue starts with N in the system, then the corresponding initial condition will be pi(0)=0 for iN pN(0)=1 for i=N
  • 17. For the equilibrium solution, the conditions invoked are - 0 )(  dt tdpi and pi(t)=pi for i=0, 1, 2…..
  • 18. For this, defining  =/ erlangs, with <1 for stability, we get p1=p0 pN+1=(1+)pN - pN-1 = pN = N+1 p0 N1 Applying the Normalization Condition    0 1 i ip we get )1(   i ip i = 0, 1, ……, as the equilibrium solution for the state distribution when the arrival and service rates are such that =/ < 1 Note that the equilibrium solution does not depend on the initial condition but requires that the average arrival rate must be less than the average service rate (1.5) (1.6)
  • 19. Mean Performance Parameters of the Queue (a) Mean Number in System, N (b) Mean Number Waiting in Queue, Nq           1 )1( 00 i i i i iipN                 11 )1( 1 )1( 2 0 1 ppiN i iq (1.7) (1.8)
  • 20. Mean Performance Parameters of the Queue (c) Mean Time Spent in System W This would require the following additional assumptions • FCFS system though the mean results will hold for any queue where the server does not idle while there are customers in the system • The equilibrium state probability pk will also be the same as the probability distribution for the number in the system as seen by an arriving customer (PASTA: Poisson Arrivals See Time Averages) • The mean residual service time for the customer currently in service when an arrival occurs will still be 1/ Memory-less Property satisfied only by the exponential distribution.
  • 21. Mean Performance Parameters of the Queue (continued) Using these assumptions, we can write (d) Mean Time Spent Waiting in Queue Wq This will obviously be one mean service time less than W )1( 1)1( 0         k k p k W )1( 1     WWq (1.9) (1.10)
  • 22. Mean Performance Parameters of the Queue (continued) Alternatively, Wq may be obtained using the same kind of arguments as those used to obtain W earlier. This will give which is the same result as obtained earlier. (e) P{Arriving customer has to wait for service} = 1-p0 =  )1(0         k k q p k W
  • 23. Mean Performance Parameters of the Queue (continued) (f) Server Utilization “Fraction of time the server is busy” = P{server is not idle} =1-p0 =  The queue we have analyzed is the single server M/M/1/ queue with Poisson arrivals, exponentially distributed service times and infinite number of buffer positions
  • 24. The analytical approach given here may actually be applied for simple queueing situations where - • The arrival process is Poisson, i.e. the inter-arrival times are exponentially distributed • The service times are exponentially distributed • The arrival process and the service process are independent of each other
  • 25. Some other simple queues which may be similarly analyzed, under the same assumptions - • Queue with Finite Capacity • Queue with Multiple Servers • Queue with Variable Arrival Rates • Queue with “Balking”
  • 26. Stochastic Processes Markov Processes and Markov Chains Birth Death Processes •Summary Review •Needed for easily obtaining Equilibrium Solutions
  • 27. Stochastic Process X(t) Process takes on random values, X(t1)=x1,………., X(tn)=xn at times t1,…….., tn The random variables x1,…….., xn…. are specified by specifying their joint distribution. One can also choose the time points t1,…….., tn …. (where the process X(t) is examined) in different ways.
  • 28. Markov Processes X(t) satisfies the Markov Property (i.e. it has the memoryless property) if for any choice of time instants ti, i=1,……, n where tj>tk for j>k P{X(tn+1)=xn+1| X(tn)=xn ……. X(t1)=x1}=P{X(tn+1)=xn+1| X(tn)=xn} Memoryless property as the state of the system at future time tn+1 is decided only by the system state at the current time tn and does not depend on the state at earlier time instants t1,…….., tn-1
  • 29. Restricted versions of the Markov Property lead to - (a) Markov Chains over a Discrete State Space (b) Discrete Time and Continuous Time Markov Processes and Markov Chains Markov Chain State Space is discrete (e.g. set of non- negative integers) Discrete Time State changes are pre-ordained to occur only at the integer points 0, 1, 2, ......, n (that is at the time points t0, t1, t2,......, tn) Continuous Time State changes may occur anywhere in time
  • 30. In the analysis of simple queues, the state of the queue may be represented by a single random variable X(t) which takes on integer values {i, i=0, 1…..,} at any instant of time. The corresponding process may be treated as a Continuous Time Markov Chain since time is continuous but the state space is discrete
  • 31. Homogenous Markov Chain A Homogenous Markov Chain is one where the transition probability of going from state i to state j, i.e. P{Xn+1=j | Xn=i} is the same regardless of n. Therefore, the transition probability pij of going from state i to state j may be written as pij = P{Xn+1=j | Xn=i} n. It should be noted that for a Homogenous Markov chain, the transition probabilities depend only on the terminal states (i.e. the initial state i and the final state j) but do not depend on when the transition (i j ) actually occurs.
  • 32. p 1-p A Discrete Time Markov Chain (Transition from State A) P{system stays in state A for N time units | given that the system is currently in state A} = pN P{system stays in state A for N time units before exiting from state A} = pN(1-p) Distribution is Geometric, which is memoryless in nature
  • 33. 1-t t A Continuous Time Markov Chain Transition from State A P{system in state A for time T | system currently in state A} This is the (1- cdf) of an exponential distribution Tt T et     )1( Distribution is Exponential, which is memoryless in nature t0
  • 34. Important Observation "In a homogenous Markov Chain, the distribution of time spent in a state is (a) Geometric for discrete time or (b) Exponential for continuous time" Semi-Markov Processes In these processes, the distribution of time spent in a state can have an arbitrary distribution but the one-step memory feature of the Markovian property is retained.
  • 35. Discrete-Time Markov Chains The sequence of random variables X1, X2, .......... forms a Markov Chain if for all n (n=1, 2, ..........) and all possible values of the random variables, we have that – P{Xn=j | X1=i1...........Xn-1=in-1}=P{Xn=j | Xn-1=in-1} Note that this once again, illustrates the one step memory of the process
  • 36. Homogenous Discrete-Time Markov Chain The homogeneity property additionally implies that the state transition probability pij= P{Xn=j | Xn-1=i} will also be independent of n, i.e. the instant when the transition actually occurs. In this case, the state transition probability will only depend on the value of the initial state and the value of the next state, regardless of when the transition occurs.
  • 37. Homogenous Discrete-Time Markov Chain The homogeneity property also implies that we can define a m-step state transition probability as follows -     k kj m iknmn m ij ppiXjXPp )1()( }|{ where pij (m) is the probability that the state changes from state i to state j in m steps. This may also be written in other ways, though the value obtained in each case will be the same. For example, we can also write it as - m= 2, 3,…...     k m kjiknmn m ij ppiXjXPp )1()( }|{ m= 2, 3,…...
  • 38. Irreducible Markov Chain This is a Markov Chain where every state can be reached from every other state in a finite number of steps. This implies that k exists such that pij (k) for i, j. If a Markov Chain is not irreducible, then - (a) it may have one or more absorbing states which will be states from which the process cannot move to any of the other states, or (b) it may have a subset of states A from where one cannot move to states outside A, i.e. in AC
  • 39. Recurrent Non-null or Positive Recurrent if Mj< Recurrent Null if Mj= Recurrent if fj=1 Transient if fj<1 State j Classification of States for a Markov Chain     1 )( n n jj ff     1 )( n n jj nfM fj (n) = P{system returns to state j exactly n steps after leaving state j} fj = P{system returns to state j some time after leaving state j} Mj = Mean recurrence time for state j = Mean number of steps to return to state j after leaving state j
  • 40. State j is periodic with respect to  ( >1), if the only possible steps in which state j may occur are , 2, 3 ............ In that case, the recurrence time for state j has period . State j is said to be aperiodic if =1 A recurrent state is said to be ergodic if it is both positive recurrent and aperiodic. An ergodic Markov chain will have all its states as ergodic. An Aperiodic, Irreducible, Markov Chain with a finite number of states will always be ergodic. The states of an Irreducible Markov Chain are either all transient, or all recurrent null or all recurrent positive. If the chain is periodic, then all states have the same period .
  • 41. All states are recurrent positive - in this case a stationary distribution giving the equilibrium state probabilities exists and is given by pj=1/Mj j. In an irreducible, aperiodic, homogenous Markov Chain, the limiting state probabilities pj=P{state j} always exist and these are independent of the initial state probability distribution and All states are transient, or all states are recurrent null - in this case, the state probabilities pj’s are zero for all states and no stationary state distribution will exist. either or
  • 42. The stationary distribution of the states (i.e. the equilibrium state probabilities) of an irreducible, aperiodic, homogenous Markov Chain (which will also be ergodic), may be found by solving a set of simultaneous linear equations and a normalization condition.   i ijij ppp j Balance Equations   i ip 1 Normalization Condition If system has N states, j=0, 1, ….., (N-1), then we need to solve for p0, p1,….., pN-1 using the Normalization Condition and any (N-1) equations from the N Balance Equations
  • 43. Birth-Death Processes Homogenous, aperiodic, irreducible (discrete-time or continuous-time) Markov Chain where state changes can only happen between neighbouring states. If the current state (at time instant n) is Xn=i, then the state at the next instant can only be Xn+1 = (i+1), i or (i-1). Note that states are represented as integer-valued without loss of generality. Pure Birth Process No decrements, only increments Pure Death Process No increments, only decrements
  • 44. Continuous Time Birth-Death Markov Chain Let k be the birth rate in state k k be the death rate in state k Then P{state k to state k+1 in time t}=kt P{state k to state k-1 in time t} =kt P{state k to state k in time t} = 1- kt - kt P{other transitions in time t}= 0 t0 System State X(t) = Number in the system at time t = Total Births - Total Deaths in (0, t) The initial condition will not matter when we are only interested in the equilibrium state distribution
  • 45. k-1 0 1 2 k+1 k 0 1 2 k-1 k 1 2 3 k k+1 State Transition Diagram for a Birth-Death Process pk(t) = P{X(t)=k} = Probability {system in state k at time t}
  • 46. The state transitions from time t to t+t will then be governed by the following equations -        0 1111 11000 1)( )()(])(1)[()( )(]1)[()( k k kkkkkkkk tp ttpttpttpttp ttpttpttp   t0        0 1111 1100 0 1)( )()()()( )( )()( )( k k kkkkkkk k tp tptptp dt tdp tptp dt tdp   (2.6)
  • 47. We can now obtain the equilibrium solutions by setting i dt tdpi  0 )( and obtaining the state distribution pi i such that the normalization condition is satisfied.     0 1 i ip
  • 48. This yields the following equations to be solved for the state probabilities under equilibrium conditions- 0 p0 = 1 p1 k=0 k-1 pk--1 + k+1 pk+1= (k+k)pk k=1,2,3,……,     0 1 i ip            1 0 1 0 k i i i k pp   (2.7)         1 1 0 1 0 1 1 k k i i i p   (2.8) The solution is - Product Form Solution
  • 49. Instead of writing differential equations, one can obtain the solution in a simpler fashion by directly considering flow balance for each state. (a) Draw the state transition diagram (b) Draw closed boundaries and equate flows across this boundary. Any closed boundary may be chosen for this. If the closed boundary encloses state k, then we get Flow entering state k =k-1pk--1 + k+1pk+1= (k+k)pk = Flow leaving state k as the desired equation for state k. (c) Solve the equations in (b) along with the normalization condition to get the equilibrium state distribution. Global Balance Equation for state k k
  • 50. It would be even simpler in this case to consider a closed boundary which is actually closed at infinity kk-1 The solution for this will be the same as that obtained earlier This would lead to the following equation Flow from state k-1 to k = Flow from state k to k-1 k-1pk--1=kpk Detailed Balance Equation
  • 51. In general, the equations expressing flow balance in a Birth-Death Chain of this type will be -     ji ji jijiji pppp jijiji pppp  Global Balance Equations Closed boundary encircling each state j Detailed Balance Equations Equates flows between states i and j, in a pair-wise fashion. Boundary between states i and j, closed at + and -
  • 52. Conditions for Existence of Solution for Birth-Death Chain               0 1 0 1k k i i i            0 1 0 1 1 k k i i i k     (a) All states are transient, if and only if  =,  < (b) All states recurrent null, if and only if  =,  = (c) All states ergodic, if and only if  <,  = Equilibrium State Distribution will exist only for the case where all the states are ergodic and hence, the chain itself is also ergodic
  • 53. Analyzing M/M/-/- Type Queues (under equilibrium conditions) Kendall’s Notation for Queues Shorthand notation where A, B, C, D, E describe the queue Applicable to a large number of simple queueing scenarios A/B/C/D/E
  • 54. A Inter-arrival time distribution B Service time distribution C Number of servers D Maximum number of jobs that can be there in the system (waiting and in service) Default  for infinite number of waiting positions E Queueing Discipline (FCFS, LCFS, SIRO etc.), Default is FCFS M exponential D deterministic Ek Erlangian (order k) G general M/M/1 or M/M/1/ Single server queue with Poisson arrivals, exponentially distributed service times and infinite number of waiting positions Kendall’s Notation for Queues A/B/C/D/E
  • 55. Little’s Result N=W (2.9) Nq=Wq (2.10) Result holds in general for virtually all types of queueing situations where   = Mean arrival rate of jobs that actually enter the system Jobs blocked and refused entry into the system will not be counted in 
  • 56. Time t Numberofcustomers (arrivals/departures) (t), Arrivals in (0,t) (t), Departures in (0,t) N (t ) increments by one Graphical Illustration/Verification of Little's Result Little’s Result
  • 57. Consider the time interval (0,t) where t is large, i.e. t   t dttt 0 )]()([ Area(t) = area between (t) and (t) at time t = Average Time W spent in system = )( )( lim t tArea t   Average Number N in system = )( )()( lim )( lim t tArea t t t tArea tt     Therefore, N=W t t t )( lim   Since, Little’s Result
  • 58. The PASTA Property “Poisson Arrivals See Time Averages” pk(t) =P{system is in state k at time t } qk(t) =P{an arrival at time t finds the system in state k} N(t) be the actual number in the system at time t A(t, t+t) be the event of an arrival in the time interval (t, t+t)         )( ,( )(|)(|,( lim ,(|)(lim)( 0 0 tp tttAP ktNPktNtttAP tttAktNPtq kt tk       Then because P{A(t, t+t)|N(t) = k} = P{A(t, t+t)}
  • 59. Equilibrium Solutions for M/M/-/- Queues Method 1: Obtain the differential-difference equations. Solve these under equilibrium conditions along with the normalization condition. Method 2: Directly write the flow balance equations for proper choice of closed boundaries as illustrated and solve these along with the normalization condition. Method 3: Identify the parameters of the birth-death Markov chain for the queue and directly use equations (2.7) and (2.8) . In the following, we have used this approach. However, Method 2 is also interesting and should be tried as it allows various complicated models to be easily analyzed.
  • 60. M/M/1 (or M/M/1/ ) Queue (Single Server Queue with Infinite Buffer) ,.......3,2,1 00    k k k k k    k k k ppp    00        )1(0 p For  <1           1 )1( 00 i i i i iipN )1( 1    N W Using Little’s Result )1( 1     WWq )1( 2      qq WN Using Little’s Result
  • 61. M/M/1/ Queue with Discouraged Arrivals ,.......3,2,1 00 1      k k k k k k     For  = / <              1 0 00 ! 1 )1( k i k k k p i pp     )exp(0   p (2.14) (2.15)      0k kkpN           0 )exp(1 k kkeff p    Effective Arrival Rate        )exp(12     eff N W Little’s Result
  • 62. In this case, PASTA is not applicable as the overall arrival process is not Poisson r = P{arriving customer sees r in system (before joining the system)} Let E be the event of an arrival in (t, t+t) Ei is the event of the system being in state i          0 }|{}{ }|{}{ }{ }|{}{ }|{ i ii rrrr rr EEPEP EEPEP EP EEPEP EEP ! 1 }{ / i epEP i ii           1 }|{    i t EEP i                        / /1 1)!1( 1 e e r r r         0 /2 )1( 1 k k e k W      M/M/1/ Queue with Discouraged Arrivals
  • 63. M/M/m/ Queue (m servers, infinite number of waiting positions) kk   mkm mkkk     )1(0 For  = / < m mkfor mm p mkfor k pp mk k k k    ! ! 0 0   1 1 0 0 )(!!               m k mk mm m k p   (2.16) (2.17)      mk m k mm m pmCp )(! ),( 0    (2.18)P{queueing} = Erlang’s C-Formula
  • 64. M/M/m/m Queue (m server loss system, no waiting) )(0 ConditionLossorBlockingotherwise mkk    otherwise mkkk 0 0    otherwise mkfor k pp k k 0 ! 0      m k k k p 0 0 ! 1  (2.19) (2.20) For    
  • 65. Simple model for a telephone exchange where a line is given only if one is available; otherwise the call is lost Blocking Probability B(m,) = P{an arrival finds all servers busy and leaves without service} ! ),( 0 m pmB m    Erlang’s B-Formula (2.21) 1),0( B m mB m mB mB ),1( 1 ),1( ),(        (2.22) M/M/m/m Queue (m server loss system, no waiting)
  • 66. M/M/1/K Queue (single server queue with K-1 waiting positions) )(0 ConditionLossorBlockingotherwise Kkk    otherwise Kkk 0   otherwise Kkforpp k k 0 0    )1( )1( 10     K p   (2.23) (2.24) For    
  • 67. M/M/1/-/K Queue (single server, infinite number of waiting positions, finite customer population K ) otherwise Kkk 0   )(0 )( ConditionLossorBlockingotherwise KkkKk    (2.25) (2.26) )!( ! 0 kK K pp k k       K k k kK K p 0 0 )!( ! 1  k=1,.….,K For    
  • 68. Departure Process from a M/M/m/ Queue Q3 Q1 Q2 Q4 p 1-p p  (1-p) p p (1-p) Knowledge of the nature of the departure process from a queue would be useful as we can then use it to analyze simple cases of queueing networks as shown. The key result here is that the departure process from a M/M/m/ queue is also Poisson with the same rate as the arrival rate entering the queue. (Burke’s Theorem) It should also be noted that the result of randomly splitting or combining independent Poisson processes also yields a Poisson process. (Useful in analyzing queueing networks)
  • 69. How can we handle queues where the service time distribution is not exponential? [A] If we can express the actual service time as combinations of exponentially distributed time intervals, then the Method of Stages may be used. (Section 2.9) [B] The M/G/1 queue and its variations may be analyzed. [C] Approximation methods may be used if the mean and variance of the service time are given. ( e.g. A GI/G/m approximation)
  • 70. Method of Stages Consider a M/-/1/ example where the actual service time is the sum of two random variables, each of which is exponentially distributed.  Stage 1 1/1 Stage 2 1/2 State of the system represented as (n, j) where n is the total number of customers in the system where the customer currently being served is at Stage j, n=0,1,......,, j=1, 2 State (0,0) represents the state when the system is empty (1, 1)(0,0) (2, 1) (1, 2) (2, 2)    1 1 2 2 State Transition Diagram of the System
  • 71. ....... )( )( )( )( 21112222 32211211 111122 22200111 12200 etc ppp ppp pp ppp pp           (2.38)Balance Equations for the System These Balance Equations may be solved along with the appropriate Normalization Condition to obtain the state probabilities of the system. Once these are known, performance parameters of the queue may be appropriately evaluated. Method of Stages
  • 72. The method illustrated for the M/-/1/ example may be extended for the following types systems. 1. Have k stages of service times - more rows in the state transition diagram 2. Finite Number of Waiting Positions in the Queue - make the arrival rate a function of the number in the system and make it go to zero once all the waiting positions have been filled 3. Multiple Servers - approximate this by allowing more than one job to enter service at a time 4. More General Service Time Distributions - see next slide Method of Stages
  • 73. For more general service time distributions, the Method of Stages may be used if the Laplace Transform of the pdf of the service time may be represented as a rational function of s, LB(s)=N(s)/D(s), with simple roots. Stage 1 1 Entry 1 2 1-1 1-2 Stage 1 1 Exit      j i i i jj j B s sL 1 111 )1(......)1()(    With multiple stages like this, the L.T. of the service time pdf will be of the form -    i i i B s sL   0)( This leads to - Method of Stages
  • 74. Given a service time pdf as LB(s)=N(s)/D(s) with simple roots - 1. Obtain the multiple stage representation in the form shown earlier 2. Draw the corresponding state transition diagram and identify the flows between the various states 3. Write and solve the flow balance equations along with the normalization condition to obtain the state probabilities 4. Use the state probabilities to obtain the required performance parameters Method of Stages
  • 75. Some Examples of Service Time Distributions  1 2 Service Facility Buffer 0.5 0.5  ))(( )(5.0 )( 21 2121      ss s sLB Stage 1 1/ Stage 2 1/ 0.5 0.5 2 2 )( 5.05.0 )(         ss sLB
  • 76. Queues with Bulk (or Batch) Arrivals • Batches arriving as a Poisson process with exponentially distributed inter-arrival times between batches • Batch size = Number of jobs in a batch (random variable) M[X] Poisson Batch Arrival Process  = Average Batch Arrival Rate r = P{r jobs in a batch} r=1,2,….     1 )( r r r zz      1r rr
  • 77. The M[X]/M/1 Queue 010  kforpp  1)( 1 0 1      kforppp k i iikkk  Balance Equations Though these may be solved in the standard fashion, we will consider a solution approach for directly obtaining P(z), the Generating Function for the number in the system. For this, we would need to multiply the kth equation above by zk and sum from k=1 to k=.     0 )( n n n zpzP               1 1 1 0 1 1 1 )( k k k i k iki k k k k k zpzp z zp   
  • 78. )](1[)1( )1( )( )()(])([])()[( 0 100 zzz zp zP zzPzppzP z pzP         Simplifying, we get Note that, P(1)=1 is effectively the same as the Normalization Condition. Using this, we get - 10p    Define as the offered traffic )](1[)1( )1)(1( )( zzz z zP     Therefore (2.42) We can invert P(z) or expand it as a power series in zi i=0,1,… to get the state probability distribution. The mean number N in the system may be directly calculated from P(z) as - )1(2 )()( 2 0      zdz zdP N (2.43)
  • 79. The M[X]/-/-/K Queue Batch Arrival Queue with Finite Capacity For operating queues of this type, one must also specify the batch acceptance strategy to be followed if a batch of size k or more arrrives in a system where the number of waiting positions available is less than k. Partial Batch Acceptance Strategy (PBAS) Randomly choose as many jobs from the batch as may be accommodated in the buffer Whole Batch Acceptance Strategy (WBAS) Accept the batch only if all its jobs may be accommodated; otherwise, reject all jobs of the batch
  • 80. P1 2 Class 1 jobs Class P jobs P Priority Classes Class P Highest Priority Class Class 1 Lowest Priority Class Head of Line (HOL) Priority Operation of M/G/1 Queue Priority Operation of an M/G/1 Queue
  • 81. Open and Closed Networks of M/M/m Type Queues (Jackson’s Theorem for Open and Closed Networks)
  • 82. p1 Poisson Process Average Rate  Poisson Rate p1 pj pN Poisson Rate pj Poisson Rate pN Splitting a Poisson process probabilistically (as in random, probabilistic routing) leads to processes which are also Poisson in nature.   N i ip 1 1
  • 83. 1-p p Routing Probabilities are p and (1-p)   p p (1-p) (1-p) Q1 Q2 Q3 Under equilibrium conditions, average flow leaving the queue will equal the average flow entering the queue. For M/M/m/ queues at equilibrium, Burke’s Theorem assures us that the departure process of jobs from the network will also be Poisson. From flow balance, the average flow rate leaving the queue will also be the same as the average flow rate entering the queue.
  • 84. Poisson Process Average Rate 1 Poisson Process Average Rate 2 Poisson Process Average Rate 1+2 Combining independent Poisson processes leads to a process which will also be Poisson in nature.
  • 85. Q1 Q2 Q3 Q4 0.4 0.4 0.2 0.4 0.6 1 2 Example: An Acyclic (Feedforward) Network of M/M/m Queues External arrivals with rates 1 and 2 from Poisson processes Probabilistic routing with the routing probabilities as shown
  • 86. • Applying flow balance to each queue, we get Q1 = Average job arrival rate for Q1 = 1 Q2 = Average job arrival rate for Q2 = 0.41+2 Q3 = Average job arrival rate for Q3 = 0.41 Q4 = Average job arrival rate for Q4 = 0.841+2 • Burke’s Theorem and the earlier quoted results on splitting and combining of Poisson processes imply that, under equilibrium conditions, the arrival process to each queue will be Poisson. • Given the mean service times at each queue and using the standard results for M/M/m queues, we can then find the individual state probability distribution for each of the queues • This process may be done for any system of M/M/m queues as long as there are no feedback connections between the queues
  • 87. • It should be noted that this analysis can only give us the state distributions for each of the individual queues but cannot really say what will be the joint state distribution of the number of jobs in all the queues of the network. • Jackson’s Theorem, presented subsequently, is needed to get the joint state distribution. This gives the simple, and elegant result that - )()()()(),,,( 443322114321 npnpnpnpnnnnP QQQQ Product Form Solution for Joint State Distribution of the Queueing Network
  • 88. Jackson’s Theorem for Open Networks • Jackson’s Theorem is applicable to a Jackson Network. This is an arbitrary open network of M/M/m queues where jobs arrive from a Poisson process to one or more nodes and are probabilistically routed from one queue to another until they eventually depart from the system. The departures may also happen from one or more queues The M/M/m nodes are sometimes referred to as Jackson Servers • Jackson’s Theorem states that provided the arrival rate at each queue is such that equilibrium exists, the probability of the overall system state (n1…….nK) for K queues will be given by the product-form expression   K i iQiK npnnP 1 1 )(),......,(
  • 89. Jackson Network: Network of K (M/M/m) queues, arbitrarily connected External Arrival to Qi : Poisson process with average rate i At least one queue Qi must be such that i  0. Note that j  0 if there are no external arrivals to Qj. This is because we are considering an Open Network. (Closed Networks are considered later). Routing Probabilities: pij = P{a job served at Qi is routed to Qj}           K j ijp 1 1 = P{a job served at Qi exits from the network}
  • 90. Arrival Process of Jobs to Qi = [External Arrivals, if any, to Qi]   K j 1 Jobs which finish service at Qj and are then routed to Qi for the next stage of service Let i = Average Arrival Rate of Jobs to Qi {external and rerouted} Given the external arrival rates to each of the K queues in the system and the routing probabilities from each queue to another, the effective job arrival rate to each queue (at equilibrium) may be obtained by solving the flow balance equations for the network.
  • 91. Flow Balance Conditions at Equilibrium imply that -   K i ijijj p 1  for j=1,….., K (5.2) • For an Open Network, at least one of the j’s will be non-zero (positive) • The set of K equations in (5.2) can therefore be solved to find the effective job arrival rate to each of the K queues, under equilibrium conditions. • The network will be at equilibrium if each of the K queues are at equilibrium. This can happen only if the effective traffic offered to each queue is less than the number of servers in the queue. i.e. j =  j /j < mj j=1,….., K where mj is the number of servers in Qj.
  • 92. For a network of this type with M/M/m/ queues (i.e. Jackson Servers) at each node, Jackson's Theorem states that provided the arrival rate at each queue is such that equilibrium exists, the probability of the overall system state (n1,......., nK) will be -   K j jjK npnnPnP 1 1 )(),......,()~( (5.4) with pj(nj)=P{nj customers in Qj} This individual queue state probability may be found by considering the M/M/m/ queue at node j in isolation with its total average arrival rate j, its mean service time 1/j and the corresponding results for the steady state M/M/m/ queue.
  • 93. Stability requirement for the existence of the solution of (5.4) is that - For each queue Qj j=1,….., K in the network, the traffic offered should be such that j j j j m          where mj is the number of servers in the M/M/m/ queue at Qj
  • 94. Implications of Jackson’s Theorem • Once flow balance has been solved, the individual queues may be considered in isolation. • The queues behave as if they are independent of each other (even though they really are not independent of each other) and the joint state distribution may be obtained as the continued product of the individual state distributions (product-form solution) • The flows entering the individual queues behave as if they are Poisson, even though they may not really be Poisson in nature (i.e. if there is feedback in the network). Note that Jackson’s Theorem does require the external arrival processes to be Poisson processes and the service times at each queue to be exponentially distributed in nature with their respective, individual means.
  • 95. Performance Measures Total Throughput =   K j j 1  (5.5) Average traffic load at node j (i.e. Qj) = j j j     (5.6) Visit Count to node j =   j jV  (5.7) These may also be obtained by directly solving the following K linear equations -     K i iji j j pVV 1 j =1,……, K (5.8) Scaled Flow Balance Equations
  • 96. Average number of jobs at node j =     0 )( k jj kkpN (5.9) Average number of jobs in system =   K j jNN 1 (5.10) Interpretation of the Visit Ratio Vj : Average number of times a job will visit Qj every time it actually enters the (open) queueing network. Mean Sojourn Time (W): The mean total time spent in the system by a job before it leaves the network.   K j jNN W 1  (5.11)
  • 97. Copyright 2013, Sanjay K. Bose 97 Example: Open Jackson Network Q1 M/M/1 Q2 M/M/1  1 1 =1p1 2 2 p1 2 =1p2 p2 p1+p2=1 Service Rate of Q1=1 Service Rate of Q2=2 1 1 p    1 1 2 )1( p p    11 1 p    12 1 2 )1( p p      )1()1(),( 221121 21   nn nnP 1 1 1 1    N 2 2 2 1    N Mean Number in the Queues )1()1( 2 2 1 1          N WMean Sojourn Time
  • 98. Copyright 2013, Sanjay K. Bose 98 Example Q1 M/M/1 r 2r 2  p 1-p p p 1-2p 1 2 Q2 M/M/1 pprpr 21221 )1(2)21(   )1(2 )53( 1 pp pr    )1(2 )3( 2 pp pr    )1(4 )53( 1 pp pr      )1(2 )3( 2 pp pr      21 212121 )1)(1(),( nn nnP   )1(6 53 1 pp p V    Joint Probability )1(6 3 2 pp p V    Visit Ratios 1 1 1 1    N 2 2 2 1    N 2 2 1 1 11        N Mean Number in Q1, Q2 and in the system Mean Sojourn Time W r N 3 
  • 99. Copyright 2013, Sanjay K. Bose 99 Example Q1 M/M/1  0.2 0.2 0.2 0.2 0.2 0.4 0.4 0.6 0.6 Q4 M/M/1 Q2 M/M/1 Q3 M/M/1              3214 132 132 6.06.02.0 4.0 2.02.0    )8095.0,4762.0,4762.0,1905.1( ),,,( ~ 4321     )6190.1,9524.0,9524.0,1905.1( ),,,(~ 0000 4321     4321 4214 2 214321 )1()1)(1(),,,( nnnn nnnnP     4321 ,,,0 nnnn 1 1 1 1    N 2 2 32 1     NN 4 4 4 1    N Note that as λ increases, system eventually becomes unstable because This, therefore, implies that ρ0<0.6176 or λ<0.6176μ for the queueing network to be stable. for 14  1 2 3 41 0.5      
  • 100. When does the Product-Form Solution hold? The product-form expression for the joint state probabilities hold for any open or closed queueing network where local balance conditions are satisfied.
  • 101. Specifically, open or closed networks with the following types of queues will have a product-form solution - 1. FCFS queue with exponential service times 2. LCFS queues with Coxian service times 3. Processor Sharing (PS) queues with Coxian service times 4. Infinite Server (IS) queues with Coxian service times A Coxian service time has a distribution of the following type -       i j j j ii L i B s sL 1 12 1 11 .....)(    ii  1with for Li 1 and 11 L