TCOM501 – Networking: Theory & Fundamentals Midterm Examination March 6, 2002

advertisement
TCOM501 – Networking: Theory & Fundamentals
Midterm Examination
Professor Yannis A. Korilis
March 6, 2002
Answer all problems. Good Luck!
Problem 1 [15 points]:
1. State the PASTA theorem. [5 points]
2. Provide an analytical proof of the PASTA theorem. [10 points]
Solution 1: See textbook, page 172.
Problem 2 [20 points]: Consider a single-server queue with state-dependent arrival rate:
λn =
λ
, n = 0,1,...
n +1
In other words, the inter-arrival times are independent and follow the exponential distribution
with parameter λ n when the queue is at state n. The service times are independent identically
distributed following the exponential distribution with parameter µ.
1. Find the stationary distribution of the queue. [10 points]
2. Find the average time that a customer spends in the system. [10 points]
Solution 2: The state transition diagram is shown in the figure below:
λ
0
λ/2
1
µ
λ /( n + 1)
2
n
µ
n+1
µ
1. From the DBE we have:
1 of 8
p1 =
λ
p0
µ
λ/2
p2 =
p1 =
µ
2
1λ
  p0
2µ
3
1 λ
λ/3
p3 =
p2 =
  p0
2⋅3 µ 
µ
M
n
pn =
1 λ
( λ / µ )n
λ/n
pn −1 =
p
p0
=
  0
n!
2 ⋅ 3L n  µ 
µ
Normalizing:
−1
∞

(λ / µ )k 
−λ / µ
p0 = 1 + ∑
 =e
 k =1 k ! 
Therefore:
pn =
( λ / µ )n −λ / µ
e
, n = 0,1,2,...
n!
that is, the number of customers is the system follows Poisson distribution with parameter
λ/µ.
2. The average number of customers in the system is
N=
λ
µ
Let ν denote the average arrival rate at the queue. Then, by Little’s theorem:
T=
N
ν
The average arrival rate can computed explicitly by
∞
λ ( λ / µ )n −λ / µ
( λ / µ )n +1
e
= µe−λ / µ ∑
n!
n =0 n + 1
n = 0 ( n + 1)!
∞
∞
ν = ∑ λ n pn = ∑
n =0
( λ / µ )n
= µe−λ / µ ( eλ / µ − 1)
n!
n =1
−λ / µ
= µ(1 − e
)
∞
= µe −λ / µ ∑
or by applying Little’s theorem for the server
1 − p0 =
ν
⇒ ν = µ(1 − p0 ) = µ(1 − e−λ / µ )
µ
Therefore:
T=
N
λ
= 2
ν µ (1 − e−λ / µ )
2 of 8
Problem 3 [20 points]: Customers arrive according to a Poisson process with rate λ = 1 to a
single server queue. The service protocol includes a mechanism to allow the server to do bookkeeping operations at random intervals – while keeping customers waiting for service. The
protocol works as follows: the server generates a sequence of book-keeping flags according to an
independent Poisson process with rate v = 1 . Every time a flag is generated, the server adds the
flag to the end of the queue as a “virtual customer,” provided that the total number of customers
(real or virtual) in the system is less than 2. When a book-keeping flag enters service, the server
does a book-keeping operation. Assume that the service times of real customers as well as the
times required for book-keeping operations (service times of virtual customers) are independent
and follow the exponential distribution with parameter µ = 2 . Find:
1. The average number of customers, real and virtual, in the system. [7 points]
2. The average number of real customers in the system, and the average time that a real
customer spends in the system. [6 points]
3. The average number of virtual customers in the system, and the average time that a virtual
customer spends in the system. [7 points]
Solution 3: The state transition diagram is shown in the figure below:
λ+ν
0
λ
λ+ν
1
µ
λ
3
2
4
µ
µ
µ
1. From the DBE we have:
p1 =
λ+ν
p0
µ
2
λ+ν
λ+ν
p2 =
p1 = 
 p0
µ
 µ 
λ
pn =  
µ
n −2
n −2
λ
p2 =  
µ
2
λ+ν

 p0 , n = 2,3,...
 µ 
Normalizing:
−1
 λ + ν  λ + ν 2 ∞  λ  n − 2 
 λ + ν  λ + ν 2
