You are on page 1of 20

J. Virtamo 38.

3143 Queueing Theory / Queueing networks 1


QUEUEING NETWORKS
A network consisting of several interconnected queues
Network of queues
Examples
Customers go form one queue to another in post oce, bank, supermarket etc
Data packets traverse a network moving from a queue in a router to the queue in another
router
History
Burkes theorem, Burke (1957), Reich (1957)
Jackson (1957, 1963): open queueing networks, product form solution
Gordon and Newell (1967): closed queueing networks
Baskett, Chandy, Muntz, Palacios (1975): generalizations of the types of queues
Reiser and Lavenberg (1980, 1982): mean value analysis, MVA
J. Virtamo 38.3143 Queueing Theory / Queueing networks 2
Jacksons queueing network (open queueing network)
Jacksons open queueing network consists of M nodes (queues) with the following assumptions:
Node i is a FIFO queue
unlimited number of waiting places (innite queue)
Service time in the queue obeys the distribution Exp(
i
)
in each queue, the service time of the customer is drawn independent of the service
times in other queues
note: in a packet network the sending time of a packet, in reality, is the same in all
queues (or diers by a constant factor, the inverse of the line speed)
this dependence, however, does not markedly aect the behaviour of the system (so
called Kleinrocks independence assumption)
Upon departure from queue i, the customer chooses the next queue j randomly with the
probability q
i,j
or exits the network with the probability q
i,d
(probabilistic routing)
the model can be extended to cover the case of predetermined routes (route pinning)
The network is open to arrivals from outside of the network (source)
from the source s customers arrive as a Poisson stream with intensity
fraction q
s,i
of them enter queue i (intensity q
s,i
)
J. Virtamo 38.3143 Queueing Theory / Queueing networks 3
Node i in Jacksons network
_

_
s = source, external
d = destination, sink
N
i
= number of customers in queue i

i
q
s,i
q
d i i,
q
1,i 1
q
1 i i,
q
M,i M
q
M i i,

i
Exp( )
i
N
i
. .
. .
. .
Without complications one could assume state dependent service rates
i
=
i
(N
i
). This
could describe e.g. multiserver nodes. To simplify the notation, we assume in the sequel a
constant sevice rate
i
.
Jacksons network
The opnenness of the
network requires that
from each node there
is at leas one path (=
0) to the sink d, i.e.
the probability that a
customer entering the
network will ultimately
exit the network is 1.

4
nielud

q
s,1
q
s,2
q
s,3
q
3,2 3
q
3,4 3
q
2,4 2
q
2,d 2
q
1,2 1
q
1,d 1
q
1,4 1
q
4,1 4
lhdes
J. Virtamo 38.3143 Queueing Theory / Queueing networks 4
Conservation of the ows
Denote
i
= average customer ow through node i.
Although the external arrival streams to the nodes are Poissonian, there is no guarantee
that the ows inside the network were also Poissonian. In general, they are not.
except when there are no loops, i.e. a customer never re-enters a previously visited
queue; then the Poisson property follows from Burkes theorem.
Stream
i
is composed of the direct stream from the source and the split output streams from
other nodes:

i
= q
s,i
+
M

j=1

j
q
j,i
i = 1, . . . , M
The conservation laws constitute a set of
linear equations, from which the
i
can be
solved.
A similar equation holds for the destination d. Since the total
stream exiting the network must equal the stream entering the
network, we have (q
s,d
= 0):
=
M

j=1

j
q
j,d
Example

1
q
1-q

1
= + q
1

1
=

1 q
Note.
1
is not Poissonian although is.
J. Virtamo 38.3143 Queueing Theory / Queueing networks 5
Jacksons theorem
The number of customers N
i
in dierent nodes, i = 1, . . . , M, are independent.
Queue i behaves as if the arrival stream
i
were Poissonian.
State vector
The network state is determined by the vector N = (N
1
, . . . , N
M
).
Its possible values are denoted by n = (n
1
, . . . , n
M
).
The network is in state n when N = n, i.e. N
1
= n
1
, . . . , N
M
= n
M
.
State probability
p(n) = P{N = n}
Dene p(n) = 0,
if some n
i
< 0
Jacksons theorem
p(n) = p
1
(n
1
) p
M
(n
M
) =
M

