SFWR ENG/COMP SCI 4E03 — Tutorial 4 Solutions

43 downloads 1514 Views 50KB Size Report
1. SFWR ENG/COMP SCI 4E03 — Tutorial 4 Solutions. 1. (a) e−(2)(1) = 0.14. (b) The time between events is exponentially distributed with mean half an hour.
1

SFWR ENG/COMP SCI 4E03 — Tutorial 4 Solutions 1. (a) e−(2)(1) = 0.14. (b) The time between events is exponentially distributed with mean half an hour. So, the expected time of the fourth event is 2 p.m. (c) 1 − p0 (2) − p1 (2) = 1 − e−4 − 4e−4 = 0.91. 2. For the M/M/1 system, the utilization of each server is λ1 /µ1 = 0.5. The mean number ρ of jobs in the system is 2(ρ/(1 − ρ)) = 2 and the mean waiting time is λ1 1−ρ = 2 seconds. For the M/M/2 system, the utilization of each server is λ2 /2µ2 = 0.5. Using the formulas for M/M/2, we get p0 = 1/3. We then get L = 4/3 and W = 4/3 seconds. The implication for design is clear. If there are no other constraints, M/M/2 is preferable to two M/M/1’s. 3. Here λ = 20, µ = 6. Plugging into the formulas: (a) λ/4µ = 5/6 (b) p0 = 0.0213 (c) L = 6.62 (d) W = 0.33 minutes, or 20 seconds 4. Here, for each M/M/1, λ = 5, µ = 6. (a) λ/µ = 5/6 (b) (1 − µλ )4 = 0.00077 ρ (c) L = 4( 1−ρ ) = 20 1 ρ (d) W = λ 1−ρ = 1 minute 5. You could look up formulas for these, but I just solved it from scratch. Let n be the number of jobs in system. Then, following the same method as in class p1 = p2 = p3 = p4 = p5 = p6 =

20 p0 6 20 p1 12 20 p2 18 20 p3 24 20 p4 24 20 p5 24

One can solve this system as in class. (a) The utilization of each server is p1 /4 + p2 /2 + 3p3 /4 + p4 + p5 + p6 = 0.73

2 (b) p0 = 0.0344 (c) λp6 = 2.46 jobs per minute P (d) L = 6n=0 npn = 3.32 (e) You need to be careful here. The arrival rate of jobs entering the system is λ(1 − p6 ) = 1 17.54 jobs per minute, so W = ( 17.54 )(3.32) = 0.189 minutes, or 11.3 seconds. 6. Assuming the same routing scheme is used, we need to find c such that for an M/M/1 system with λ = 8/c and µ = 1, we get Wq < 3. This occurs if one more server is added. 7. Using the standard procedure n Y λi−1

pn =

µi

i=1

p0

 n

λ µ

= (n + 1)

p0

Now, p0 = =

1 h

1+

P∞

n=1 (n

+ 1)

 n i λ µ

1 P∞

n=0 (n

+ 1)

 n λ µ

1

= d

 n+1 λ d  P∞ λ n=0

1−

=

µ

µ



λ µ

2

assuming λ < µ. Now, L = =

∞ X

npn

n=0 ∞ X

 n 

λ µ

(n + 1)n

n=0

λ 1− µ

2   X λ ∞

λ 1− µ

2  



=



=



=

1−

1−

λ µ

µ λ µ

2

 n−1

(n + 1)n

n=0

d

 2 λ µ

n=0

2 

λ µ

∞  n+1 X λ

d2

2  2

λ µ

λ µ

1−

λ µ

3

µ

3

2 =



 2 λ µ

1−

λ µ