You are on page 1of 37

STOCHASTIC MODELS

-
Queueing Networks

alessandro.pilloni@unica.it 1
1
Queueing networks
• In many real-world systems customers are served asynchronously in more than
one server station arranged in a network structure

• All nodes of the network represent queues interconnected by some paths


• Queueing networks are successfully used for resource allocation purposes in
✓ telecommunications and computing networks
✓ manufacturing systems
✓ transport systems, etc..

Customers, upon the completion of their


service at a server, moves to another for
additional services or leave the system
according some routing disciplines
(either deterministics or stochastics).
The Internet itself is
a queueing networks
alessandro.pilloni@unica.it 2
Open network and closed network
Queueing network models can be classified into three groups
• Open networks: costumers arrive from external sources, circulate, and
eventually depart
0.5 0.5
1in
0.5
1 1 2 2 3 3
0.5
2in

• Closed queueing network: fixed population of N jobs circulate continuously and


never leave the system.
1-p

1 2 The system is isolated


p with N costumers within
N costumers

• Mixed queueing network: if it behaves as open for some types of customers,


and closed for other types.
alessandro.pilloni@unica.it 3
Open network and closed network (cont’d)
• Consider a QN with 𝑣 queues, refferred as nodes

• Let 𝑥𝑖 (𝑡) be the number of customers at time 𝑡 in node 𝑖 = 1,2, … , 𝑣

• The total number of customers in the network is

• Open QNs: external customers are allowed to join the system (𝑥(𝑡) is time-varying)
• Closed QN: the number of customers in the system is constant (𝑥(𝑡) is time-invariant)

• Remark 1: If the arrival rate into and the departure rate out are approximately the
same, the QN can be modeled as a closed network without sacrificing too much.

• Example 1: A car service center supporting a fixed number of cars is a closed QN.
• Example 2: Every social service during the CoVid-19 pandemy. Indeed, only a limited
number of people may access to service network at the same time, and, as soon as
one leave the system, only one external costumer may access the system
alessandro.pilloni@unica.it 4
Queueing network’s characterization
• A Queueing Network (QN) can be represented by a graph describing the so-
called routing discipline. It consists of:

✓ A set of nodes (one for each service stations) 𝑉 = {1, 2, . . . , 𝑣 }


✓ A set of arcs 𝑖, 𝑗 ∈ 𝐸 ⊆ 𝑉 × 𝑉 respecting the possibility that a costumer
after being served at node 𝑖 join node 𝑗

• Each node or service station is described by


✓ The number of servers 𝑚𝑖
✓ The service rate 𝜇𝑖

• QNs need a characterization of the customers population


✓ If QN is closed we need to know population size
✓ If QN is open we need infos on the arrival process within each node 𝜆𝑖𝑛
𝑖

alessandro.pilloni@unica.it 5
Particular QN topologies

• Tandem QN: It is the simplest Open QN. It consists of many queues in series.

arrivals departures
𝜇1 𝜇𝑣

• Applications: Assembly lines, sequential computations, are some obvious


instances of Tandem QNs

• Open QNs with feedbacks

arrivals departures
𝜇1 𝜇2

feedback

• Interpretation: The 1st station provides a service. The 2nd verify the service
quality. If it is acceptable the piece leave the system with a given probability
alessandro.pilloni@unica.it 6
Particular QN topologies

• Cyclic QN: It is the simplest closed QN. It consists of a loop of many queues in
series.
𝜇1 𝜇2
It’s the closed counterpart of
the tandem QN for open QN
N jobs

• Otherwise, we refer to generic QNs.

Under the assumption of Markovian nodes, in the following, we will learn how
perform a steady state analysis of a QN

𝜇1 𝜇2 𝜇3 𝜇1 𝜇2

Generic Markovian open QN Generic Markovian closed QN


