------------------------------------------------------------------------------ CSC358 Tutorial 2 Notes Below are some notes and sample solutions to the tutorial questions. These notes are only meant to provide the necessary amount of information for you to verify your own work and to help you recall the discussions in the tutorial. Simply reading these solutions does NOT convey the same learning experience as attending a tutorial (not even close). The tutorial materials are a mandatory and important component of this course, so don't miss any of them! ------------------------------------------------------------------------------ Question 1: Review lecture slides for answers. ------------------------------------------------------------------------------ Question 2: (a) alpha = (850,000 bits)/(15,000,000 bits/sec) = 0.0567 sec The traffic intensity on the link is given by alpha*beta = (16 requests/sec)(0.0567 sec/request) = 0.907. The average access delay is (0.0567 sec)/(1 - 0.907) = 0.6 seconds. The total average response time is therefore 0.6 sec + 3 sec = 3.6 sec. (b) Thus the average access delay is (0.0567 sec)/[1 – (0.4)(0.907)] = 0.089 sec. The response time is 850 Kb / 100 Mbps = 8.5 ms if the request is satisfied by the cache (which happens with probability 0.6); the average response time is 0.089 sec + 3 sec = 3.089 sec for cache misses (which happens 40% of the time). So the average response time is (0.6)(0.0085 sec) + (0.4)(3.089 sec) = 1.24 seconds. ------------------------------ Question 3: (a) Using non-persistent HTTP without parallel connections, the total time is 11 * (3*200 + 100,000) bits / 150 bps = 7773.33 sec (b) Using persistent HTTP without parallel connections, the total time is: (2*200 + 11*(200+100,000)) bits / 150 bps = 7350.67 sec (c) Using non-persistent HTTP 10 parallel connections, the total time is (3*200+100,000) bits / 150 bps + (3*200+100,000) bits / (150/10) bps = 7377.33 sec (d) Discussed in the tutorial. (e) Yes, because Alice has more connections, she can get a larger share of the link bandwidth. (f) Yes, Alice still needs to perform parallel downloads; otherwise she will get less bandwidth than the other four users. (g) Let the wire length be D, and let tp = D / 2*10^8 be the one-way propagation delay Using persistent HTTP without parallel connection, the total number of tp's needed is: 2 for setup connection and 2 for each of the 11 objects, so in the total propagation delay is 24tp. Using non-persistent HTTP with 10 parallel connections, we need: 4tp for the first object, 4tp for each of the other 10 objects (in parallel so counted as one), so the total propagation delay is 8tp. Let 7350.67 + 24tp = 7377.33 + 8tp, solve for tp The critical tp is 1.67 sec, the critical wire length D = 1.67 * 2*10^8 = 3.34 * 10^8 metres If the wire is shorter than 334,000,000 metres, (b) is better; otherwise (c) is better. (h) Discussed in the tutorial.