1 
+
=
+
+
p0 = 1 +
1



∑

 


µ
µ
 µ  n = 2  µ  
 µ  1 − λ / µ 


Using λ = ν = 1, µ = 2 , we get
p0 = p1 = p2 =
1
pn =  
2
n−2
1
4
n
1 1
=   , n = 2,3, ...
4 2
3 of 8
−1
The average number of customers in the system is:
∞
N = ∑ npn =
n =1
n

1 ∞  1  1  1/ 2
+ ∑ n  = + 
− 1/ 2  = 1.75
2
4 n = 2  2  4  (1 − 1/ 2)

where we used the fact that for | x |< 1 :
∞
∂
∞
∂  1 


∞
x
∑ nx n = x ∑ nx n −1 = x ⋅ ∂x ∑ x n = x ⋅ ∂x  1 − x  = (1 − x )2
n =1
n =1
∞
∞
n =2
n =1
n =0
x
∑ nx n = ∑ nx n − x = (1 − x )2 − x
2.
The average time a customer – real or virtual – spends in the system is
T=
N + 1 1.75 + 1
=
= 1.35
µ
2
The average number of real customers is:
N1 =
3.
T 1.375
=
= 1.375
1
λ
The average number of virtual customers in the system is:
N 2 = N − N1 = 1.75 − 1.375 = 0.375
The average arrival rate of virtual customers is:
λ 2 = νp0 + νp1 =
1
2
Therefore, the average time that a virtual customer spends in the system is:
T2 =
N 2 0.375
=
= 0.75
λ2
0.5
Problem 4 [25 points]: Poisson arrivals with rate λ join a queue in front of two parallel servers A and B,
with exponentially distributed service times with rates µA and µB, respectively. A customer that upon
arrival finds the system empty is allocated to the server that has been idle for the longest time. Otherwise,
the head of the queue takes the first free server.
1. Define the states describing the system as a Markov chain and draw the state-transition
diagram. [5 points]
2. Find the stationary distribution. [10 points]
3. Is the system reversible? Justify your answer. [5 points]
4. Find the transition rates of the reversed Markov chain and draw its state-transition diagram.
[5 points]
Solution 4:
1. The state transition diagram is shown in the following figure, where
•
State 0A corresponds to 0 customers in the system, with server A being idle for the
longest time. Similarly, state 0B corresponds to 0 customers in the system, with server B
being idle for the longest time.
4 of 8
•
State 1A corresponds to 1 customer in the system served at server A. Similarly, state 1B
corresponds to 1 customer in the system served at server B.
•
State n=2, 3,… corresponds to n customers in the system.
0B
0A
λ
1A
λ
µB
µB
µA
µA
λ
1B
λ
3
2
λ
λ
µ A + µB
µ A + µB
2. From the DBE between states n and n+1, for n=2,3,…, we have
 λ 
pn = 

 µA + µB 
n −2
p2 , n = 2,3,...
Writing the GBE for states 0A, 0B, 1A, and 1B, we have:
λp0 A = µ B p1B
λp0 B = µ A p1 A
λp0 A + µ B p2 = (λ + µ A ) p1 A
λp0 B + µ A p2 = (λ + µ B ) p1B
Solving the system of equations, we can find the above probabilities as functions of p2 :
p0 A = p0 B =
µ Aµ B
p2
λ2
µB
p2
λ
µ
p1B = A p2
λ
p1 A =
Normalizing:
n
 µ µ
µB µ A ∞  λ  
A B
p2 =  2 2 +
+
+ ∑
 
λ
λ n =2  µ A + µ B  
 λ

−1
 µ µ

1
µ
µ
= 2 A 2 B + B + A +

λ
λ 1 − λ /(µ A + µ B ) 
 λ
