HW1F11-key - Homework Assignment #1 Due 9/19 at 5:00pm...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Homework Assignment #1 Due 9/19 at 5:00pm EE122 Fall 2011 Please submit your solutions using BSpace (https://bspace.berkeley.edu/). Log in to BSpace with your CalNet ID, click on the EL ENG 122 Fa11 tab, and click on Assignments under Course Tools. Assignments should be submitted in one of the following formats: .txt, .pdf, or .ps. Note: this first homework assignment is more about teaching than testing. You should be able to work out the answers without knowing very much a priori, but in so doing I hope you learn something about the material. We will be generous with help on this assignment, so please make full use of office hours (particularly Scott's, since he's the one responsible for any mistakes in the assignment). Good Luck! 1) General Information [5 points] You are expected to look these answers up online! For each of the following acronyms (all of which relate to the governance to the Internet), please provide an expansion of the acronym and a one sentence description of what role it plays in the Internet. (a) IETF: Internet Engineering Task Force - An open standards organization that develops standards for the Internet, particularly those dealing with Internet protocols. (b) ICANN: Internet Corporation for Assigned Names and Numbers - It manages the assignment of IP address blocks to Internet registries and the manages the top-level domain namespace. It also manages the operations of the root servers. (c) IRTF: Internet Research Task Force - An organization that promotes long-term research on issues related to the evolution of the Internet, by creating working groups focusing on the Internet architecture, protocols, traffic, etc. (d) IAB: Internet Architecture Board - A committee responsible for the technical development of the Internet, oversees the IETF and IRTF. (e) RFC: Request For Comments - A a memorandum published by the Internet Engineering Task Force (IETF) describing methods, behaviors, research, or innovations applicable to the working of the Internet. This is the main vehicle by which Internet standards are defined and promulgated. Bonus Question: From what room, at what time, and typed by whom were the first keystrokes carried over the ARPANET. Charley Kline at UCLA, at 10:30 p.m, on October 29, 1969 from Boelter Hall 3420 1 2) Statistical Multiplexing [15 points] Consider a system where time is divided into "frames", and each frame is divided into "slots". These slots are allocated to flows (i.e., flow A might get the third slot in each frame). We consider the case where these allocations are done either individually (slots are given to specific flows) or in groups (slots are assigned to a group of flows, and a packet from any flow in the group can use one of the assigned slots). When the flows are each given one slot per frame, any frame in which a flow sends more than one packet results in the excess packet(s) being dropped. When n flows share their slots, any frame in which the flows collectively send more than n packets in a frame results in the excess packet(s) being dropped. We consider a set of flows that all have the following identical probabilistic sending behavior: in each frame, a flow sends, with equal probability, either zero, one, or two packets. That is, with probability 1/3rd it sends zero packets, with probability 1/3rd it sends one packet, and with probability 1/3rd it sends two packets. We now consider the following four cases: i) n=1: consider the case where each flow gets a single slot per frame. What fraction of its packets is dropped? Answer: 1/3. When zero packets are sent, none are dropped. When one packet is sent in a frame, it is not dropped. But when two packets are generated in the same frame, only one is successfully transmitted and the other is dropped. Each of these events happen with equal probability; out of these three events, three packets are generated and one is dropped, so the fraction of packets that are dropped is 1/3rd. Please apply this reasoning to the following cases, where you have to supply the answer. ii) n=2: consider two flows sharing two slots per frame. What fraction of their packets is dropped? Hint: Each of these following events (and more that aren't listed) happen with probability 1/9th: neither flow generates a packet; flow A generates one packet and 2 flow B generates 0 packets; flow A generates 0 packets and flow B generates 1 packet; etc. To solve this problem, merely consider each of these events (and the rest not listed here) and determine in which cases the packets are dropped (e.g., when both flows generate two packets, or one flow generates two packets and the other flow generates one packet). Just multiply the probability of the event times the number of dropped packets in that event (this gives the average rate of dropped packets) and then divide this by the average rate of generated packets (which is one per frame per flow). If this seems hard, you are doing it wrong. If this seems easy but tedious to list all the cases, you are probably doing it right. Answer: 2/9 Average number of drops per frame: (1/9) x (0+0+0+0+0+1+0+1+2)) = 4/9 Average number of packets sent per frame: 2 Fraction of packets dropped: (4/9)/2 = 2/9 iii) n=3: consider three flows sharing three slots per frame. What fraction of their (joint) packets is dropped? Answer: 5/27 iv) n=4: consider four flows sharing four slots per frame. What fraction of their (joint) packets is dropped? Answer: 13/81 Now answer two general questions: v) In the case where n becomes infinitely large, what fraction of packets do you think will be dropped? (I'm not looking for a proof, just an educated guess.) (a) , (b) 1/3, (c) 1/5, (d) 0, (e) none of the above Answer: (d) 0 No students were able to answer the question posed in class as to how quickly this goes to zero. The instructor doesn't know the answer either, but consider this an extra credit question to be answered at some point before the midterm..... 3 vi) According to the Law of Large Numbers, how many packets will be sent in each frame when n is very large (to a close approximation)? (a) 0, (b) n, (c) 2n, (d) 3n, (e) n2, (f) n1/2 vii) Answer: (b) n. The Law of Large numbers says that when you take many samples from a distribution, the average of the samples ends up being very close to the average of the distribution. Each flow generates one packet per frame on average, so when you sample many such flows you will end up with a number very close to n. What does this problem suggest about statistical multiplexing? List all that apply: (a) Nothing (b) Bursty flows are better off having their own slots. (c) Bursty flows are better off sharing their slots with each other. (d) The Internet is a dumb idea. (e) The instructor does not understand fractions. (f) Statistical multiplexing gets more effective (in reducing dropped packets) as you increase the number of flows sharing their slots. Answer: (c) and (f). 3) Packet Delays in Packet- and Circuit-Switching [15 points] We now compare the time it takes to transfer a file of data under circuit-switching and packet-switching. Consider a network consisting of n links in a row, each with bandwidth B and latency L. Recall that bandwidth is the bits/sec transmitted over a link, and latency is the propagation time along the link. Below is such a network with n=5. Source Destination Circuit-switching: At time t=0, the first node (the source) sends out a circuit reservation packet (of size R) which is sent to the second node, which then receives the full packet, and then forwards it to the next node. This is continued at each node, until the reservation packet arrives at the last node (after traversing n links). After this reservation message is processed at the last node (the destination), the last node sends back a reservation confirmation message (also of size R) back to the first hop. Because the circuit is established before this confirmation is sent, this packet need not be processed at each node; instead, the bits flow through the nodes without any delay. Once the confirmation message is received at the first node (the 4 source), the source immediately starts sending the file (which is of size F) at the full bandwidth of the link. Note that when the file is transferred, the data is not stored- and-forwarded at any of the intermediate nodes but is just passed through without delay. Also, we ignore the teardown message, since it is only sent after the file arrives. (i) Assuming no problems in transmission along the way, at what time does the last bit of the file arrive at the last node (the destination)? (a) t= R/B+ F/B+3nL (b) t= n{L+ R/B}+nL+R/B+nL+F/B (c) t= n{L+ R/B}+n{L+R/B}+n{L+F/B} (d) t= 3n{L+ R/B+F/B} (e) t= n{L+R/B}+nL+ R/B+nL Answer: (b) Packet-switching: Here the file is broken into Q packets of size D, each with header size H and payload size P. Since the entire file must be carried, QP=F. At time t=0, the source (the first node) sends the first packet, which is stored-and-forwarded at each of the subsequent nodes until it reaches the destination (the last node). As soon as the source finishes sending the first packet, it sends the second packet (at full link bandwidth). Note that the source does not wait until the first packet arrives at the next node before starting the next transmission, it starts sending the next packet as soon as it has finished transmitting the previous packet. We assume that a node can immediately send a packet out on the next link as soon as the last bit has arrived from the previous link (i.e., there is no time required to process the packet before sending it on the next link) ii) Assuming no packet drops or other errors, at what time does the last bit of the file arrive at the destination? (a) t= Q(P+H)/B+3nL (b) t= QP/B+nL (c) t= n{L+P/B+H/B}+n{L+H/B}+n{L+F/B} (d) t= 3n{L+F/B} 5 (e) t= Q(P+H)/B+nL+(n-1)(P+H)/B Answer: (e) In the following questions, we refer to cases where some quantities are big. By that we mean consider the limit where that quantity becomes infinitely large or infinitesimally small. Note that some quantities are linked (i.e., if the payload P gets smaller, the number of packets Q must get larger to keep QP=F). For each question, answer (a) if circuit-switched is faster, and (b) if packet-switched is faster. Even if you didn't get the formulae above completely correct, you should understand how these perform relative to each other in the limit. Use this as a way to check your answers for (i) and (ii). iii) If the file size F is very large, which is faster? (Assume that the header size H has not changed.) Answer: Circuit Switching. When F gets big, either P or Q also gets big. So packet switching either incurs a large transmission delay at each switch (large P), or incurs sends many header bits (large Q), both of which make it slower than circuit switching. iv) If the payloads become small (but the header size remains constant), which is faster? Answer: Circuit Switching. This is because when payloads become small the number of packets transmitted becomes very large, so the total number of bits sent (header plus payload for each packet) becomes very large. v) If the bandwidth B is very large, which is faster? And by what ratio (in the limit)? Answer: Packet Switching, and it is three times faster. This is because the only term that remains when B is infinitely large is the latency. Packet switching has latency nL, circuit switching has latency 3nL (reservation takes 2nL and data transfer takes nL). 4) Packet-Switching vs Circuit-Switching: retransmissions in the presence of failures [15 points] In what follows, we ignore the latency of links and the overhead of packet headers. We consider a single link with bandwidth B that fails occasionally according to a particular failure model. In particular, we assume that for any period of length t, the probability that the link goes down sometime during that time is f(t) where, for some given constant r (r = rate of failure), the function f is given by: = 1 - !!" 6 In what follows, we set r=B/F to make the algebra easier. We also note that if a transmission must be resent with probability p, the average number of repeats R (not counting the original event), is given by: = 1 - Circuit-switching: In the circuit-switched case, there is a single long transmission of a file of length F (which takes F/B to complete). (i) What is the probability of a failure during this transmission? (a) 1 (b) 0 (c) e-1 (d) 1-e-1 (e) Answer: (d) The time it takes to send the file is t=F/B, and plugging that into the formula for f(t) yields (d). (ii) How many retransmissions (not counting the original transmission) are there on average? (This will not be an integer, since we are taking an average.) (a) infinite (b) 0 (c) e-1/(1-e-1) (d) e(1-e-1) (e) 1 Answer: (d). Plugging the answer in (i) into the formula for R yields (d). (iii) How many bits are sent in these retransmissions? (a) infinite (b) 0 (c) Fe-1/(1-e-1) (d) Fe(1-e-1) (e) F Answer: (d) . We know that each transmission is of size F, so that yields (d). 7 Packet-switching: Now consider a packet switched network that splits this file into Q data packets, each of size F/Q (ignoring the packet headers), where Q is an integer larger than 1. iv) What is the probability that a particular packet transmission will fail? (a) 1 (b) 0 (c) 1-e-(1/Q) (d) 1-Q-1 (e) Q-2 Answer: (c). Now, based on the above reasoning, think about how to compute the number of retransmissions and the resulting number of bits in those retransmissions. You need not show this result (in fact, you won't get credit for doing so), just be able to use it to answer the question below. The number of retransmissions for each of the Q packets is (1- e-(1/Q))e(1/Q) so that number of bits sent is the product of the number of packets times the size of each packet times the number of retransmissions, which is Q x (F/Q) x (1- e-(1/Q))e(1/Q) Comparison: v) Which of these schemes send more retransmitted bits? (a) Circuit-switched (b) Packet-switched Answer: (a) . This follows from plugging in any value of Q>1 into the above formula, or just recognizing that in the circuit switched case the failure probability is higher. 8 ...
View Full Document

This note was uploaded on 01/09/2012 for the course ELECTRICAL 122 taught by Professor Shenker during the Spring '11 term at University of California, Berkeley.

Ask a homework question - tutors are online