i=1
p
i
(n
i
) where p
i
(n
i
) = (1
i
)
n
i
i

i
=
i
/
i
The network behaves as if it were composed of idependent M/M/1 queues.
The state probability is of the product form independence.
If there are many customers in one of the nodes, this does not imply anything about the
number of customers in other nodes.
If the service rate is state
dependent
i
(n
i
), then
p
i
(n
i
) = p
i
(0)

n
i
i
n
i
j=1

i
(j)
where p
i
(0) is determined by
the normalization condition.
J. Virtamo 38.3143 Queueing Theory / Queueing networks 6
Proof of Jacksons theorem
Denote e
i
= (0, . . . , 0, 1
..
component i
, 0, . . . , 0).
Then, for instance
p(n e
i
) = p(n
1
, . . . , n
i1
, n
i
1, n
i+1
, . . . , n
M
)
Write the globabl balance condition for state n
(one equation for each possible state n, n
i
0 i):
p(n) +
M

i=1

i
1
n
i
>0
p(n) =
M

i=1
q
s,i
p(n e
i
)
+
M

i=1
q
i,d

i
p(n + e
i
)
+
M

i=1
M

j=1
q
j,i

j
p(n +e
j
e
i
)
where the lhs represents the probability ow out
of state n (in state n, any arrival or any departure
causes a transition to another state) ant the rhs
the ow to state n (cf. the transition diagram).
n
1
n
2
jonoon2saapuuasiakasulkopuolelta
jonosta2poistuuasiakasulkopuolelle
jonoon1saapuuasiakasulkopuolelta
jonosta1poistuuasiakasulkopuolelle
asiakassiirtyyjonosta2jonoon1
asiakassiirtyyjonosta1jonoon2
Note. One could again allow state dependent service rates
i
=
i
(n
i
).
J. Virtamo 38.3143 Queueing Theory / Queueing networks 7
Proof of Jacksons theorem (continued)
Rewrite the factor q
s,i
in the rst term on the rhs by means of the ow conservation equation:
q
s,i
=
i

j=1

j
q
j,i
. The equation becomes
p(n) +
M

i=1

i
1
n
i
>0
p(n) =
M

i=1

i
p(n e
i
)
M

i=1
M

j=1

j
q
j,i
p(n e
i
)
+
M

i=1
q
i,d

i
p(n + e
i
)
+
M

i=1
M

j=1
q
j,i

j
p(n +e
j
e
i
)
We insert the product form solution of Jacksons theorem as a trial and show that the equation
indeed is satised.
The following realtions hold for the product form trial
_

i
p(n e
i
) =
i
1
n
i
>0
p(n)

j
p(n e
i
) =
j
p(n e
i
+ e
j
)

i
p(n) =
i
p(n +e
i
)
Substitute these relations, in this order, into the rst three terms on the rhs.
J. Virtamo 38.3143 Queueing Theory / Queueing networks 8
Proof of Jacksons theorem (continued)
The equation takes now the form
p(n) +
M

i=1

i
1
n
i
>0
p(n) =
M

i=1

i
1
n
i
>0
p(n)
M

i=1
M

j=1
q
j,i

j
p(n + e
j
e
i
)
+
M

i=1
q
i,d

i
p(n)
+
M

i=1
M

j=1
q
j,i

j
p(n +e
j
e
i
)
The second term on the lhs and the rst term on the rhs cancel; so do the second and fourth
term on the rhs. What remains is
p(n) =
M

i=1
q
i,d

i
p(n) = p(n)
M

i=1
q
i,d

i
which is satised, because the streams into and out from the network are equal, =
M

i=1