alessandro.pilloni@unica.it 7
Queuing Network
• Consider a QN of 𝑣 nodes (queues).
• Let 𝑋𝑖 be the r.v. associated with number of costumers in the 𝑖-th station
• Let 𝑥𝑖 be a possible number of costumer within the 𝑖-th station
• We define the following row vectors

• Then the probability of having a given deployment of costumes within the


system is denoted by a joint probability distribution function

alessandro.pilloni@unica.it 8
Analysis of queuing networks
• If the inter-arrival and service times are exponential, Queueing Theory provides
tools to systematically characterize an M/M/m queue at the steady-state

Burkes’ Theorem: Consider a M/M/1, or a M/M/m or a M/M/∞ queue.


Let 𝜆 be the mean arrival rate of costumers to the queue. Then
a) The number of customers in the queue at any time 𝑡 is independent from the
departure process prior to time 𝑡 ′ < 𝑡
b) At the steady-state the departure process is Poisson with the rate 𝜂 = 𝜆;

• It holds also for QNs without loops (thus only for Tandem queues)

• Example 1: Consider the next open QN 𝑥1 𝑡 = 7


𝜆𝑖𝑛
• Let 𝑝 ≫ (1 − 𝑝) and 𝜇1 ≫ 𝜆𝑖𝑛 1−𝑝
𝜆1 = 𝜆𝑖𝑛 + 𝑝𝜆1 𝜇1
𝜂1 ≡ 𝜆1
• The loop makes the effective arrival 𝑝
process and the departure process
Ext. arr. Ext. arr.
dependent to each other. Internal arrival bursts
⇒ the Burke’s theorem does not hold
alessandro.pilloni@unica.it Mixture of exponential arrivals 9
Tandem Queue analysis
• For Tandem queues where the arrivals and the service are independent the
Burke’s Theorem holds. Then each queue can be studied separately.

• Theorem: Consider QN with 𝑣 M/M/1 nodes in series. External arrivals are


Poisson with rate 𝜆. Service times are exponential with rate 𝜇𝑖 , 𝑖 = 1,2, … , 𝑣.
• Let 𝜆𝑖 be the arrivals to node 𝑖 from node 𝑖 − 1, and let 𝑋𝑖 be the r.v. associated
with the #costumers in the 𝑖-th node, and 𝜋𝑖 𝑥𝑖 = Pr(𝑋𝑖 (∞) = 𝑥𝑖 )
• Due to the absence of loops, nodes are independent, then if queues are
ergodic, 𝜆/𝜇𝑖 < 1, the joint stationary probability takes the product form

• Thus, the mean number of costumers in the QN is given by

alessandro.pilloni@unica.it 10
Examples
• Example 2: Consider the following Tandem QN of two M/M/1 stations
𝜆1 𝜆2
𝜆
1 2

• This QN can be modelled by an infinite CT-MC which states consist of the pair of
r.v. 𝑋1 , 𝑋2 ∈ ℕ0 × ℕ0 counting all the deploy of costumers to the two nodes

alessandro.pilloni@unica.it 11
Examples (cont’d)
• If the QN is ergodic (i.e. each queue is ergodic as well), the stationary
probabilities can be found by solving the resulting balancing equations

• That is the product form mentioned before

alessandro.pilloni@unica.it 12
Examples (cont’d)
• Example 2: Consider the following Tandem QN of two M/M/1 stations
𝜆1 𝜆2
𝜆
1 2

• Since the services are independent, form the Burke’s Theorem the throughput
of the first resource at steady state is

• As a consequence, it further results that

• Thus, by means of the Little’s Law, the mean time spent in the QN is

alessandro.pilloni@unica.it 13
Markovian Open QN (or Jackson Networks)
• Consider an open QN of M/M/m nodes where arrivals at node 𝑖 from outside
1
are Poisson with rate 𝜆𝑖𝑛
𝑖 and the service times are exponential with mean
𝜇𝑖

