Upload
siu-chung-chan
View
220
Download
1
Embed Size (px)
Citation preview
8/6/2019 Case Study Solution Network of Queues
1/26
Probability and RandomProcesses
STA 3533
Module 6
Networks of Queues
Continue
8/6/2019 Case Study Solution Network of Queues
2/26
Topics
Case Study Solution
Introduction to Queuing
Open queuing networks
Closed queuing networks
8/6/2019 Case Study Solution Network of Queues
3/26
Introduction to Queuing
Problem 1
A data communication line delivers a block of informationevery 10 microseconds. A decoder checks each block forerrors and corrects the errors if necessary. It takes 1 s todetermine whether a block has any errors. If the block haserror, it ta es s to correct it, an i it as more t an oneerror it takes 20 s to correct the error. Blocks wait in aqueue when the decoder falls behind. Suppose that the decoderis initially empty and that the numbers of errors in the first 10
blocks are 0, 1, 3, 1, 0, 4, 0, 1, 0, 0.a.Plot the number of blocks in the decoder as a function of time.
b.Find the mean number of blocks in the decoder.
c. What percentage of the time is the decoder empty?
8/6/2019 Case Study Solution Network of Queues
4/26
Introduction to Queuing
Solution 1:
1. Interarrivals are constant with
interarrival times = 10 msec
2. Service time
if 0 error 1 sec
1 error 1+5 sec
>1 error1+20 sec
Arrival time 10 20 30 40 50 60 70 80 90 100
Errors 0 1 3 1 0 4 0 1 0 0
Service time 1 6 21 6 1 21 1 6 1 1
Dep. Time 11 26 51 57 58 81 82 88 91 101
8/6/2019 Case Study Solution Network of Queues
5/26
Introduction to Queuing
a. The plot
N(t)
b.
96.0
]1162320101123201061[100
1
)(100
1 110
10
=
+++++++++++++=
dttN
10 3020 40 6050 70 80 90 100 110
TObservation = 100 msec
8/6/2019 Case Study Solution Network of Queues
6/26
Introduction to Queuing
c.
Server is working during 65 msec = service times
proportion idle time = 1 65/100
= 0.35
8/6/2019 Case Study Solution Network of Queues
7/26
Introduction to Queuing
Problem 2:
Three queues are arranged in the loop as shown below. Assume that
the mean service time in the queue i is mi = 1/.
a. Suppose the queue has a single customer circulating in the loop. Find
the mean time E[T] it takes the customer to cycle around the loop.
De uce rom E T t e mean arriva rate at eac o t e queues. Veri y
that Littles formula holds for these two quantities.
b. If there are N customers circulating in the loop, how are the mean
arrival rate and mean cycle time related?
1 2 3
8/6/2019 Case Study Solution Network of Queues
8/26
Introduction to Queuing
Solution:
a. One customerno waiting
321
321
1
][ mmmmmmT ++=++=
Littles Formula
systemincustomeronemmm
mN
iqueueincustomertime
mmm
mmN
i i
ii
iii
1][
%][
3
1
3
1 321
321
=++
=
=
++
==
= =
8/6/2019 Case Study Solution Network of Queues
9/26
Introduction to Queuing
b.Let[T] = mean cycle time per customer, then
Total # in system = N [T] by Littles formula
8/6/2019 Case Study Solution Network of Queues
10/26
Open Queuing Networks
Consider a network of K queues in which customers
arrive from outside the network to queue k according to
independent Poisson processes of rate k. We assume
that the service time of a customer in queue k isexponentially distributed with rate kand independent
of all other service times and arrival processes. We also
suppose that queue k has ckservers.
After completion of service in queue k, a customerproceeds to queue i with probability Pki and exists the
network with probability
=
K
i
kiP
1
1
8/6/2019 Case Study Solution Network of Queues
11/26
Open Queuing Networks
The total arrival rate kinto queue k is the sum of the
external arrival rate and the internal arrival rates:
.,...,11 KkP
K
jjkjkk =+= =
It can be shown that above equation has a unique
solution if no customer remains in the network
indefinitely. Such networks are known as Open Queuing Networks
8/6/2019 Case Study Solution Network of Queues
12/26
Open Queuing Networks
The vector of the number of customers in all queues,
is a Markow process.
Now Jackson s theorem gives steady state pmf for N(t).
)),(),...,(),(),(()( 321 tNtNtNtNtN K=
k k k,
state n= (n1, n2,,nK),
Where P[ Nk= nk] is the steady state pmf of an M/M/cksystem with arrival rate k and service rate k
][]...[][])([2211 KK
nNPnNPnNPntNP =====
8/6/2019 Case Study Solution Network of Queues
13/26
Open Queuing Networks
Jacksons Theorem states that the numbers of
customers in the queues at time t are independent
random variables.
n addition, it states that the steady state probabilities
of the individual queues are those of an M/M/cksystem.
This is an amazing result because in general the input
process to a queue is not Poisson, as was demonstrated
in the sample queue with feedback discussed in thebeginning of this section.
8/6/2019 Case Study Solution Network of Queues
14/26
Open Queuing Networks
Example: Messages arrive at a concentrator according to a
Poisson process of rate . The time required to transmit a
message and receive an acknowledgment is exponentially
distributed with mean 1/m. Suppose that a message need to.
pmf for the number of messages in the concentrator.
Solution: The overall system can be represented by the
simple queue with feedback shown below.
.1
.9
8/6/2019 Case Study Solution Network of Queues
15/26
Open Queuing Networks
The net arrival rate into the queue is = + p, that
is,
p=
1
Thus, the pmf for the number of messages in the
concentrator is
)1/(/
,...1,0)1(][
==
===
where
nnNP n
8/6/2019 Case Study Solution Network of Queues
16/26
Open Queuing Networks
Example:New programs arrive at a CPU according to a Poisson
process of rate as shown in below fig. A program spends as
exponentially distributed execution time of mean 1/1 in the CPU.
At the end of this service time, the program execution is completewith robabilit or it re uires retrievin additional in ormation
from secondary storage with probability 1-p. Suppose that the
retrieval of information from secondary storage requires an
exponentially distributed amount of time with mean 1/2.Find the
mean time that each program spends in the system.
1
2
1p /CPU
p
8/6/2019 Case Study Solution Network of Queues
17/26
Open Queuing Networks
Solution: the net arrival rates into the two queues are
Thus
1221 )1( pand =+=
p
p
andp
)1(
21
==
Each queue behaves like an M/M/1 system so,
Where1= 1/1and2= 2/2. Littles formula then gives the
mean for total time spent in the system:
2
22
1
11
1][and
1][
=
= NENE
.11
1][][
2
2
1
121
+
=
+=
NNETE
8/6/2019 Case Study Solution Network of Queues
18/26
Close Queuing Networks
In some problems, a fixed number of customers, say I,
circulate endlessly in a closed queuing network.
For Example, some computer system models assume that at
any time a fixed number of programs use the CPU and input/.
1 2
1p
/CPU
p
8/6/2019 Case Study Solution Network of Queues
19/26
Close Queuing Networks
We now consider queuing networks that are identical to the
previously discussed Open Network except that the external
arrivals rates are zero and the networks always contain a fixed
number of customers I. We show that the steady state pmf for such
s stem is roduct rom but that the states o the ueues are no
longer independent.
The net arrival rate into the queue k is now given by
(1)
Note that these equations have the same from as the set of
equations that define the stationary pmf for a discrete-time
Markow chain with transition probabilities Pjk.
= ==K
jjkjk KkP1 ,...,1
8/6/2019 Case Study Solution Network of Queues
20/26
Close Queuing Networks
The only difference is that the sum of the ks need notbe one. Thus the solution vector to eq. (1) must be
proportional to the stationary pmf{j} corresponding to{Pjk} :
K
(2)
And where (I) is a constant that depends on I, the
number of customers in the queuing network. If we sumboth sides of eq. (2) over k, we see that(I) is the sum ofthe arrival rates in all the queues un the network, andk= k/(I) is the fraction of the total arrivals to queue k.
=
==j
jkjkkk whereI1
,)(
8/6/2019 Case Study Solution Network of Queues
21/26
Close Queuing Networks
Theorem:Let lk= (I) kbe a solution to
eq.(1), and let n = (n1, n2, ,nk) by any state of
the network for which n1, n
2, ,n
k 0 and
Then
where P[ Nk= nk] is the steady state pmf of an M/M/cksystem with arrival rate kand service rate k, and
where S(I) is the normalization constant given by
........21 K
)4.....(,
)(
][]...[][])([ 2211
IS
nNPnNPnNPntNP KK
=====
8/6/2019 Case Study Solution Network of Queues
22/26
Close Queuing Networks
Equation 4 states that P[ N(t) = n] has a product form.
)5.....(,][]...[][)(1...:
2211
1
=++
====Knnn
KK nNPnNPnNPIS
of the marginal pmf s because of the normalizationconstant S(I).
This constant arises because the fact that there arealways I customers in the network implies that theallowable states n must satisfy equation (3).
The theorem can be proved by taking the approachused to prove Jackson s theorem.
8/6/2019 Case Study Solution Network of Queues
23/26
Close Queuing Networks
Example: Suppose the computer system example that we haveseen in open queuing network is operated so that there are always
I programs in the system. The resulting network of queue is shown
below. Note that the feedback loop around the CPU signifies the
another one. Find the steady state pmf of the system. Find the rate
at which programs are completed.
1 2
1p
/CPU
p
8/6/2019 Case Study Solution Network of Queues
24/26
Close Queuing Networks
Solution: The stationary probabilities associated with equation
(1) are found by solving
1)1( 11,12,211 =+=+= andpp
e stationary pro a i ities are t en
And the arrival rates are
Solution Continues
p
p
p
=
=
2
1and
2
121
p
Ip
p
II
=
==
2
)()1(and
2
)()( 211
8/6/2019 Case Study Solution Network of Queues
25/26
Close Queuing Networks
The stationary pmf for the network is then
221121 0
)(
)1()1(],[
===
IiIS
iINiNP
I
iIi
Solution Continues
2
22
1
11
1
2
12
21
2
1
121
0
2121
,)1(
0
1
1],[
)1)(1()(
==
===
===
=
+
=
andp
where
IiiINiNPSo
ISand
i
I
i
iIi
8/6/2019 Case Study Solution Network of Queues
26/26
Close Queuing Networks
The rate at which programs are completed is pl1 . We find l1from
the relation between server utilization and probability of an
empty system:
1 1 ===
111
11
1
1)1(
1
+
+
=
I
I
I
pp
thatimplieswhich