i
q
i,d
.
Thus we have shown that the product form solution stated in Jacksons theorem indeed satisfy
the global balance equations of the Markov process describing the network.
J. Virtamo 38.3143 Queueing Theory / Queueing networks 9
Example
_

1
= +
2

2
= q
1

1
=

1 q

2
=
q
1 q

1
=
1
/
1
,
2
=
2
/
2
p(n
1
, n
2
) = (1
1
)
n
1
1
(1
2
)
n
2
2
CPU

1
I/O

2
=q
1
(1-q)
1
Mean queue lengths

N
1
=

1
1
1
,

N
2
=

2
1
2
,

N =

N
1
+

N
1
=

1
1
1
+

2
1
2
mean time in the system

T =

=

1
(1
1
)
+

2
(1
2
)
=

1
/
1
(1
1
/
1
)
+

2
/
2
(1
2
/
2
)
=
S
1
1 S
1
+
S
2
1 S
2
Equivalent system
I/O
1/S
2
CPU
1/S
1
missa
_

_
S
1
=

1

=
1
1 q

1

1
averge CPU time
S
2
=

2

=
q
1 q

1

2
average I/O time
J. Virtamo 38.3143 Queueing Theory / Queueing networks 10
Mean results of Jacksons networks
Assume state independent service rates
i
.
Mean number of customers in node i

N
i
=

i
1
i
Mean sojourn time in node i

T
i
=

N
i

i
=
1
1
i
1

i
=
1

i
Mean waiting time in node i

W
i
=

T
i

i
=

i
1
i
1

i
Mean time in the network of a customer entering node i

T
i,d
=

T
i
+
M

j=1
q
i,j

T
j,d
cf. ow conservation equations
From this set of eqs. (i = 1, . . . , M) the

T
i,d
can be solved.
Mean time in the network of a customer (average over the whole customer population)

By Littles result

T =

=
1

i=1

i
J. Virtamo 38.3143 Queueing Theory / Queueing networks 11
Optimal capacity allocation
We wish to minimize the mean time

T spent by customers in the network, or, equivalently,
mean number of customers

N in the network.
Assume that the capacities
i
can be freely chosen except for the constraint (cost constraint)

M
i=1

i
= C.

N =
M

i=1

i
= min!,
M

i=1

i
= C
By the method of Lagrange multipliers one minimizes
H =
M

i=1

i
+ x(
M

i=1

i
C)
with respect to the parameters
i
and then determines x such that the minimum satises the
constraint
H

i
=

i
(
i

i
)
2
+ x = 0
i
=
i
+ (
i
/x)
1/2
By inserting this into the constraint condition, one gets
1

x
=
C

j
_


i
=
i
+

j
_

j
(C

j
)
One rst allocates the
mandatory capacity
i
; the
excess money is distributed
in relation to the

i
.
J. Virtamo 38.3143 Queueing Theory / Queueing networks 12
Arrival theorem of open networks (Random Observer Property, cf. PASTA)
In on open network a customer entering any queue sees the same state probabilities (the
probability the system is in a state just before the arrival) are the same as the equilibrium
probabilities p(n).
Proof. Consider a customer transiting from queue i to queue
j. Insert between these queues a virtual queue 0 with a very
high service rate
0
.
In the limit
0
, the added queue does not aect the
system at all: the customers transiting from queue i to queue
j spend an innitesimal time in the added virtual queue.
i
j
0
The virtual queue, however, enables catching the transiting customer. The transition occurs
precisely in the short interval when there is customer in queue 0, i.e. when N
0
(t) = 1. The
state distribution seen by the transiting customer is the distribution of the other queues (than
queue 0) conditioned on N
0
= 1.
Now make use of the fact that also the extended system is a Jackson network with a product
form solution. Denote the state vector of the extended system by n

, i.e. n

= (n
0
, n
1
, . . . , n
M
).
It holds p