• Let 𝑟𝑗𝑘 be probability that a customer after being served at node 𝑗 requests a
service from node 𝑘, and 𝑟𝑗0 that to leave the QN after service at node 𝑗

The Routing probabilities satisfy

• By the composition of processes, the if a steady-state exists (i.e. if the process


is ergodic), it will be such that it satisfies to the so-called

Traffic equation for node 𝑖

• Example 1:
𝜆𝑖𝑛
𝑟10 = 1 − 𝑝
𝜆1 = 𝜆𝑖𝑛 + 𝑟11 𝜆1 𝜇1

𝑟11 = 𝑝

alessandro.pilloni@unica.it 14
Examples (cont’d)
• Example 3: Consider the following Jackson Network of 3 M/M/1 nodes

𝑟10 = 0.5 𝑟20 = 0.5 𝑟30 = 0.5


𝑟12 = 0.5 𝑟23 = 0.5
1 1 2 2 3 3

𝜆1𝑖𝑛 = 7 𝜆𝑖𝑛
2 =7 𝜆𝑖𝑛
3 = 14
𝑟31 = 0.5

• If the QN is ergodic the steady-state mean arrival/departure rates will satisfies

• Remark: The previous result is independent from the service rates have
is only a necessary condition for ergodicity
alessandro.pilloni@unica.it 15
Ergodic condition for Jackson Networks
• Theorem: Consider a Jackson Network. Let 𝜆𝑖𝑛 𝑖 and 𝜆𝑖 be the arrivals rate from
outside, and the throwing flows of the 𝑖-th resource. Then let

• A Jackson Network is ergodic iff, each node is ergodic as well, namely

• Interpretation: If the QN is ergodic each node will be throwed by a steady


constant flow of costumers at the steady-state regime

• Remark: Notice that

• is necessary but not sufficient condition for having the Jackson Network
ergodic, because in additions we need also that 𝜆𝑖 /𝜇𝑖 < 1 ∀ 𝑖 = 1,2, … , 𝑣
alessandro.pilloni@unica.it 16
Stationary distribution of Open Jackson Networks

• Jackson Theorem: Consider an ergodic open QN of 𝑣 M/M/m nodes


• Let 𝜆𝑖𝑛
𝑖 be rate of arrivals at node 𝑖 from outside, 𝜇𝑖 its mean service rate, and
𝜆𝑖 its mean rate of arrivals satisfying

• Then at the steady state the number of costumers in different nodes are
independent. Thus, arrivals/departures to each node behaves as Pois(𝜆𝑖 ).

• This implies that, at steady state, each station behaves as an isolated queue
despite both loops and connections. Thus, the QN joint probabilities have the
product form below

• where

alessandro.pilloni@unica.it 17
Examples (cont’d)
• Example 5: Consider the open Jackson network of Example 3
𝑟10 = 0.5 𝑟20 = 0.5 𝑟30 = 0.5
𝑟12 = 0.5 𝑟23 = 0.5
1 1 2 2 3 3
𝜆1𝑖𝑛 = 7 𝜆𝑖𝑛
2 =7 𝜆𝑖𝑛
3 = 14
𝑟31 = 0.5

• Let

• In Example 3 we found that , then

• Since the QN is ergodic from the Jackson Theorem one has

alessandro.pilloni@unica.it 18
Little’s Law for Queuing Networks
• Let us consider any any arbitrarily complex Jackson network

• If the QN is ergodic, then the Little’s Law holds in a wider-sense, namely:

• Let 𝜆𝑖𝑛 be the total rate of arrivals for outside to the network:

• Let 𝑥ҧ be the mean number of costumer in the QN at the steady-state

• Then the mean time spent by a costumer is QN is

alessandro.pilloni@unica.it 19
Examples (cont’d)
• Example 6: Consider the open Jackson network of Example 3
𝑟10 = 0.5 𝑟20 = 0.5 𝑟30 = 0.5
𝑟12 = 0.5 𝑟23 = 0.5
1 1 2 2 3 3
𝜆1𝑖𝑛 = 7 𝜆𝑖𝑛
2 =7 𝜆𝑖𝑛
3 = 14
𝑟31 = 0.5