−1
3. Apply Kolmogorov’s criterion to loop 0A→1A→0B→1B→0A. In the forward direction, the
product of the transition rates along the loop is λ 2µ Aµ B , while in the reverse direction it is 0.
Evidently, the system is not reversible.
4. For any n=2,3,…, the DBE between states n and n+1 imply that:
q* ( n, n + 1) = q( n, n + 1) = λ
q* ( n + 1, n ) = q( n + 1, n ) = µ A + µ B
5 of 8
For the remaining states, we have:
µ Aµ B
p2 ⋅ λ
2
p0 A q(0 A,1A)
q (1A,0 A) =
= λ
= µA
µB
p1 A
p2
λ
µA
p2 ⋅ µ B
p1B q(1B,0 A)
*
λ
q (0 A,1B ) =
=
=λ
µ Aµ B
p0 A
p
2
λ2
µ Aµ B
p2 ⋅ λ
2
p0 B q(0 B,1B )
*
λ
q (1B,0 B ) =
=
= µB
µA
p1B
p2
λ
µB
p2 ⋅ µ A
p1 A q(1A,0 B )
*
λ
q (0 B,1A) =
=
=λ
µ Aµ B
p0 B
p
2
λ2
*
Working in the same way we can find the transition rates between states 1A and 2, and 1B
and 2. The state transition diagram of the reversed chain is shown in the following figure.
µA
0B
0A
λ
λ
1A
µB
µA
λ
µB
1B
λ
3
2
λ
λ
µ A + µB
µ A + µB
Problem 5 [20 points]: Consider a network with four stations. Customers arrive at stations 1, 2,
and 3 in accordance with independent Poisson processes having respective rates 5, 10, and15.
There are no external arrivals at station 4. The service times at the four stations are independent
exponentially distributed with respective rates 10, 35, 85, and 41.
A customer completing service at node 1 is equally likely to (i) go to station 2, (ii) go to station 3,
or (iii) leave the system. A customer departing service at station 2 is equally likely to (i) go to
station 3, or (ii) go to station 4. A customer departing service at station 3 is equally likely to (i) go
to station 4, or (ii) leave the system. A customer completing service at node 4 is always routed to
station 3.
1. Find the total (aggregate) arrival rate λi at each node i = 1,2,3,4. [5 points]
2. The average number of customers Ni at each node i = 1,2,3,4. [5 points]
3. Find the average time T a customer spends in the network. [5 points]
4. Consider the aggregate arrival process at node 2. Is this a Poisson process? Justify your
answer. [5 points]
Solution 5: The network is shown in the following figure
6 of 8
γ2
1/ 3
1
γ1
1/ 3
2
1/ 2
1/ 3
1/ 2
3
1/ 2
4
1/ 2
γ3
1. Writing the flow conservation equations for the nodes, we have
λ1 = γ1 = 5
1
5 35
λ 2 = γ 2 + λ1 = 10 + =
= 11.67
3
3 3
1
1
45
λ 3 = γ 3 + λ1 + λ 2 + λ 4 =
+ λ4
3
2
2
1
1
35 1
λ4 = λ2 + λ3 =
+ λ3
2
2
6 2
From the last two equations, we have:
170
= 56.67
3
205
λ4 =
= 34.17
6
λ3 =
2. The utilization factors of the stations are:
5 1
=
10 2
35 1 1
ρ2 =
=
3 35 3
170 1 2
ρ3 =
=
3 85 3
205 1 5
ρ4 =
=
6 41 6
ρ1 =
Using Jackson’s theorem for open networks, the steady-state probability of ni customers at
station i is:
pi ( ni ) = (1 − ρi )ρini , ni = 0,1,...
Therefore, the average number of customers in the queue is:
Ni =
ρi
1 − ρi
7 of 8
Using the above values for the utilization factors, we have:
1
N1 = 1, N 2 = , N 3 = 2, N 4 = 5.
2
3. The average number of customers in the network is:
N =1+
1
17
+2+5=
2
2
and the total arrival rate – external arrivals:
γ = 5 + 10 + 15 = 30.
From Little’s theorem, we have:
T=
N 17 1 17
=
=
= 0.283
γ
2 30 60
4. The aggregate arrival process at station 2 is Poisson. To see this, consider the departure
process from station 1. Since station 1 is an M/M/1 queue, Burke’s theorem implies that the
departure process is Poisson with parameter γ1. Customers departing from station 1 are routed
to station 2 with probability 1/3. Therefore, the process of customers routed from station 1 to
station 2 is Poisson with parameter γ1 / 3. The aggregate arrival process to station two is,
therefore, the sum of two independent Poisson processes with rates γ1 / 3 and γ 2 , and is itself a
Poisson process with rate γ1 / 3 + γ 2 .
8 of 8
Download