(n

) = P{N

= n

} = p
0
(n
0
)p
1
(n
1
) p
M
(n
M
) = p
0
(n
0
)p(n).
P{N
1
= n
1
, . . . , N
M
= n
M
| N
0
= 1} =
P{N
0
= 1, N
1
= n
1
, . . . , N
M
= n
M
}
P{N
0
= 1}
= p(n)
J. Virtamo 38.3143 Queueing Theory / Queueing networks 13
Closed queueing networks (Gordon and Newell networks)
A closed queueing network consists of M nodes. In contrast to an open network, there is no
external source or sink. There is a constant population of K customers in the network.
Each node i is a FIFO queue, where the service time is drawn independently from the
distribution Exp(
i
). Again we could have state dependent service rates
i
(n
i
).
A customer departing from queue i chooses queue j next with probability q
i,j
.
The customer streams through dierent nodes satisfy
the conservation law

i
=
M

j=1

j
q
j,i
i = 1, . . . , M

4
1 2
3
4
These constitute a homogeneous linear set of equations. One equation is linearly dependent
on the others, and the solution is determined uniquely up to a constant factor.
Let (

1
, . . . ,

M
) be a solution. The general solution is of the form (

1
, . . . ,

M
), where is
a constant. Which value of corresponds to the actual streams remains so far undetermined.
This will be xed later (see MVA). Let this value be denoted by , i.e.
i
=

i
.
Denote
i
=

i
/
i
. These quantities are correspondingly proportional to the real loads of the
queues
i
=
i
/
i
, viz.
i
=
i
.
J. Virtamo 38.3143 Queueing Theory / Queueing networks 14
The theorem of Gordon and Newell
The equilibrium probabilities of a closed queueing network are
p(n) =
_

_
1
G(K, M)
M

i=1

n
i
i
, when

i
n
i
= K
0, when

i
n
i
= K
where
G(K, M) =

n:

i
n
i
=K
M

i=1

n
i
i
The proof is similar to that in open networks. The details will be omitted.
The probability distribution is again of product form in the allowed region

i
n
i
= K (but
not everywhere!).
Note. Although the factors
i
contain an undetermined coecient, the solution itself is unique,
as the same factor in power K appears in the product and the norm factor in the denominator.
Arrival theorem in closed networks (Lavenberg)
In a closed network with K customers, the state probabilities seen by a customer entering
any node are the same as the equilibrium probabilities p[K 1](n) in a network with K 1
customers (Compare with the state distribution in the Engset system; an arbitrary customer
is as if he were an external observer).
The theorem can be proven in the same way by means of a virtual queue as in the case of the
open network. Details will be omitted.
J. Virtamo 38.3143 Queueing Theory / Queueing networks 15
Mean value analysis, MVA (Reiser and Lavenberg)
Our objective now is to nd the mean number of customers

N
i
[K] and sojourn times

T
i
[K]
as well as the absolute values of customer streams
i
through dierent queues.
The analysis is centrally based on the arrival theorem. The calculation proceeds recursive-
ly, incrementing the customer population in the network step by step. Therefore, the total
customer population is explicitly indicated in brackets.
The mean sojourn time in queue i is

T
i
[K] =
1

i
..
own ser-
vice time
+

N

i
[K]
1

i
. .
the time it takes to
serve the customers
ahead
where

N

i
[K] is the mean occupancy seen by a customer arriving at queue i.
By the arrival theorem we have

i
[K] =

N
i
[K 1]
where

N
i
[K 1] is the mean occupancy calculated from the equilibrium distribution. Thus

T
i
[K] = (1 +

N
i
[K 1])
1

i
J. Virtamo 38.3143 Queueing Theory / Queueing networks 16
Mean value analysis (continued)
The mean occupancy in queue i is

N
i
[K] = K


T
i
[K]
M

j=1


T
j
[K]
Proof. The real customer streams are
i
=

i
. By expanding the above expression by and
by applying Littles result we see that
K


T
i
[K]
M

j=1


T
j
[K]
= K

i
[K]

T
i
[K]
M

j=1

