Duke University CompSci 514 Quiz 2 Spring 2015 Name (Print): , (Family name) (Given name) Student ID Number: Date of Exam: March 31, 2015 Time Period: 6:30pm-7:50pm Number of Exam Pages: 9 (including this cover sheet) Exam Type: open book/notes Marking Scheme: Question Score 1 /15 2 /15 3 /10 Total /40
3 40 1 1 1 2 3 100 100 Router capacity = 10 capacity = 1 2 1500 Figure 1: Router implements the DKS fair queueing scheme described in Demers et al.’s paper. 1. (15 points) DKS fair queueing (the fair queueing algorithm described in Demers et al.’s paper) versus deficit round robin fair queuing. For simplicity, we use normalized units to refer to link capacity and packet lengths. The router has three input links, each with capacity 10, and an output link with capacity 1. The maximum packet size is 1500. Four packets belong to three different flows: flow 1, 2, and 3, arrive from the input links. For simplicity, assume the first packets of all flows arrive at exactly the same time, and all queues are empty when the first three packets arrive, but are non-empty afterwards (the figure omitted future packets.) The first and second packet from flow 1 arrives back-to-back. The four packet’s lengths are marked in the figure. Packets from different flows are fair queued with equal weights. Answer the following questions. (a) (5 points) Suppose the router in Figure 1 implements the DKS fair queueing scheme . In the bit-by-bit reference system, suppose the start round number of the first three packets is 0. What’s the finishing round number of each packet? Assume that all queues are non-empty after future packets from all flows arrive • The finishing round of the 1st packet from flow 1 is . • The finishing round of the 2nd packet from flow 1 is . • The finishing round of the 1st packet from flow 2 is . • The finishing round of the 1st packet from flow 3 is . (b) (5 points) Using the DKS fair queueing scheduling algorithm, what’s the departure order of the four packets? (c) (1 points) In Figure 2, the router implements the deficient round robin algorithm de- scribed by Shreedhar and Varghese. The round robin pointer starts at the queue for flow 1, and then flow 2, and 3, and starts over from flow 1 again. What is the quantum size the router should use? (d) (3 points) What are the the values of the deficient counters after one round? You can mark on the figure. CompSci 514, March 31, 2015 2 Page 2 of 9
3 Quantum size 40 Deficient counter 1 1 1 2 3 100 100 Router capacity = 10 capacity = 1 2 1500 Figure 2: Router uses deficit round robin fair queuing. (e) (1 point) What’s the order of packet departure in this case? CompSci 514, March 31, 2015 3 Page 3 of 9
2. (15 pt) Answer the following questions about Chord. (a) (1 pt) Suppose a Chord system uses a m-bit identifier space. How many entries does a node in this system at most have in its finger table? (b) (2 pt) Is it ever correct for a Chord node with ID x to have a finger table entry that points to a node more than half-way around the ID space from x ? If yes, give an example; if no, explain why. (c) (2 pt) Suppose by accident, all of Chord node x ’s finger table entries point to x ’s im- mediate successor in ID space, but everything else about the system is correct. Will lookups that x participates in still work correctly? Explain why. CompSci 514, March 31, 2015 4 Page 4 of 9
(d) (2 pt) A Chord node n performs a lookup for key k , and the result is node n 1 . Then n performs another lookup for the same key. Is the result guaranteed the same for the second lookup? Explain why. (e) (8 pt) Suppose a Chord system has a 160-bit identifier space. The one-way one-hop lookup latency in this system is uniformly distributed between 0 to 100ms. Suppose every lookup for a key k takes 80 intermediate hops to resolve. Answer the following questions. A. (1 pt) If the Chord system uses recursive query (each node forwards the query message to the next node), what is the average query lookup latency of this system? CompSci 514, March 31, 2015 5 Page 5 of 9
B. (1 pt) If the Chord system uses iterative query (a node returns a referral to the next node to the original querier), what’s the average query lookup latency of this system? C. (2 pt) In the Chord paper, the i th entry of a node x ’s finger table points to the immediate successor node of x + 2 i − 1 . Alissa Hacker has an idea of improving Chord’s performance. Her idea is for x to ping the first three nodes in the ID space [ x + 2 i − 1 , x + 2 i ), and stores the node with the smallest latency. If there are less than three nodes in the ID space [ x + 2 i − 1 , x + 2 i ), x pings less than three nodes. Will this improved Chord system work correctly? Explain why. CompSci 514, March 31, 2015 6 Page 6 of 9
D. (2 pt) If you think Alissa’s system work correctly, what is the average lookup latency of this system? Assume recursive lookup and use all the assumptions stated at the beginning of this problem. The expected value of the minimum of j values chosen from a uniform 0...100 distribution is 100 / ( j + 1). E. (2 pt) Alissa thinks that her scheme can be further improved, if a node x pings every node between x + 2 i − 1 and x + 2 i and refers to the node with the smallest latency in its i th finger table entry. Suppose the Chord ring is half full. Assume recursive query. What’s the average response time of a query sent to a node at the i th finger table of node x ? CompSci 514, March 31, 2015 7 Page 7 of 9
3. (10 pt) DNS and Content distribution network. (a) (3 pt) Suppose you are the CIO of CoolGrads.com. Your website www.CoolGrads.com has attracted much traffic and you are considering to use Akamai for content distribution. What changes do you need to make on the DNS record of www.CoolGrads.com ? (b) (3 pt) Caching is the key technique that makes DNS scalable. But Alissa Hacker argues that DNS caching may adversely affect Akamai’s performance. Explain why. CompSci 514, March 31, 2015 8 Page 8 of 9
(c) (2 pt) What does Akamai do to reduce the side effect of DNS caching on its performance without significantly reducing DNS’s scalability? (d) (2 pt) As we learned in class, a BitTorrent client randomly chooses peers to optimistically unchoke. Alissa Hacker got this idea of using Akamai to help a BitTorrent client choose peers that are close to it in terms of network latency. Explain how this might be done. CompSci 514, March 31, 2015 9 Page 9 of 9
Recommend
More recommend