Queueing Network
Queueing Network
Page ‹n.›
Outline Introduction: the queue
I) Queueing systems - basic QN: Queueing Systems
various hypotheses
analysis to evaluate performance indices
underlying stochastic Markov process - Customers
arrive to the service center
II) Queueing networks (QN) ask for resource service
model definition possibly wait to be served => queueing discipline
analysis to evaluate performance indices
types of customers: multi-chain, multi-class models
leave the service center
types of QN
Markovian QN
underlying stochastic Markov process service facility
arrivals departures
III) Product-form QN
have a simple closed form expression of the stationary state distribution
BCMP theorem queue
=> efficient algorithms to evaluate average performance measures
Solution algorithms for product-form QN
Convolution, MVA, RECAL, … - under exponential and independence assumptions
IV) Properties of QN one can define an associated stochastic continuous-time Markov process
arrival theorem - exact aggregation - insensitivity to represent system behaviour
Extensions and application examples
special system features (e.g., state-dependent routing, negative customers, - performance indices are derived from the solution of the Markov process
customers batch arrivals and departures and finite capacity queues)
S. Balsamo, A. Marin - Università Ca’ Foscari di Venezia - Italy 2 S. Balsamo, A. Marin - Università Ca’ Foscari di Venezia - Italy 3
SFM ‘07 - PE SFM ‘07 - PE
Page ‹n.›
Stochastic processes Markov processes
Discrete-time Markov process
Stochastic process: set of random variables {Xn | n=1,2,...}
{X(t) | t ∈ T}
if the state at time n + 1 only depends on the state probability at time n and
defined over the same probability space indexed by the parameter t, called time
is independent of the previous history
each X(t) random variable Prob{Xn+1=j|X0=i0;X1=i1;...;Xn=in} =Prob{Xn+1=j|X n=in}
takes values in the set Γ called state space of the process
∀n>0, ∀j, i0, i 1,..., i n Γ
Both T (time) and Γ (space) can be either discrete or continuous
Continuos-time Markov process
Continuous-time process if the time parameter t is continuous {X(t) | t ∈ T}
Discrete-time process if the time parameter t is discrete
Prob{X (t) =j|X(t0) =i0;X(t1)=i1;...;X(tn)=in} =Prob{X (t) =j| X(tn)=in}
{Xn | n T }
∀t0,t1,...,tn,t : t0<t1<...<t n<t , ∀n>0, ∀j, i0, i1,..., in Γ
Joint probability distribution function of the random variables X (ti)
Markov property
Pr{X (t1) ≤x1; X (t2)≤x2; . . . ; X (tn) ≤xn}
The residence time of the process in each state is distributed according to
for any set of times ti T , xi Γ, 1≤i≤n, n≥1 geometric for discrete-time Markov processes
negative exponential distribution for continuous-time Markov processes
Discrete-space Γ Markov processes are called Markov chain
S. Balsamo, A. Marin - Università Ca’ Foscari di Venezia - Italy 4 S. Balsamo, A. Marin - Università Ca’ Foscari di Venezia - Italy 5
SFM ‘07 - PE SFM ‘07 - PE
Page ‹n.›
Analysis of Markov processes Analysis of Markov processes
Discrete-time Markov chain Continuous-time Markov chain
{Xn | n=1,2,...} {X(t) | t ∈ T}
homogeneous if the one-step conditional probability is independent on time n homogeneous if the one-step conditional probability only depens on the
pij =Prob{Xn+1=j|X n=i} ∀n>0, ∀i,j Γ interval width
P=[p ij] state transition probability matrix pij (s) =Prob{X(t+s) =j| X(t) =i} ∀ t>0, ∀i,j Γ
If the stability conditions holds, we can compute the Q = lim s→0 (P(s) - I)/s
stationary state probability Q=[q ij] matrix of state transition rates (infinitesimal generator)
π =[π 0, π1, π2, …]
πj =Pr{X=j} ∀j Γ If the stability conditions holds, we compute the stationary state probability
For ergodic Markov chain (irreducible and with positively recurrent aperiodic states) π π =[π 0, π1, π2, …]
can be computed as For ergodic Markov chain (irreducible and with positively recurrent aperiodic states) as
S. Balsamo, A. Marin - Università Ca’ Foscari di Venezia - Italy 6 S. Balsamo, A. Marin - Università Ca’ Foscari di Venezia - Italy 7
SFM ‘07 - PE SFM ‘07 - PE
Page ‹n.›
Birth-death Markov processes Birth-death Markov processes
State space Γ = N π =[π0, π1, π2, …] Sufficient condition for stationary distribution
The only non-zero state transitions are those
∃ k0 : ∀k> k0 λk< µk
from any state i to states i − 1, i, i + 1, i Γ
Matrix P (discrete-time) or Q (continuous-time) is tri-diagonal
Special case: constant birth and death rates
λi birth transition rate , i≥0 λi = λ birth transition rate , i≥0
µi death transition rate, i≥1 continuos-time Markov chain µi = µ death transition rate, i≥1
q i i+1 = λi i≥0
Let ρ= λ / µ
q i i-1 = µi i≥1
If ρ<1
q i i = -(λi + µi ) i≥1
q 00 = -λ0
π0 = [∑k ρ k ] -1 = 1- ρ
qij =0 |i-j|>1
π k = π 0 (λ / µ ) k
πk = (1- ρ ) ρ k k≥0
S. Balsamo, A. Marin - Università Ca’ Foscari di Venezia - Italy 8 S. Balsamo, A. Marin - Università Ca’ Foscari di Venezia - Italy 9
SFM ‘07 - PE SFM ‘07 - PE
Page ‹n.›
Basic queueing systems Basic queueing systems
Single service center n
Single service center q
w s
1
servente
server 1
2
…
servente
server 2
! m
…
queue
coda tw ts
servente
server m
popolazione
population
ttq
r
Δ : interarrival time
w : number of customers in the queue tw : queue waiting time
Customers resources offering a service s : number of customers in service ts : service time
=> resource contention n : number of customers in the system tr : response time
S. Balsamo, A. Marin - Università Ca’ Foscari di Venezia - Italy 10 S. Balsamo, A. Marin - Università Ca’ Foscari di Venezia - Italy 11
SFM ‘07 - PE SFM ‘07 - PE
Page ‹n.›
Definition of a queueing systems Analysis of a queueing systems
• system analysis
• The queueing system is described by
Transient for a time interval, given the initial conditions
* the arrival process
Stationary in steady-state conditions, for stable systems
* the service process
* the number of servers and their service rate • Analysis of the associated stochastic process that represents system
* the queueing discipline process behavior
* the system or queue capacity Markov stochastic process
* the population constraints birth and death processes
• Evaluation of a set of performance indices of the queueing system
• Kendall’s notation A/B/X/Y/Z
* number of customers in the system n
A interarrival time distribution (Δ)
* number of customers in the queue w
B service time distribution (ts)
* response time tr
X number of servers (m)
Y system capacity (in the queue and in service) * waiting time tw
Z queueing discipline * utilization U
A/B/X if Y = ∞ and Z = FCFS (default) * throughput X
Examples: A,B : D deterministic (constant) random variables: evaluate probability distribution and/or the moments
M exponential (Markov) average performance indices
Ek Erlang-k * average number of customers in the system N=E[n]
G general
* mean response time R=E[tr]
Examples of queueing systems: D/D/1, M/M/1, M/M/m (m>0), M/G/1, G/G/1
S. Balsamo, A. Marin - Università Ca’ Foscari di Venezia - Italy 12 S. Balsamo, A. Marin - Università Ca’ Foscari di Venezia - Italy 13
SFM ‘07 - PE SFM ‘07 - PE
Page ‹n.›
Some basic relations in queueing systems A simple example: D/D/1
Relations on random variables
n= w + s a s
tr = tw + ts
=> • deterministic arrivals: constant interarrival time (a)
N = E[w] + E[s] • deterministic service: each customers have the same service demand (s)
R = E[tw] + E[t s] • transient analysis
Little’s theorem from time t=0
N=XR • if s<a
E[w] = X E[tw]
S. Balsamo, A. Marin - Università Ca’ Foscari di Venezia - Italy 14 S. Balsamo, A. Marin - Università Ca’ Foscari di Venezia - Italy 15
SFM ‘07 - PE SFM ‘07 - PE
Page ‹n.›
A simple example: D/D/1 Basic queueing systems: M/M/1
Arrival Poisson process, with rate λ
• transient analysis
(exponential interarrival time) λ µ
n(t) number of customer in the system at time t
Exponential service time with rate µ
if n(0)=0 empty system at time 0
E[ts] = 1/µ
then
Single server
n(t) = 0 if s<a , i a + s < t < (i+1) a, i≥0
n(t) = 1 if s<a , i a ≤ t ≤ i a + s , i≥0 System state: n
n(t) = 1 if s=a Associated stochastic process:
n(t) = t/a - t/s if s>a for t≥0 birth-death continuous-time Markov chain with constant rates λ and µ
• stationary analysis
stability condition: s≤a
λ λ λ λ λ λ
If arrival rate (1/a) ≤ service rate (1/s)
⇒The system reaches the steady-state
⇒n ∈ {0,1} 0 1 … k-1 k k+1 …
Prob{n=0} = (a-s)/a
Prob{n=1} = s/a
• w = 0 tw = 0 t r = s (deterministic r.v.) µ µ µ µ µ µ
• X=1/a throughput
• U = s/a utilization
S. Balsamo, A. Marin - Università Ca’ Foscari di Venezia - Italy 16 S. Balsamo, A. Marin - Università Ca’ Foscari di Venezia - Italy 17
SFM ‘07 - PE SFM ‘07 - PE
Page ‹n.›
Basic queueing systems: M/M/1 Basic queueing systems: M/M/m
Arrival Poisson process, with rate λ 1
(exponential interarrival time)
µ
λ µ
• stationary analysis 2
Exponential service time with rate µ
stability condition: λ<µ µ
E[ts] = 1/µ λ
m servers …
traffic intensity ρ= λ / µ m
µ
System state: n
stationary state probability πk = Prob {n = k} k∈N Associated stochastic process:
πk = ρ k (1 - ρ) k≥0
birth-death continuous-time Markov chain with rates
N = ρ / (1 - ρ) λk=λ
µk=min{k,m} µ
R = 1 / (µ - λ) (Little’s theorem)
λ λ λ λ λ λ λ λ λ λ
X=λ
U=ρ 0 1 … m-1 m m+1 … k-1 k k+1 …
E[w] = ρ 2 / (1 - ρ) µ 2µ (m-1)µ mµ mµ mµ mµ mµ mµ mµ
E[tw] = (1 / µ) ρ / (1 - ρ) (Little’s theorem)
S. Balsamo, A. Marin - Università Ca’ Foscari di Venezia - Italy 18 S. Balsamo, A. Marin - Università Ca’ Foscari di Venezia - Italy 19
SFM ‘07 - PE SFM ‘07 - PE
Page ‹n.›
Basic queueing systems: M/M/m
Basic queueing systems: M/M/∞
1 µ
µ
• stationary analysis 2 Arrival Poisson process, with rate λ
λ µ (exponential interarrival time) µ
λ
stability condition: λ<mµ … Exponential service time with rate µ
…
µ m E[ts] = 1/µ
traffic intensity ρ= λ / m µ infinite identical servers µ
No queue
…
stationary state probability πk = πo (m ρ)k /k! 1≤k≤m
System state: n
πk = πo mm ρ k /m! k>m
Associated stochastic process:
-1
m-1 k m birth-death continuous-time Markov chain with rates
(m#) (m#) 1
!0 = "
k=0
k!
+
m! 1-#
(Erlang-C formula)
λk=λ
µk = k µ
N = m ρ + πm ρ / (1 - ρ)2 λ λ λ λ λ λ
R = πm / (m µ (1 - ρ))2) + 1 / µ (Little’s theorem)
0 1 … k-1 k k+1 …
X=λ U=ρ Prob{queue}=∑k≥m πk = πo (m ρ ) m /m! (1 - ρ)
µ 2µ (k-1)µ kµ (k+1)µ (k+2)µ
E[w] = πm ρ / (1 - rρ)2
E[tw] = πm / ((1 - ρ)2 µ) (Little’s theorem)
S. Balsamo, A. Marin - Università Ca’ Foscari di Venezia - Italy 20 S. Balsamo, A. Marin - Università Ca’ Foscari di Venezia - Italy 21
SFM ‘07 - PE SFM ‘07 - PE
Page ‹n.›
Basic queueing systems: M/M/∞ Basic queueing systems: M/G/1
µ
• stationary analysis Arrival Poisson process, with rate λ
µ (exponential interarrival time) µ
λ λ
the system is always stable General service time with rate µ
…
E[ts] = 1/µ
traffic intensity ρ= λ / µ µ CB = (Var [ ts])1/2 / E[t s] coefficient of variation of ts
… Single server
The state defined as n (number of customers in the system) does not lead to a
stationary state probability πk = e-ρ ρ k /k! k≥0 Markov process
Poisson distribution State description n for system M/M/1 gives a (birth-death) continuous-time
Markov chain because of the exponential distribution (memoryless property)
N=ρ
We can use a different (more detailed) state definition to define a Markov process
R = 1/ µ (e.g., the number of customers and the amount of service already provided to the customer
X=λ currently in service)
U=ρ E[w] = E[tw] = 0 The associated Markov process is not birth-death
Analysis of an embedded Markov process
Delay queue Z-transform technique
S. Balsamo, A. Marin - Università Ca’ Foscari di Venezia - Italy 22 S. Balsamo, A. Marin - Università Ca’ Foscari di Venezia - Italy 23
SFM ‘07 - PE SFM ‘07 - PE
Page ‹n.›
Basic queueing systems: M/G/1 Coxian distribution
Coxian distribution are
E[ts] = 1/µ formed by a network of
CB = (Var [ ts])1/2 / E[ts] λ µ exponential stages
Khinchine Pollaczeck theorem
for any queueing discipline independent of service time without pre-emption
2 2 µ1 µ2 µL
! (1 + CB ) a1 a2
E[ w ] = ! + 1 2 … L
2(1-!)
b1 b2 b L=1
N = E[w] + l E[ts]
R=N/X
L exponential stages
Stability condition: λ < µ
Stage l service rate µ l
probabilities al , bl : al + bl =1
PASTA theorem: Poisson Arrivals See Time Average
Coxian distributions have rational Laplace transform
The state distribution and moments seen by a customer at arrival time Can be used
is the same as those observed by a customer at arbitrary times - to represent general distribution with rational Laplace transform
in steady-state conditions - to approximate any general distribution with known bounds
PH-distributions (phase-type) have similar representation and property
S. Balsamo, A. Marin - Università Ca’ Foscari di Venezia - Italy 24 S. Balsamo, A. Marin - Università Ca’ Foscari di Venezia - Italy 25
SFM ‘07 - PE SFM ‘07 - PE
Page ‹n.›
Queueing disciplines Queueing Networks
• scheduling algorithms • A queueing system describes the system as a unique resource
FCFS first come first served • A queueing network describes the system as a set of interacting resources
LCFS last come first served
Queueing Network
LCFSPr * idem with pre-emption
a collection of service centers that provide service to a set of customers
Random - open external arrivals and departures
Round Robin each customer is served for a fixed quantum δ - closedconstant number of customers (finite population)
PS * Processor Sharing for δ→0 - mixed if it is open for some types of customers, closed for other types
all the customers are served at the same time
for service rate µ and n customers, each - Customers
receives service with rate µ /n arrive to a service center (node) (possibly external arrival for open QN)
IS * Infinite Serves no queue (delay queue) ask for resource service
SPTF Shortest Processing Time First possibly wait to be served (queueing discipline)
SRPTF Shortest Remaining Processing Time First at completion time exit the node and
- immediately move to another node
- with/without priority - or exit the QN
- abstract priority/dependent on service time in closed QN customers are always in queue or in service
- with/without pre-emption
* Immediate service
S. Balsamo, A. Marin - Università Ca’ Foscari di Venezia - Italy 26 S. Balsamo, A. Marin - Università Ca’ Foscari di Venezia - Italy 27
SFM ‘07 - PE SFM ‘07 - PE
Page ‹n.›
Queueing Networks Examples Queueing Networks Definition
open QN Informally, a QN is defined by
the set of service centers Ω = {1, . . . , M }
the set of customers
the network topology
N customers
S. Balsamo, A. Marin - Università Ca’ Foscari di Venezia - Italy 28 S. Balsamo, A. Marin - Università Ca’ Foscari di Venezia - Italy 29
SFM ‘07 - PE SFM ‘07 - PE
Page ‹n.›
Queueing Networks Definition Types of customers: classes, chains
The network topology In simple QN we often assume that all the customers are statistically identical
models the customer behavior among the interconnected service Modeling real systems can require to identify different types of customers -
centers - service time
- assume a non-deterministic behavior represented by a probabilistic model - routing probabilities
- pij probability that a customer completing its service in station i immediately Multiple types of customers: concepts of class and chain.
moves to station j, 1≤i,j≤ M
A chain forms a permanent categorization of customers
- pi0 for open QN probability that a customer completing its service in station i a customer belongs to the same chain during its whole activity in the network
immediately exits the network from station i
A class is a temporary classification of customers
- P = [pij ], routing probability matrix 1≤i,j≤ M
a customer can switch from a class to another during its activity in the network
where 0≤ pij ≤1, ∑ i pij =1 for each station i (usually with a probabilistic behavior)
A QN is well-formed if it has a well-defined long-term customer behavior: The customer service time in each station and the routing probabilities usually
- for a closed QN if every station is reachable from any other with a non-zero depend on the class it belongs to
probability
- for an open QN add a virtual station 0 that represents the external behavior, that Multiple-class single-chain QN
generates external arrivals and absorbs all departing customers, so obtaining a Multiple-class and multiple-chain QN
closed QN. Definition as for closed QN. R set of classes of the QN R number of classes
C set of chains C number of chains
S. Balsamo, A. Marin - Università Ca’ Foscari di Venezia - Italy 30 S. Balsamo, A. Marin - Università Ca’ Foscari di Venezia - Italy 31
SFM ‘07 - PE SFM ‘07 - PE
Page ‹n.›
Types of customers: classes, chains Types of customers: classes, chains
Example of multiple-class and multiple-chain QN
R classes
M=2 stations
C chains
R=3 classes C=2 chains R ={1,2,3}
Classes can be partitioned into chains, such that there cannot be a customer switch
Chain 1 is open and formed by classes 1 and 2
from classes belonging to different chains
Chain 2 is closed and formed by class 3
Class 2
P(c) routing probability matrix of customers for each chain c C
Station 1 Station 2
- pir,js (c) probability that a customer completing its service in station i class r
immediately moves to station j, class s, 1≤i,j≤ M , r,s in R, classes of chain c Class 1
- pir,0 (c) probability that a customer completing its service in station i class r
immediately exits the network
Class 3
Page ‹n.›
Types of customers: classes, chains QN performance indices
Example of single-class and multiple-chain QN R=C Local performance indices
(only one class in each chain) Related to a single resource i (a service center)
average indices Ui utilization
M=3 stations
Xi throughput
R=2 classes C=2 chains R ={1,2}
Ni mean queue length
no class switching random variables
Ri mean response time
Chain 1 is open and formed by one class
ni number of customers in station i
Chain 2 is closed and formed by one class
nir number of customers in station i and class r
ni (c) number of customers in station i and chain c
Station 1 Station 2
distribution of ni U utilization
πi(ni) at arbitrary times X throughput
Global performance indices N mean population
Chain 2 (for open networks)
Station 3 Related to the overall network
average indices R mean response time
passage time
S. Balsamo, A. Marin - Università Ca’ Foscari di Venezia - Italy 34 S. Balsamo, A. Marin - Università Ca’ Foscari di Venezia - Italy 35
SFM ‘07 - PE SFM ‘07 - PE
Page ‹n.›
Markovian QN
Notation - QN
S network state
Network model parameters (single class, single chain) E set of all feasible states of the QN
M number of nodes λ total arrival rate
K number of customers (closed network) µi service rate of node i Markovian network
P=[pij] routing matrix p0i arrival probability at node i the network behavior can be represented by a
ei visit ratio at node i, solution of traffic equations homogeneous continuous time Markov process M
Page ‹n.›
Exact analysis of Markovian QN Example of Queueing Network: two-node cyclic
Solution algorithm for the evaluation of average performance indices and joint closed network
queue length distribution at arbitrary times (π) in Markovian QN
S. Balsamo, A. Marin - Università Ca’ Foscari di Venezia - Italy 38 S. Balsamo, A. Marin - Università Ca’ Foscari di Venezia - Italy 39
SFM ‘07 - PE SFM ‘07 - PE
Page ‹n.›
Example of Queueing Network: two-node cyclic Example of Queueing Network: tandem
closed network open network
µ1 µ λ µ1 µ
2 2
Arrival Poisson process
Exponential service times
K customers Independence assumption
FCFS discipline
Let ρ = (µ1/µ2)
S = (S1,S2) system state
Si = n i
π(n1, n2)=(1/G) ρ n2 0≤n1≤K , n2=K-n1
closed-form solution E = { (n1, n2) | ni≥0} state space
π(n1, n2 ) stationary state probability
G = Σ 0≤k≤K ρ k = (1- ρ K+1 ) / (1- ρ )
Page ‹n.›
Burke’s Theorem Some extensions
Poisson(λ) exp Poisson(λ) An immediate application of
Burke theorem’s together with
The departure process of a stable M/M/1 is a Poisson process with the property of composition and decomposition of Poisson processes
the same parameters as the arrival process
leads to a closed form solution of the state probability for a class of QN with
exponential service time distribution
Burke theorem’s also holds for M/M/m and M/G/∞ FCFS discipline
exponential interarrival time (Poisson arrivals, parameter γi )
For the tandem two node network: independence assumption
acyclic probabilistic routing topology (triangular routing matrix P)
⇒Node 2 has a Poisson arrival process (λ)
M
⇒Isolated node 2 is an M/M/1 system with parameters λ and µ2
⇒π2(k) = ρ2k (1-ρ 2) k≥0 if ρ2 = λ / µ 2<1
! (n1 , n2 , …, nM) = " Prob {n }
i=1
i i
Page ‹n.›
Product-form Queueing Networks BCMP Queueing Networks
Types of node
product-form solution of π (under certain constraints)
M 1) FCFS and exponential chain independent service time
1
"( S) = d(n) # g i (n i ) 2) PS
G i =1 3) IS and Coxian service time
The stationary state probability π can be computed as the product of a set of 4) LCFCPr
functions each dependent only on the state of a station
Other average performance indices can be derived by state probability π For types 2-4 the service rate may also depend on the customer chain.
Jackson theorem open exponential-FCFS networks Let µ i(c) denote the service rate for node i and chain c.
=> µ i(c) = µi for each chain c, for type-1 nodes.
Gordon-Newell theorem closed exponential-FCFS networks
!
BCMP theorem open, closed, mixed QN with various types of nodes Consider single-class multiple-chain QN
Consider open, closed, mixed QN with M nodes of types 1-4,
Poisson arrivals with parameter λ(n) dependent on the overall QN population n,
The solution is obtained as if
R classes and C chains, population K (c) for each closed chain c C ,
the QN is formed by independent M/M/1 (or M/M/m) nodes external arrival probabilities p0,i(c) for each open chain c C ,
routing probability matrices P(c) for each chain c C ,
that define the traffic equation system derive the visit ratio of (relative)
Computationally efficient exact solution algorithms throughputs ei(c)
Convolution Algorithm
Mean Value Analysis
ei(c) = p0,i (c) + Σj ej(c) pji 1≤i≤M, 1≤c≤C
S. Balsamo, A. Marin - Università Ca’ Foscari di Venezia - Italy 44 S. Balsamo, A. Marin - Università Ca’ Foscari di Venezia - Italy 45
SFM ‘07 - PE SFM ‘07 - PE
Page ‹n.›
BCMP Queueing Networks BCMP Queueing Networks
BCMP theorem [Baskett, Chandy, Muntz, Palacios 1975] functions gi(ni ) depend only on
For open, closed, mixed QN with M nodes of types 1-4 and the assumptions node i parameters ei(c) and µi(c) and
above, let ρi(c) = ei(c) / µ i(c) for each node i and each chain c. node i state ni(c)
If the system is stable, i.e., if ρi(c) <1 ∀i,∀c,
C
R n ni (c)
then the steady state probability can be computed as the product-form: "iir(c)ir)
(ρ
gfi (n = nni!i !
(nii)) = ! n !
seforil nodes
nodo iofè type
FIFO,1, PS,
2 and 4 (FCFS, PS and LCFSPr)
LIFOPr
1 M r=1
c=1
ni(c)
ir !
"(S) = d(n) # g i (n i )
G i =1
(ρi(c) ) ni
C (c)
c=1
function d(n)=1 for closed network, and for open and mixed network
depends on the arrival functions as follows: Where ni(c) number of customers in node i and chain c
n-1 C
R
(c)
(r)
nn --11 ni number of customers in node i
! d(n) = ! λ(k)
"(k) d(n) = ! ! c (k)
λ"r(k) The proof is based on the a detailed definition of the network state
kk=0
=0 r=1 k=0 and by substitution of the product-form expression into the global balance equations
c=1 k=0
of the associated continuous-time Markov process.
for arrival rates dependent on the number of customers in the network n, or
in the network and chain c,
functions gi(ni ) depend on node type as follows:
S. Balsamo, A. Marin - Università Ca’ Foscari di Venezia - Italy 46 S. Balsamo, A. Marin - Università Ca’ Foscari di Venezia - Italy 47
SFM ‘07 - PE SFM ‘07 - PE
Page ‹n.›
BCMP Queueing Networks - extensions BCMP Queueing Networks - extensions
The service rate of node i may depend on the The service rate of node i may depend on the
A) the state of the node ni C) the state of a subnetwork H nH= Σ h∈H nh
let xi( ni) a positive functions (capacity function) where H is a subset of stations
that gives the relative service rate (xi( 1)=1) let z H(nH) a positive functions defined similarly to xi above
and the actual service rate for class r customers at node i is relative service rate when nH=1
xi( ni) µ ir => the product of functions ∏h∈H gh(nh) in the product-form
=> function gi(ni) in the product-form is multiplied by factor is multiplied by factor n H
ni
∏ (1/ z (a))
H
∏ (1/ x (a)) i
a=1
a=1 Note that multiservers can be modeled by type-A and type-B functions
B) the state of the node in chain c ni(c)
Example: PS or LCFSPr node with class dependent service rates and m servers
let yi(c)(ni(c)) a positive functions defined similarly to xi above can be modelled by
=> function gi(ni) in the product-form is multiplied by factor xi(ni) = min {m, ni}/ ni
yi(c)(ni(c)) = ni(c)
ni
Page ‹n.›
BCMP QN - multi-class multi-chain BCMP QN - multi-class multi-chain
Consider multi-class multiple-chain QN functions gi(ni ) depend only on
node i and class r parameters eir(c) and µ ir(c) and
Customers can move within a chain with class switching node i and class r state nir(c)
routing probability matrices P(c) = [pir,js(c)] for each chain c C ,
C nir(c)
that define the traffic equation system (ρir(c) )
from which we derive the visit ratio of (relative) throughputs eir(c) gi (ni) = ni! ∏∏ nir(c) !
for nodes of type 1, 2 and 4 (FCFS, PS and LCFSPr)
(ρir(c) )nir
C (c)
Let ρ ir(c) = eir(c) / µir(c)
M nodes, R classes C chains, multi-class multi-chain (R≠ C) gi (ni) = ∏∏n ir
(c) !
for nodes of type 3 (IS)
S. Balsamo, A. Marin - Università Ca’ Foscari di Venezia - Italy 50 S. Balsamo, A. Marin - Università Ca’ Foscari di Venezia - Italy 51
SFM ‘07 - PE SFM ‘07 - PE
Page ‹n.›
Product-form QN Product-form QN and properties
Under some assumptions local balance
(e.g., non-priority scheduling, infinite queue capacity, non-blocking factors,
state-independent routing) the effective rate at which the system i the effective rate at which the system
it is possible to give conditions on leaves state ξ due to
a service completion of
= enters state ξ due to
an arrival of
- service time distributions
a chain r customer at station i a chain r customer to station i
- queueing disciplines
to determine whether a well-formed QN yield a BCMP-like product-form solution
If π satisfies the local balance equations => it satisfies also the global balance equations
(LBEs) ⇐ (GBEs)
Properties strictly related to product-form
local balance LBEs are a sufficient condition for network solution
M M Solving LBEs is computationally easier than solving GBEs
quasi-reversibility but it still requires to handle the set of reachable states
station balance (can be a problem for open chains or networks)
M M
for each station LBE is a property of a station embedded in a QN, since the considered states are still
network states
station balance Product-form
for each station
Note: a service center with work-conserving discipline and independent on service time
local balance and exponentlial service time holds LBE
Page ‹n.›
Product-form QN and properties Product-form QN and properties
M => M property quasi-reversibility property
For a single queueing system: if the queue length at a given time t is independent
an open queueing system holds M => M property if of the arrival times of customers after t and
under independent Poisson arrivals per class of customers, of the departure times of customer before t
then the departure processes are also independent Poisson processes
then a queueing systems holds quasi-reversibility
M M property applies to the station in isolation
A QN with quasi-reversible stations => QN has product-form solution
It can be used to decide whether a station (with given queueing discipline and
service time distribution) can be embedded in a product-form QN Quasi-reversibility property is defined for isolated stations
A station with M M => the station has a product-form solution One can prove that
all the arrival streams to a quasi-reversible system should be independent
An open QN where each station has the M M => the QN has M M and Poisson, and
all departure streams should be independent and Poisson
For a QN with stations with non-priority scheduling disciplines property
A system is quasi-reversible <=> it has M M
M M for every station <=> local balance holds
S. Balsamo, A. Marin - Università Ca’ Foscari di Venezia - Italy 54 S. Balsamo, A. Marin - Università Ca’ Foscari di Venezia - Italy 55
SFM ‘07 - PE SFM ‘07 - PE
Page ‹n.›
Product-form QN and properties Product-form QN and properties
Station balance Insensitivity
A scheduling discipline holds station balance property if For symmetric disciplines the QN steady state probabilities
the service rates at which the customers in a position of the queue are served only depend on
are proportional to the average of the service time distribution and
the probability that a customer enters this position the (relative) visit ratio
examples:
IS, PS, LCFSPr are symmetric
Note:
but FCFS does not yields station balance only symmetric scheduling disciplines allow product-form solution for
δ(p,n+1) = 1 if p=n+1, 0 otherwise, ϕi(p,n) = 1, if p=1, 0 otherwise non-exponential service distribution
station balance is defined for an isolated station symmetric disciplines immediately start serving a customer at arrival time
=> they are always pre-emptive discipline
It is a sufficient condition for product-form
S. Balsamo, A. Marin - Università Ca’ Foscari di Venezia - Italy 56 S. Balsamo, A. Marin - Università Ca’ Foscari di Venezia - Italy 57
SFM ‘07 - PE SFM ‘07 - PE
Page ‹n.›
Product-form QN: further extensions Product-form QN: algorithms - single chain
Special forms of state-dependent routing
depending on state Algorithms for closed QN with M stations and K customers (single chain)
of the entire network or
of subnetworks and/or
Polynomial time computational complexity
single service centers
Special forms of QN with finite capacity queues and various blocking mechanisms Convolution
various types of blocking evaluation of the normalizing constant G and average performance indices
constraints depending on blocking type, topology and types of stations
Batch arrivals and batch departures MVA
direct computation of average performance indices
Special disciplines
(mean response time, throughput, mean queue length)
example: Multiple Servers with Concurrent Classes of Customers
PASTA theorem (arrival theorem)
G-networks: QN with positive and negative customers that can be used to represent
special system behaviors Convolution
Negative customer arriving to a station reduces the total queue length by one if the queue based on a set of recursive equations, derivation of
length is positive and it has no effect otherwise. They do not receive service. - marginal queue length distribution πi(ni)
- mean queue length Ni
A customer moving can become either negative or remain positive - mean response time Ri
Exponential and independence assumptions, solution based on a set of non linear traffic eq. - throughput Xi
Various extentions: e.g.,multi-class, reset-customers, triggered batch signal movement - utilization Ui
Page ‹n.›
Product-form QN: Convolution Algorithm Product-form QN: Convolution Algorithm
Direct and efficient computation of the normalizing constant G in product-
form formula Gj(0) = 1 1≤j≤M
G0(0) = 1
Assume that stations G0(k) =0 0<k≤K
1,…, D have constant service rate IS discipline (type-3) (delay stations) G1(k) = g1(k) 0≤k≤K
D + 1,…,D+I have load independet service rates (load-independent)
For the first D stations with IS disciplines we immediately obtain, for 0≤k≤K
(simple stations)
D + I + 1,…, D + I + L = M have load-dependent service rates D
k
M'
1
Gj(k) normalizing constant for the QN considering a population
of k customers and the first j nodes
GGM'(k) =
D(k) !"
j=1
j k!
S. Balsamo, A. Marin - Università Ca’ Foscari di Venezia - Italy 60 S. Balsamo, A. Marin - Università Ca’ Foscari di Venezia - Italy 61
SFM ‘07 - PE SFM ‘07 - PE
Page ‹n.›
Product-form QN: Convolution Algorithm Product-form QN: Convolution Algorithm
Performance indices Performance indices
throughput queue length distribution
G M(K-1) GM - {j}(K-k)
X j (K) = ej ! j (k)
πi (k) = g=i (n
fj (k)
G M(K) i) G M(K)
utilization GM-{j}(k) normalizing constant of the network obtained by the original network
* Uj(K) = 0 1≤j≤D, IS node with station j removed
* Uj(K) = Xj(K) / µj mj D+1≤j≤D+I, simple station, mj servers
K
that simplifies as
* U j (K) = ! min{k, m } ! (k) / m j j j D+I+1≤j≤M, load-dependent station
k=1 ! j (k) = !j
k
{G M }/G
(K-k) - !j GM(K-k-1) (K)
M
Page ‹n.›
Convolution Algorithm - multi-chain QN Convolution Algorithm - multi-chain QN
Performance indices for each node i and chain c For the first D stations with IS disciplines we immediately obtain, for 0≤k≤K
K (c) population of a closed chain c C
n (1) n (c)
1
K KR
D
M' D
M'
Gj(k) normalizing constant for the QN with a population 1
of k = (k1,…kR) customers and the first j nodes
GGM' (n) =
D (K) !ρ"
j=1
(1)
j j1 … !ρ"
j=1
(c)
j jR
n(1)
K !…nR(c)
1 ! …K
! !
Gj = ( Gj(0) … Gj(K) )
j
Throughput Xj(c) = ej(c) GM(K-1c) / GM(K)
Gj (k) = ! # fg(n(n) ) ii i i
n " E(j,k) i = 1
Utilization Uj(c) = ρj(c) GM(K-1c) / GM(K)
E(j,k) state space of the QN with j stations and k customers
Mean queue length Nj(c) = ∑1≤a≤K(c) ∑ n: n (c)=a Prob{ni =n}
Then G = GM (K)
k Computational complexity
G j (k) = !
n=0
fgj (n)
j (n)G
Gj-1j-1(k-n)
(k-n) convolution H = ∏ 1≤c≤C (K(c) + 1)
an iteration step of Convolution
for a simple station requires O(C H )
For the I stations with load-independent service rate we can write
for a load- dependent station requires O(H 2)
CR
Special case: QN where all the chains have K(c)=K=K/C ,
G j (k) = Gj-1(k) + ! ρ"
rc=1
=1
(c)G (k
jjr
- e r) )
G (K-1
j j-1 c
0!k!K D+1≤j≤D+I
with load-independent stations, then O(M C K C)
S. Balsamo, A. Marin - Università Ca’ Foscari di Venezia - Italy 64 S. Balsamo, A. Marin - Università Ca’ Foscari di Venezia - Italy 65
SFM ‘07 - PE SFM ‘07 - PE
Page ‹n.›
Product-form QN: MVA Product-form QN: MVA
MVA
1) Mean response time
- directly calculates the QN performance indices Rj(K) = 1 / µj 1≤j≤D, IS node (delay node)
- avoids the explicitly computation of the normalizing constant
1
- based on the arrival theorem and on Little’s theorem Rj (K) = ( 1 + Nj (K-1) ) D+1≤j≤D+I, simple node (load-independent)
µj
Arrival theorem (Arrival theorem)
K
[Sevcik - Mitrani 1981; Reiser - Lavenberg 1980 ] n
In a closed product-form QN
Rj (K) = !
n=1
! (n-1 | K-1)
µj (n) j
K>0
the steady state distribution of the number of customers at station i D+I+1≤j≤M , load-dependent
at customer arrival times at i
2) Throughput
is identical to
the steady state distribution of the number of customers at the same station Xj (K) =
K
(Little’s theorem)
for each node j
at an arbitrary time with that user removed from the QN M
ei
S. Balsamo, A. Marin - Università Ca’ Foscari di Venezia - Italy 66 S. Balsamo, A. Marin - Università Ca’ Foscari di Venezia - Italy 67
SFM ‘07 - PE SFM ‘07 - PE
Page ‹n.›
Product-form QN: MVA Product-form QN: MVA
Computational complexity
3) For load dependent stations
queue length distribution - For single-chain QN without load-dependent stations with
Xj (K) K customers and M nodes, as Convolution O(KM )
! j (n | K) = ! j (n-1 | K-1) 1"n"K , K>1
µj (n)
- For single-chain QN with has only load-dependent stations O(MK 2)
K (better than Convolution O(M 2 K 2))
- To overcome numerical instability MMVA has the same complexity as Convolution
! j (0 | K) = 1 - ! ! (n | K)
n=1
j
- For multi-chain QN
H = ∏ 1≤c≤C (K(c) + 1)
Initial conditions: an iteration step of MVA
πj(0|0) = 1 for each node j for a simple station requires O(C H )
Nj(0) = 0 for a load- dependent station requires O(K C H )
(better than Convolution O(H 2))
Potential numerical instability
MMVA modified MVA - Special case: QN where all the chains have K(c)=K=K/C ,
Xi (K) with load-independent stations, then as Convolution O(M C K C)
!j (0 | K ) = ! j (0 | K-1) XiM-{j}(K) throughput of any node i
M - {j}
Xi (K) computed for the QN with node j removed - MVA considers only type A capacity function, Convolution types A and B
- MVA is generalized to compute higher moments of performance measures
S. Balsamo, A. Marin - Università Ca’ Foscari di Venezia - Italy 68 S. Balsamo, A. Marin - Università Ca’ Foscari di Venezia - Italy 69
SFM ‘07 - PE SFM ‘07 - PE
Page ‹n.›
Product-form QN: algorithms for multi-chain Product-form QN: algorithms for multi-chain
• Convolution MVAC and DAC
• MVA (Mean Value Analysis) - extends MVA with a recursive scheme on the chains
• Recal (Recursion by Chain Algorithm) - direct computation of some performance parameters
• DAC - numerically robust, even for load-dependent stations
• Tree convolution - possible numerical problems
• Tree-MVA
Tree-MVA and Tree-Convolution
- for sparse network is sparse,
RECAL (most of the chains visit just a small number of the QN stations)
- main idea: build a tree data structure where QN stations are leaves
- for networks with many customers classes but few stations that are combined into subnetworks in order to obtain
the full QN (the root of the tree)
- main idea: - locality and network decomposition principle
recursive scheme is based on the formulation of the
normalizing constant G for C chains as function of the
normalizing constant for C − 1 chain For networks with class switching:
Note: it is possible to reduce a closed QN with C ergodic chains
- if K(c) = K for all the chains c, M and K constant, and class switching to an equivalent closed network with C chains
then for C → ∞ the time requirement is O(CM+1 ) without class switching
S. Balsamo, A. Marin - Università Ca’ Foscari di Venezia - Italy 70 S. Balsamo, A. Marin - Università Ca’ Foscari di Venezia - Italy 71
SFM ‘07 - PE SFM ‘07 - PE
Page ‹n.›
Approximate analysis of QN Markov Process Decomposition
Markov process with state space E and transition matrix Q
Many approximation methods
• Identify a partition of E into K subsets
Most of them do not provide any bound on the introduced error
Validation by comparison with exact solution or simulation E=U 1≤k≤K Ek
⇒ decomposition of Q
• decomposition-aggregation procedure
Basic principles
- decomposition applied to the Markov process π(S) = Prob(S | Ek) πa (E k)
- decomposition applied to the network (aggregation theorem) Prob(S|Ek) conditional distribution
- forced product-form solution πa aggregated probabilities
- for multiple-chain models: approximate algorithms for product-form
QN based on MVA • computation of π(S) reduces to
- exploit structural properties for special cases the computation of Prob(S | Ek) ∀ S, ∀Ek
the computation of πa
- other approaches
• exact computation soon becomes computationally intractable
Various accuracy and time computational complexity EXCEPT FOR special cases (symmetrical networks)
S. Balsamo, A. Marin - Università Ca’ Foscari di Venezia - Italy 72 S. Balsamo, A. Marin - Università Ca’ Foscari di Venezia - Italy 73
SFM ‘07 - PE SFM ‘07 - PE
Page ‹n.›
Process and Network Decomposition Approximate analysis of QN
Heuristics take into account the network model characteristics
For multiple-chain QN
NOTE: the identification of an appropriate state space partition affects approximate algorithms for product-form QN based on MVA
the algorithm accuracy - Bard and Schweitzer Approximation
the time computational complexity - (SCAT) Self-Correcting Approximation Technique
generalized as the Linearizer Algorithm
If the partition of E corresponds to a NETWORK partition into subnetworks
Main idea:
⇒ network decomposition subsystems are (possibly modified) subnetworks
approximate the MVA recursive scheme and
The decomposition principle applied to QN apply an approximate iterative scheme
is based on the aggregation theorem for QN
Mean queue length
1. network decomposition into a set of subnetworks For population K, the MVA recursive equations require Nj(c) (K - 1d)
2. analysis of each subnetwork in isolation to define an aggregate component for each chain d
3. definition and analysis of the new aggregated network Approximation: Nj(c) (K - 1d)= ( |K - 1d |c / K(c) ) Nj(c) (K )
S. Balsamo, A. Marin - Università Ca’ Foscari di Venezia - Italy 74 S. Balsamo, A. Marin - Università Ca’ Foscari di Venezia - Italy 75
SFM ‘07 - PE SFM ‘07 - PE
Page ‹n.›
Example: machine repair model Example: machine repair model
µ1 µ2
Page ‹n.›
Example: machine repair model Example: database mirror
A database (DB) repository system with two servers: master and a mirror
µ1 µ2
The arrival is dispatched to the primary or to the mirror
When a query is sent to the mirror:if the data are not found, then the mirror
Examples of performance measures redirects the query to master
– steady state probability distribution π(n1, n2)
(n1 active machines and n1 machines in waiting to be repaired) Design of the optimal dispatcher routing strategy
– mean number of working machines, and mean number of machines in repair min system response time, given the DB average service times,
(N1 and N2) the cache hit probability for the slave database, and the arrival rate
– the utilization at station 1
(U1 ratio between the effective average work and the maximum work)
– mean time that a machine is broken (R2 ) Under some independence and exponential assumptions: BCMP QN
S. Balsamo, A. Marin - Università Ca’ Foscari di Venezia - Italy 78 S. Balsamo, A. Marin - Università Ca’ Foscari di Venezia - Italy 79
SFM ‘07 - PE SFM ‘07 - PE
Page ‹n.›
Example: database mirror Open problems
Model: open BCMP QN where a request is a customer Extension of QN
M = 3 stations
- special features of real systems
- station 1 represents the dispatcher - models of classes of systems
- station 2 the master e.g.: software architectures, mobile systems,real time systems, …
- station 3 the mirror LQN, G-nets, …
Assume Poisson arrivals of requests with rate λ Solution algorithms and product-form QN
If we assume request independent routing
=> single chain QN, otherwise we should use a multi-chain model - identify efficient algorithms to evaluate average performance measures
consider the new classes of product-form QN
A request can be fulfilled by the mirror with probability q and
it generates a new request to the master with probability 1−q - explore/extend product-form class of QN
dispatcher -> delay station - identify efficient approximate and bound algorithms
DB stations -> with PS queueing discipline Coxian service time distribution for non product-form QN to evaluate average performance measures
Visit ratios: e1=1, e2=p+(1−p)(1−q), e3= 1−p
Then by setting ρi= λei/µi where µ i is the mean service rate of station i, i=1,2,3 Properties of QN
BCMP formulas if ρi=<1
Examples: evaluate average response time for each node i R i - explore the relations with other classes of stochastic models
and average overall response time - product-form classes
- hybrid modeling
R = R1+e2R2+e3R3
- explore the possible integration of various types of performance models
Possible parametric analysis of response time R as function of probability p
to identify the optimal routing strategy
S. Balsamo, A. Marin - Università Ca’ Foscari di Venezia - Italy 80 S. Balsamo, A. Marin - Università Ca’ Foscari di Venezia - Italy 81
SFM ‘07 - PE SFM ‘07 - PE
Page ‹n.›