j
[K]

T
j
[K]
= K

N
i
[K]
M

j=1

N
j
[K]
= K

N
i
[K]
K
=

N
i
[K]
Using Littles result in the reverse direction we get the real customer stream through queue i:

i
[K] =

N
i
[K]

T
i
[K]
= K

i
M

j=1


T
j
[K]
J. Virtamo 38.3143 Queueing Theory / Queueing networks 17
MVA algorithm
The results can be collected as the following recursive method.
Start of the recursion:

N
i
[0] = 0 In an empty network all mean queue lengths are zero.
Recursion step:

T
i
[K] = (1 +

N
i
[K 1])
1

N
i
[K] = K


T
i
[K]
M

j=1


T
j
[K]

i
[K] =

N
i
[K]

T
i
[K]
In the equation in the middle, the

i
are any solution to the ow equations
i
=

j

j
q
j,i
.
J. Virtamo 38.3143 Queueing Theory / Queueing networks 18
Example 1. Cyclic network


...

1
=
2
= =
M
=
A solution to the ow equations is:

1
=

2
= =

M
= 1
Since all the queues are identical we can drop the node index. Now the recursion equations
read
_

T[K] = (1 +

N[K 1])
1

N[K] = K/M
[K] =

N[K]/

T[K]
Starting from the initial value

N[0] = 0, one solves the mean values for progressively greater
populations
_

T[1] =
1

N[1] =
1
M
[1] =
1
M

_

T[2] =
M+1
M
1

N[2] =
2
M
[2] =
2
M+1

_

T[3] =
M+2
M
1

N[2] =
3
M
[2] =
3
M+2

. . .
_

T[K] =
M+K1
M
1

N[K] =
K
M
[K] =
K
M+K1

When K M then [K]
K
M
(mean time of a full cycle is M/, there are K customers).
When K M then [K] (all queues full; customers depart on av. at intervals 1/).
J. Virtamo 38.3143 Queueing Theory / Queueing networks 19
Example 2.

2/3
1/3
K = 3
A solution to the ow equations is:

1
= 2,

2
= 1
Starting from the initial values

N
1
[0] =

N
2
[0] = 0, one solves the mean values for progressively
greater populations
K = 1
_

T
1
[1] =
1

N
1
[1] = 1
2/
2/+1/
=
2
3

1
[1] =
2
3

T
2
[1] =
1

N
2
[1] = 1
1/
2/+1/
=
1
3

2
[1] =
1
3

K = 2
_

T
1
[2] = (1 +
2
3
)
1

=
5
3
1

N
1
[2] = 2
25/3
25/3+14/3
=
10
7

1
[2] =
6
7

T
2
[2] = (1 +
1
3
)
1

=
4
3
1

N
2
[2] = 2
14/3
25/3+14/3
=
4
7

2
[2] =
3
7

K = 3
_

T
1
[3] = (1 +
10
7
)
1

=
17
7
1

N
1
[3] = 3
217/7
217/7+111/7
=
34
15

1
[3] =
14
15

T
2
[3] = (1 +
4
7
)
1

=
11
7
1

N
2
[3] = 3
111/7
217/7+111/7
=
11
15

2
[3] =
7
15

J. Virtamo 38.3143 Queueing Theory / Queueing networks 20
Nortons theorem
For queueing networks, one can derive the same kind of Nortons theorem that is used in the
analysis of linear circuits. In the case of queueing networks, the theorem can be proven by
using the known equilibrium distribution.
When we are interested in the behaviour of just a part of the network, say queue i, the rest
of the network can be replaced by an equivalent queue.
N-n
N customers in the network.
N n customers in queue i.
n customers in other part of the network.
T(n)
Calculate the throughput (stream) T(n)
for the short circuited system as a func-
tion of the number of customers n.
N-n
n

n
=T(n)
The equivalent queue replacing the other
part of the network has a state dependent
service rate T(n). Queue i behaves exact-
ly as in the original network.

You might also like