CS计算机代考程序代写 Solution to COMP9334 Revision Questions for Week 7A 1

Solution to COMP9334 Revision Questions for Week 7A 1
Question 1
Let us first compute the second moment of each customer type. Let us use Ca, σa, E[Sa] and E[Sa2] to denote, respectively, the coefficient of variation, standard deviation, mean and second moment of the service time of customer of type a. Recall that the coefficient of variation of
a random variable is its standard deviation divided by mean, i.e Ca = relation:
σa . By using the E[Sa]
(1)
it can be showed that
E[Sa2] = E[Sa]2 + σa2, E[Sa2] = E[Sa]2(1 + Ca2)
(2) Since we know E[Sa] = 0.1 and Ca = 1.5, we can compute E[Sa2] using the above equation.
Similarly, let Cb, σb, E[Sb] and E[Sb2] to denote, respectively, the coefficient of variation, standard deviation, mean and second moment of the service time of customer of type b. We have
E[Sb2] = E[Sb]2(1 + Cb2) (3) With E[Sb] = 0.08 and Cb = 1.2, we can compute E[Sb2] using the above equation.
Requests of type a and b have equal priorities
This is an M/G/1 queue without priority. The arrival rate is 10 requests per second (= λ) . Since 30% of the request are type a and the remaining are type b, we have the mean service time E[S] and second moment E[S2] of the aggregate are, respectively,
E[S] = 0.3E[Sa] + 0.7E[Sb] (4) E[S2] = 0.3E[Sa2] + 0.7E[Sb2] (5)
The mean response time is therefore E[S] + λE[S2] where ρ = λE[S]. 2(1−ρ)
Requests of type b have non-preemptive priority over type a Let
R =
ρa =
ρb =
Response time of type b is
21(0.3λE[Sa2] + 0.7λE[Sb2]) (6) 0.3λE [Sa ] (7)
0.7λE [Sb ] (8)
E[Sb]+ R (9) 1−ρb
Response time of type a is
E[Sa]+ R (10)
(1−ρb)(1−ρa −ρb) 1

Requests of type b have preemptive priority over type a Let
Rb = Ra =
ρa = ρb =
Response time of type b is
Response time of type a is E[Sa] 1
12 (0.7λE [Sb2 ]) (11) 12(0.3λE[Sa2] + 0.7λE[Sb2]) (12)
0.3λE [Sa ] (13) 0.7λE [Sb ] (14)
E[Sb] + Rb (15) 1−ρb
The numerical answers are
summarised in the following table.
Mean response time type a
type b
Part 1 0.8246 0.8246
Part 2 1.7787 0.3150
Part 3 1.9059 0.2042
+ Ra (16) 1−ρb (1−ρb)(1−ρa −ρb)
Observe that the response
a higher priority, this is of course at the expense of type a customers which have a lower priority.
time for type b customers have become better because it has
2