• where
• and

• Then, the mean time spent by a costumer to cross the network is

alessandro.pilloni@unica.it 20
Gordon–Newell Networks
• Consider Jackson Network, where costumers cannot enter or leave the system,

𝜆𝑖𝑛
𝑖 = 𝑟𝑖0 = 0

Gordon–Newell Network (or closed Jackson Networks)

• They are to model a QN with a time-invariant number of customers

State space of a closed QN


• Let 𝑛 be #costumers. Let 𝑣 be the #nodes. Let 𝑁𝑛,𝑣 be state-space of the QN
• 𝑁𝑛,𝑣 considers all the possible arrangements of 𝑛 costumers into the 𝑣 nodes
• The cardinality 𝑁𝑛,𝑣 can be derived by the formula #combination with repetition

alessandro.pilloni@unica.it 21
Examples (cont’d)
Remark: Notice that the following problems are equivalent:
• The number of arrangement 𝑛 identical objects among 𝑣 distinct containers
• The number of combinations with repetition of 𝑣 objects taken 𝑛 at a time

Example A: Consider all the arrangement 𝑛 = 2 costumers on 𝑣 = 3 queues

2,0,0 , 0,2,0 ,
𝑛+𝑣−1 2+3−1 4!
𝑁2,3 = 0,0,2 , 1,1,0 , → 𝑁2,3 = = = =6
𝑛 2 2! 2!
1,0,1 , (0,1,1)

Example B: Let us consider the set 𝐴 = {𝑎, 𝑏, 𝑐} where 𝑣 = 𝑐𝑎𝑟𝑑 𝐴 = 3


• The set of combination with repetition of 𝑣 = 3 object take 𝑛 = 2 at time is

𝑎𝑎 , 𝑏𝑏 , 𝑐𝑐 , 𝑛+𝑣−1 2+3−1 4!
𝑁2,3 = → 𝑁2,3 = = = =6
𝑎𝑏 , 𝑎𝑐 , (𝑏𝑐) 𝑛 2 2! 2!
*Two combinations with repetition are identical if they have the same elements repeated
the same number of times, regardless of their order.
alessandro.pilloni@unica.it 22
Examples (cont’d)
• Example 7: Consider a closed QN with 𝑣 = 2 stations and 𝑛 = 3 costumers

• The state space of this closed QN counts all the possible arrangement of the
𝑛 = 3 costumers over 𝑣 = 2 nodes, namely,

• Then, it results that

alessandro.pilloni@unica.it 23
Gordon–Newell Networks (cont’d)

• A Gordon-Newell Network is a closed QN of 𝑣 M/M/m resources where:


a) Node’s service-times are independent and exponentially distributed with
mean 1/𝜇𝑖

b) The routing probabilities satisfies that


where 𝑟𝑖𝑗 is probability a customer after completing a service at node 𝑖
requests a service to node 𝑗, whereas 𝑟𝑖0 = 0.

c) Node’s costumer flows 𝜆𝑖 are not independent (thus not Poisson) because
arrivals and departures depend to the actual costumer's deployment

• Remark: For open QNs we seen that if stations are ergodic, each queue at least
at the steady-state behaves as independent. This is not the case of closed QN.

• Since σ𝑖 𝑥𝑖 (𝑡) = 𝑛 ∀ 𝑡 ≥ 0, the probability to have 𝑘 ≤ 𝑛 customers in node 𝑗


will always depend to the current number of customers in each QN’s node

alessandro.pilloni@unica.it 24
Analysis of Gordon–Newell Networks
• Example: Consider the 2 arrangement of costumers on a closed QN

✓ 𝑟𝑘𝑗 is the routing probability from node 𝑘 to node 𝑗


