Solution for HW2

Problem 1

(a)[5pt] There are 6 jobs departing in the time duration [0, 15].

So throughput rate = # of departures / time duration
= 6 / (15 - 0) = 2/5 job/sec

(b)[5pt] The plot of number of jobs as a function of time is shown below.

[3pt] The average number of jobs over the duration, namely,

average population = area under the graph / time duration
= (1*5.5 + 2*5 + 3*1.5) / 15 = 4/3 job

(c) [5pt]

average delay = sum of delay of every job / # of jobs
= ((4.5-0.5)+(3.0-1.5)+(11.0-6.0)+(14.0-7.0)+ (10.0-8.5)+(13.0-12.0)) / 6
= 20 / 6 = 10/3 sec

[2pt] Little's Law can be verified by instantiating the variables in the formula.

average population = average delay * throughput rate
4/3 job = 10/3 sec * 2/5 job/sec

Problem 2

Since the message lengths have an Exponential Distribution,
the service times, which equal (message length) / transmission rate,
also have an Exponential rate. So in this system, the special
case M/M/1 can be used to calculate the average delay.

average service time = average length / transmission rate
= 1000 / 100,000 = 1/100 sec/job

service rate = 1 / average service time
= 1 / (1/100) = 100 job/sec

# fomula (1)
average delay = utilization / ((1-utilization)*arrival rate)

From formula (1), the following formula can be derived.

# fomula (2)
average delay = 1 / (service rate - arrival rate)

(a)[5pt]

For system A:

arrival rate = 60 msg/sec
utilization = arrival rate * average service time
= 60 * (1/100) = 3/5

Using formula (1):
average delay = (3/5) / ((1-(3/5))*60) = 1/40 sec

Using formula (2):
average delay = 1 / (100-60) = 1/40 sec

(b)[5pt]

For system B:

arrival rate = 80 msg/sec
utilization = arrival rate * average service time
= 80 * 1/100 = 4/5

Using formula (1):
average delay = 4/5 / ((1-4/5)*80) = 1/20 sec

Using formula (2):
average delay = 1 / (100-80) = 1/20 sec

(c)[5pt]

For system A, applying Little's Law

average delay = 1/40 sec
throughput rate = arrival rate = 60 msg/sec
average population = average delay * throughput rate
= 1/40 * 60 = 3/2 msg

For system B, applying Little's Law

average delay = 1/20 sec
throughput rate = arrival rate = 80 msg/sec
average population = average delay * throughput rate
= 1/20 * 80 = 4 msg

average population in both systems = average population of A + average population of B
= 3/2 + 4 =
11/2 msg

(d)[5pt] For the system combining A and B, applying Little's Law

average population in both systems = 11/2 msg
throughput rate = throughput rate of A + throughput rate of B
= 60 + 80 = 140 msg/sec

average delay = average population / throughput rate
= (11/2) / 140 = 11/280 sec

Problem 3

[10pt]

For a single server combining systems A and B

Using formula (1):
average delay = utilization / ((1-utilization)*arrival rate)
11/280 = utilization / ((1-utilization)*(60+80))

utilization = 11/13

service rate = arrival rate / utilization
= (60 + 80) / (11/13) = 140*13/11 msg/sec

transmission rate = average length * service rate
= 1000 * (140*13/11) = 165.45 Kb/sec

Using formula (2)
average delay = 1 / (service rate - arrival rate)
11/280 = 1 / (service rate - (60+80))

service rate = 140*13/11 msg/sec

transmission rate = average length * service rate
= 1000 * (140*13/11) = 165.45 Kb/sec