CPSC 441 Tutorial-19 Department of Computer Science University of Calgary
Problem-1 Consider n nodes that use the slotted CSMA/ CD with binary exponential back-off to access a shared broadcast channel. Assume that each node has a data frame to transmit. Using CS-MA/CD, all nodes listen to the channel and decide to transmit their frames as they all sense the channel idle. Clearly, this results in a collision and hence they have to retransmit in the following time slots. What is the probability that one of the nodes successfully retransmits its frame in the next time slot? 2
Solution-1 Each node will choose a random wait time from the set {0, 1}. The probability that a given node transmits successfully is given by Success = Pr{node choose 0 and other node choose 1} = Pr{node choose 0} * Pr{one node choose 1}^n-1 Each node uniformly chooses from the set {0,1}, thus the probability of choosing 0 is ½ and the probability of choosing 1 is ½ 3
Solution cont Success = ½ * (½ )^n-1 There is a successful transmission if any node is successful. Therefore, Prob. Success Tx = n * Success = n/(2^n) 4
Problem-2(a) Consider a broadcast channel with N nodes and a transmission rate of R bps. The broadcast channel uses polling (with an additional polling node) for multiple access. The amount of time from when a node completes transmission until the subsequent node is permitted to transmit (that is, the polling delay) is D. Assume 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? 5
Solution-2(a) Throughput is given by = Data Transmitted in one round/ Time to complete one round = N * Q/(N * (D + Q/R)) = Q/(D + Q/R) 6
Problem-2(b) Same as 2(a), except that only one node is transmitting the data. Find the effective throughput for this node. 7
Solution-2(b) Throughput is given by = Data Transmitted in one round/ Time to complete one round = Q/(N * D + Q/R) 8
Problem-3 This question is concerned with the minimum frame size required for link layer collision detection on a shared broadcast channel such as Ethernet protocol with shared bus topology. For example, 10Base Ethernet imposes a minimum frame size of 64 bytes. Suppose that two nodes A and B are connected together using a broadcast channel such that distance between A and B is d meters signals propagate in the channel at the speed of c meters per second, transmission speed of the channel is R bits per second. Suppose that node A begins transmitting a frame, and before it finishes, node B begins transmitting a frame. If the frame size is too small then A may finish transmitting before it detects that B has transmitted. Derive a formula to find the minimum size needed for a link layer frame in this network in order to correctly detect collisions. 9
Solution-3 (long) We need to make sure that one end of the Ethernet is able to detect the collision before it completes its transmission of a frame. Thus, a minimum frame size is required. Consider the worst case for Ethernet s collision detection: 1. At t = 0: A starts transmitting a frame of length X bits 2. At time t = 1/R + d/c: the first bit of A s frame arrives at B 3. Right before receiving A s first bit, B starts transmitting a frame of its own. This happens a moment before time t = 1/R+d/c, before B can sense A s first bit 4. The first bit of B s frame arrives at A at time t = 2 * (1/R + d/c) If A finishes its transmission of its last bit just before first bit of B s frame arrives at A, then A won t be able to detect a collision befor e finishing its transmission of the frame. Thus, in order for A to de tect collision before finishing transmission, the minimum required frame size should be X 2R * (1/R + d/c) bits 2R * d/c bits 10
Solution-3 (Short) Transmission time of the frame should be longer than the round-trip propagation delay of the channel. Therefore, X/R 2 * d/c X 2R * d/c 11
Problem-4 Consider nodes A and B that are using the slotted ALOHA protocol to access a shared channel. Suppose A has more data to transmit than B. Let pa and pb denote A and B s respective retransmission probabilities, and assume that pa > pb. Answer the following questions: Give an expression for node A s average throughput What is the total efficiency of the protocol with these two nodes? 12
Solution-4 Let R denote the channel rate. If the efficiency is X then the average throughput is given by X*R. For simplicity, let assume the channel capacity is R = 1, and pa and pb are the probability of transmission at any given time slot. a) A s average throughput is given by pa(1-pb) b) Total efficiency is pa(1-pb) + pb(1-pa) 13
Problem-5 Consider N wireless nodes that are using the slotted ALOHA protocol to access a shared channel. One of the nodes, referred to as node A, has more data to transmit than any other node. Node A has retransmission probability pa, and every other node has retransmission probability p (0 < p < 1). Find pa so that the average throughput of node A is twice as large as that of any other node. 14
Solution-5 Assume pa and p as the probability of transmission at any given time slot. A s throughput is pa(1-p)^n-1, and any other node has throughput [p(1-p)^n-2] * (1-pA). Thus, pa (1-p) ^ N-1 = 2 *p(1-pa)[(1-p)^n-2] pa pa * p = 2p 2p * pa pa = 2p/(1 + p) 15