✓ 𝛾𝑘,𝑥𝑘 is the departure rate from node 𝑘 | it contains 𝑥𝑘 costumers

• Suppose only the 20% of departures from node 𝑘 may reach node 𝑗 (𝑟𝑘𝑗 = 0.2)
• Suppose node 𝑘 is a M/M/3, and 𝑥𝑘 = 5, thus 𝛾𝑘𝑗 = 3𝜇𝑘

• From that it is easy understand that every generic closed QN can be modelled
as a CT-MC which transition rates can properly be evaluated by means of

✓ the routing probabilities 𝑟𝑘𝑗 ✓ the node’s service rate 𝜇𝑘


✓ the # of costumers in the node 𝑥𝑘 ✓ the node’s # of servers 𝑚𝑘
alessandro.pilloni@unica.it 25
Examples (cont’d)
• Example 8: Consider a cyclic QN with an M/M/𝑚1 and an M/M/ 𝑚2 node

𝜇1 𝜇2

• From that one derives that 𝑛=3

• Since the 100% of costumer leaving node 1 will reach node 2 and vice-versa,
the CT-MC associated to this cyclic QN is

• Since the above graph is irreducible the CT-MC is ergodic. Thus one derives that

alessandro.pilloni@unica.it 26
Examples (cont’d)
• Example 9: Consider a closed QN with an M/M/𝑚1 and an M/M/ 𝑚2 node
𝑟22 = 1 − 𝑝

𝜇1 𝜇2
𝑟12 = 1 𝑟21 = 𝑝
𝑛=3

• Since 𝑣 = 2 and 𝑛 = 3 its sample-space 𝑁3,2 is the same of Example 8


• Due to the given routing probabilities the following ergodic CT-MC takes place

alessandro.pilloni@unica.it 27
Ergodic Gordon–Newell Networks
• If 𝑛 is large, verify if a closed QN is ergodic passing through its CT-MC may become a
computationally inefficient (the 𝑸 size may be large)
• An easier way to determine if the closed QN is ergodic is by means on consideration on
the traffic equations, and/or on its graphical representation.

• Theorem: A Gordon-Newell Network is ergodic if and only if the routing probability


matrix 𝑹 has a single eigenvalue in 𝜆1 = 1.

• Remark 1: For a closed QN 𝑹 is row-stochastic

• Remark 2: If the multiplicity of 𝜆1 is > 1, there exists more then 1 absorbing node

2 abs. queues
0.2
𝜇3
𝜇2 0.3
2𝑛 abs. states in the CT − MC 𝜇1
(0,0,0, 𝑎) 0.2 0.3 𝜇4
∀ 𝑎 = 0,1,2 … 𝑛
(0,0, 𝑛 − 𝑎, 0) n = cost.
alessandro.pilloni@unica.it 28
Examples (cont’d)
• Example 9: Consider a closed QN with an M/M/𝑚1 and an M/M/ 𝑚2 node
𝑟22 = 1 − 𝑝

𝜇1 𝜇2
𝑛=3 𝑟21 = 𝑝

This QN is ergodic because 𝑹


has a single eigenvalue in 1

• The same result can be derived by means of the criteria finite CT-MC

𝑸 has a single eigenvalue in 0


alessandro.pilloni@unica.it 29
Stationary distribution of Gordon-Newell Networks
• The steady-state joint probabilities of a closed QN can be derived by passing through
the analysis of its associated finite CT-MC

𝜇1 𝜇2
𝑛=3 𝑟21 = 𝑝

• However, since 𝑛 is time-invariant, at any 𝑡 ′ > 𝑡 the probability to have 𝑘 customers in


a node depend to customers distribution in each other node

• Differently to open QNs, now steady-state probabilities do not take a product form

(nodes are not independent)

• Although nodes depend to each other, also the joint steady-state probabilities of an
ergodic closed QN takes, a not-trivial, product form that is

