1 / 18

ECE358: Computer Networks Spring 2012

ECE358: Computer Networks Spring 2012. Solutions to Homework #2.

jontae
Download Presentation

ECE358: Computer Networks Spring 2012

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. ECE358: Computer NetworksSpring 2012 Solutions to Homework #2

  2. P 1.Suppose the information content of a packet is the bit pattern 1110 0110 1001 1101 and an even parity scheme is being used. What would the value of the field containing the parity bits be for the case of a two-dimensional parity scheme? Your answer should be such that a minimum-length checksum field is used. To get a minimum –length checksum field ( minimum parity bits), the two-dimensional parity scheme should be 4x4. In the two-dimensional even parity scheme, the values of the parity bits are set such that the number of 1s in each of the ellipses shown is even.

  3. P2.Show (give an example) that two-dimensional parity checks can correct and detect a single bit error. Show (give an example of) a double-bit error that can be detected but not corrected Sent Frame Received Frame w/ 1 error The error can be detected and corrected. Received Frame w/ 2 error Errors can be detected but cannot be corrected.

  4. P5.Consider the 5-bit generator, G=10011, and suppose that D has the value 1010101010. What is the value of R (R is the CRC)? D.2r G CRC

  5. P 6.Consider the previous problem, but suppose that D has the value a. 1001010101. b. 0101101010. c. 1010100000. a. CRC

  6. Continuing P 6. b. CRC

  7. Continuing P 6. c. CRC

  8. P 8. In the class, we provided an outline of the derivation of the efficiency of slotted ALOHA. In this problem we'll complete the derivation. a. Recall that when there are N active nodes, the efficiency of slotted ALOHA is Np( 1 -p)N-1. Find the value of p that maximizes this expression.b. Using the value of p found in (a), find the efficiency of slotted ALOHA by letting N approach infinity. Hint: (1 - 1/N)N approaches as N approaches infinity. a. At the stationary points of , =0 =0  Either or [ For  (minima) For [ = (Maximum) b. Efficiency

  9. P 10.Consider two nodes, A and B, that use the slotted ALOHA protocol to contend for a channel. Suppose node A has more data to transmit than node B, and node A’s retransmission probability is greater than node B's retransmission probability . a. Provide a formula for node A's average throughput. What is the total efficiency of the protocol with these two nodes? b. If pA = 2pB is node A's average throughput twice as large as that of node B? Why or why not? If not, how can you choose pA and pB to make that happen? c. In general, suppose there are N nodes, among which node A has retransmission probability 2p and all other nodes have retransmission probability p. Provide expressions to compute the average throughputs of node A and of any other node. clearly, A’s throughput 2 B’s throughput In order to make =2 

  10. P 11.Suppose four active nodes—nodes A, B, C and D—are competing for access to a channel using slotted ALOHA. Assume each node has an infinite number of packets to send. Each node attempts to transmit in each slot with probability p. The first slot is numbered slot 1, the second slot is numbered slot 2, and so on. a. What is the probability that node A succeeds for the first time in slot 5? b. What is the probability that some node (either A, B, C or D) succeeds in slot 4? c. What is the probability that the first success occurs in slot 3? d. What is the efficiency of this four-node system? • ,

  11. P 12. Graph the efficiency of slotted ALOHA and pure ALOHA as a function of p for the following values of N: a. N=15. b. N=25. c. N=35.

  12. Continuing P 12.

  13. P 13.Consider a broadcast channel with N nodes and a transmission rate of R bps. Suppose the broadcast channel uses polling (with an additional polling node) for multiple accesses. Suppose the amount of time from when a node completes transmission until the subsequent node is permitted to transmit (that is, the polling delay) is . Suppose that within a polling round, a given node is allowed to transmit at most Q bits. What is the maximum throughput of the broadcast channel? The polling- round length= sec # of bits transmitted in a polling-round= NQ bits bit/sec

  14. P 17.Recall that with the CSMA/CD protocol, the adapter waits K * 512 bit times after a collision, where K is drawn randomly. For k= 100, how long does the adapter wait until returning to Step 2 for a 10 Mbps Ethernet? For a 100 Mbps Ethernet? • For 10Mbps Ethernet waiting time • For 100Mbps Ethernet waiting time

  15. P 18.Suppose nodes A and B are on the same 10 Mbps broadcast channel, and the propagation delay between the two nodes is 325 bit times. Suppose CSMA/CD and Ethernet packets are used for this broadcast channel. Suppose node A begins transmitting a frame and, before it finishes, node B begins transmitting a frame. Can A finish transmitting before it detects that B has transmitted? Why or why not? If the answer is yes, then A incorrectly believes that its frame was successfully transmitted without a collision. Hint: Suppose at time t= 0 bits, A begins transmitting a frame. In the worst case, A transmits a minimum-sized frame of 512 + 64 bit times. So A would finish transmitting the frame at t = 512 + 64 bit times. Thus, the answer is no, if B's signal reaches A before bit time t = 512 + 64 bits. In the worst case, when does B's signal reach A? At t=0 A starts transmitting. At t= 512+64=576 bit times , A would finish transmitting (in the worst case, A sends the minimum frame size so that it would finish transmitting shortly and consequently would not hear B). In the worst case, B begins transmitting at time t=324, which is the time right before the first bit of A’s frame arrives at B. At time t=324+325=649 B's first bit arrives at A. Because 649> 576, A finishes transmitting before it detects that B has already started transmitting. So A incorrectly thinks that its frame was successfully transmitted without a collision.

  16. Continuing P 18. A B 10Mbps Ethernet t=0 t=324 t=576 t=325 t=901 t=649 576<649  A finishes transmitting before hearing B

  17. P 19.Suppose nodes A and B are on the same 10 Mbps broadcast channel, and the propagation delay between the two nodes is 245 bit times. Suppose A and B send Ethernet frames at the same time, the frames collide, and then A and B choose different values of K in the CSMA/CD algorithm. Assuming no other nodes are active, can the retransmissions from A and B collide? For our purposes, it suffices to work out the following example. Suppose A and B begin transmission at t= 0 bit times. They both detect collisions at t =245 bit times. Suppose and . At what time does B schedule its retransmission? At what time does A begin transmission? (Note: the nodes must wait for an idle channel after returning to step 2). At what time does A’s signal reach B? does B refrain from transmitting at its scheduled time? A B B sends Jam Signal (48bits) A sends Jam Signal (48bits) 10Mbps Ethernet t=0 t=0 t=245 t=245 t=293 (245+48) t=245+48=293 t=293+245=538 t=538 (293+245) B refrains from transmitting t=538+96=634 t=805 (293+512) t=879 (634+245) t=901 (805+96) A senses for an idle channel (96 bits) B senses for an idle channel (96 bits) B’s scheduled time for retransmission

  18. Continuing P 19. • t=0, A and B begin transmission. • t=245, A and B detect collision. • t=293, A and B finish transmitting jam signal. • t=293+245 = 538, B's last bit arrives at A; A detects an idle channel. • t=538+96=634, A starts transmitting • 293+512 = 805, B's scheduled time. B must sense idle channel for 96 bit times before it transmits • 634+245=879, A's transmission reaches B Because A's retransmission reaches B before B's scheduled retransmission time (805+96), B refrains from transmitting while A retransmits. Thus A and B do not collide. Thus the factor 512 appearing in the exponential backoff algorithm is sufficiently large.

More Related