(see GN Theor.)

alessandro.pilloni@unica.it 30
Stationary probabilities of Closed Gordon-Newell Networks
Gordon-Newell Theorem: Consider an ergodic closed QN of 𝑣 ⋅/M/𝑚𝑖 node.
Its joint steady-state probability distribution takes the following product form

• where 𝜅 is a normalization constant that is derived by the next constraint

• whereas 𝛽𝑖 (𝑥𝑖 ) are

If the 𝑖-th node is a ⋅/M/1

If the 𝑖-th node is a ⋅/M/𝑚𝑖

alessandro.pilloni@unica.it 31
Stationary distribution of Gordon-Newell Networks
• To evaluate the limiting distribution of a closed GN network by means of the
Gordon-Newell Theorem we need to find:
a) Their steady-state departure rates by solving the QN traffic equations, i.e,

b) Then, for each node 𝑖 we must determine its own traffic intensity

c) Finally, we must determine the functions 𝛽𝑖 (𝑥𝑖 ), ∀ 𝑥𝑖 ≤ 𝑛, as follows:

✓ If the 𝑖-th resource is a ⋅/M/1

✓ If the 𝑖-th resource is a ⋅/M/𝑚𝑖

alessandro.pilloni@unica.it 32
Examples (cont’d)
• Example 9: Consider a closed network with a M/M/1 and a M/M/2 station
𝑟22 = 1 − 𝑝

𝜇1 𝜇2
𝑛=3 𝑟21 = 𝑝

Since 𝑹 is row stochastic, there are


infinite many solutions in the form

• By selecting for simplicity 𝛼 = 2 then

alessandro.pilloni@unica.it 33
Examples (cont’d)
• Example 9: Consider a closed network with a M/M/1 and a M/M/2 station
𝑟22 = 1 − 𝑝

𝜇1 𝜇2
𝑛=3 𝑟21 = 𝑝

• The first queue is an M/M/1 thus

• The second queue is an M/M/2 thus

alessandro.pilloni@unica.it 34
Examples (cont’d)
• Example 9: Consider a closed network with a M/M/1 and a M/M/2 station
𝑟22 = 1 − 𝑝

𝜇1 𝜇2
𝑛=3 𝑟21 = 𝑝

• From the product form of stationary probabilities for Gordon-Newell QNs on


has that

alessandro.pilloni@unica.it 35
Examples (cont’d)
• Example 9: Consider a closed network with a M/M/1 and a M/M/2 station
𝑟22 = 1 − 𝑝

𝜇1 𝜇2
𝑛=3 𝑟21 = 𝑝
• From the 𝜅 definition, one has that

• Then by substituting on 𝜅 one derives

(which corresponds to what obtained


by solving its balancing equations)

• Remark: The GN-Theorem’s advantage is that allows to determine the QN’s steady-
state probability and metrics by means of efficient recursive algorithms and
without passing through its CT-MC modellization
alessandro.pilloni@unica.it 36
Extension to not markovian networks
• Attempts to extend these results to more general QNs, are currently under study.

• However, due to the problem complexity, at the moment, the most general and worth
to mention result comes from the far 1975

Baskett, F., Chandy M., Muntz R., Palacios J., “Open, closed, and mixed networks
with different classes of customers”, Journal of ACM, Vol. 22, pp. 248-260, 1975.

• The BCMP theorem extends the class of QN solvable by a product form to:

✓ Nodes with arbitrarily distributed service times (not only Exponentials)


✓ Costumers belonging to different classes, needs, behaviours and priorities
✓ Different service policies then the conventional FIFO discipline

• Resource allocation problems or QoS comparisons involving different types of Queues


or Network of Queues are instead solved by means of simulations

To this end see, e.g., the SimEvents® Matlab/SIMULINK Toolbox


Url: https://it.mathworks.com/discovery/queuing-theory.html
alessandro.pilloni@unica.it 37

You might also like