Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Poisson Random Process. 2 Mean and Variance Results You have to memorize these! You should be able to derive any of the above Exponential: Poisson:

Similar presentations


Presentation on theme: "1 Poisson Random Process. 2 Mean and Variance Results You have to memorize these! You should be able to derive any of the above Exponential: Poisson:"— Presentation transcript:

1 1 Poisson Random Process

2 2 Mean and Variance Results You have to memorize these! You should be able to derive any of the above Exponential: Poisson: Geometric: Binomial:

3 3 CMPE 252A: Computer Networks SET 3: Medium Access Control Protocols

4 4 medium access control logical link control Medium Access Control Protocols n Used to share the use of transmission media that can be accessed concurrently by multiple users. PHYSICAL LINK NETWORK TRANSPORT SESSION PRESENTATION APPLICATION Sharing of link and transport of data over the link

5 5 Contention-Based MAC Protocols n No coordination: Stations transmit at will when they have data to send (e.g., ALOHA) n Carrier sensing (listen before transmit): Stations sense the channel before transmitting a data packet (e.g., CSMA). n Listen before and during transmission: Stations listen before transmitting and stop if noise is heard while transmitting (CSMA/CD). n Collision avoidance (floor acquisition): Stations carry out a handshake to determine which one can send a data packet (e.g., MACA, FAMA, IEEE802.11, RIMA). n Collision resolution: Stations determine which one should try again after a collision.

6 6 ALOHA Protocol n The first protocol for multiple access channels; the first analysis of such protocols (Norm Abramson, Univ. of Hawaii, 1970). n Originally planned for systems with a central base station or a satellite transponder. Two frequency bands; Up link and down link (413MHz, 407MH at 9600bps) Central node retransmits every packet it receives!

7 7 ALOHA Protocol n Population is a large number of bursty stations. n Each station transmits a packet whenever it receives it from its user; no coordination with other stations! n Central node retransmits all packets (good or bad) on down link. n Stations decide to retransmit based on the information they hear from central node

8 8 ALOHA Protocol An integral part of the ALOHA protocol is feedback from the receiver Feedback occurs after a packet is sent No coordination among sources Packet ready? transmit yes wait for a round-trip time positive ack? yes no compute random backoff integer k no delay packet transmission k times

9 9 The ALOHA Channel n We assume: p An (essentially) infinite population of stations. p An ideal perfect down link for the transmission of feedback to senders. p Stations are half duplex; have zero processing delays. p Retransmissions are scheduled such that all packets are statistically independent. p Each packet has the same duration P. p Stations have the same round-trip delay from one other; this time can be much longer than P (irrelevant). p Packet arrivals are Poisson with rate lambda. p Collisions are the only sources of errors.

10 10 The ALOHA Channel n What percentage of time is the channel sending correct packets? This gives us the throughput of the protocol. time user i time user j time sum... NEW P collision I B I B I B I B I NEW RET. τ

11 11 Throughput of ALOHA Protocol is the arrival rate. For convenience, we normalize the arrival rate as: From the definition of throughput: where p is the probability of a successful packet transmission Because arrivals are Poisson and all packets have equal length, every packet has the same probability of being successful. A packet is successful if no packets arrive within P seconds before it starts or while it is being transmitted; accordingly, Therefore, G S 0.18 0.5

12 Throughput of ALOHA Protocol time node i frame t0 All packets have the same length packet overlaps with start of packet from node i t0 - 1t0 + 1 packet overlaps with end of packet from node i interfering frame Node i’s frame is vulnerable from any arrival in the time interval (t0-1, t0+1]

13 Throughput of ALOHA Protocol Highest throughput when we have one packet for each 2-packet time period time node i frame t0 packet overlaps with start of packet from node i t0 - 1t0 + 1 packet overlaps with end of packet from node i interfering frame Node i’s frame is vulnerable from any arrival in the time interval (t0-1, t0+1]

14 14 Slotted ALOHA n The throughput of ALOHA can be improved by reducing the time a packet is vulnerable to interference from other packets. n Slotted ALOHA works in a “slotted channel” providing discrete time slots. n Stations can start transmitting only at the beginning of time slots. n The time synchronization needed for slotting is accomplished at the physical layer, and some synchronization is required in many cases anyway.

15 15 Slotted ALOHA Protocol Packet ready? transmit yes wait for a round-trip time quantized in slots positive ack? yes no compute random backoff integer k no delay packet transmission k times Wait for start of next slot

16 16 Throughput of Slotted ALOHA The vulnerability period of a packet is a slot time: Any arrivals in prior slot collide with packet i time arrivals i If T is the duration of a time slot and G is the normalized packet arrival rate, then We can obtain the same result by computing the likelihood and average length of utilization, idle and busy periods.

17 17 Slotted ALOHA... P τ collision time user i time user j time sum time slot I B I B B I B NEW RET IMPORTANT: The starting point of a busy period is a “renewal point”! System is busy

18 18 Renewal Theory n Recall the Poisson random process: p N(t) = number of arrivals in (0, t] p Inter-arrival times are exponentially distributed p N(t) is a counting process with exponential inter-arrival times. n Definition of Renewal Process: A counting process N(t) for which inter-arrival times X 1, X 2, …, X n are an independent identically distributed (iid) random sequence.

19 19 Poisson Random Variable A sequence of n independent Bernoulli trials; with X being the number of arrivals in (0, t] By assumption, whether or not an event occurs in a subinterval is independent of the outcomes in other subintervals. We have: …. time t 0 arrival 1 2 3 4 n 1 2 3 k

20 20 Renewal Theory Example n At each time t = 1, 2, …, a Bernoulli process N(t) has an arrival with probability p, and this is independent of the occurrence of arrivals at any other times. n Is N(t) a renewal process? …. time 0 arrival 1 2 3 4 n 1 2 3 k

21 21 Renewal Theory Example n Answer: p For any inter-arrival period n, the inter-arrival time X n equals x if there were x-1 Bernoulli failures followed by a success. …. time 0 (1-p) (p)(p) 1 2 3 X n = 3 if we have 2 failures followed by a success!

22 22 Renewal Theory Example n Therefore, each inter-arrival time X n has the Geometric PMF: n Because each Bernoulli trial is independent, Xn is independent of the previous inter-arrival times X 1, X 2,…X n-1. n This implies that a Bernoulli arrival process is a renewal process!

23 23 Renewal Theory n After an arrival (in a renewal process), the subsequent inter-arrival times are distributed identically to the original inter-arrival times. n Effectively, the process restarts, or has a renewal, whenever an arrival occurs!

24 24 Renewal Theory n Suppose that N(t) has n arrivals by time t 1, the additional time until the next arrival is denoted by S n+1 - t 1, and the subsequent inter-arrival times are X n+2, X n+3,… and so on. n Renewal Point: For a renewal process N(t), time t 1 with N(t 1 ) = n is a renewal point if S n+1 - t 1, X n+2, Xn+3,… is an iid random sequence statistically identical to X 1, X 2, X 3,… n Every instant of time is a renewal point for a Poisson process!

25 25 Renewal Theory Alternating renewal process: System is on and off (that is, or busy and idle). time system collision... success off on off on off on off... Y1 X1 Y2 X2 Y3 X3 Y4... X1, X2, X3,…. are i.i.d. with mean E(X) Y1, Y2, Yx,…, are i.i.d. with mean E(Y) P(t) = P{system is ON at time t in steady state} = E(x)/{E(x)+E(Y)} Average cycle length = E(X) + E(Y)

26 26 Evaluating Throughput n We assume that the system is “stationary,” i.e., system behaves in cycles that are statistically equivalent n Average cycle consists of an idle period (I ) and a busy period (B ). n The busy portion of a cycle has good and part parts. n The portion of time used to send user data is called the utilization period (U ) time successfailure good busy period idle period bad busy period

27 27 Evaluating Throughput n The expression for S amounts to simply taking averages. n What we need to do now is compute the probability that I, B (good a bad parts), and U happen in an average cycle, and their average duration. n Ideally, these probabilities are based on independent events, and we can express S based on knowledge of the present state of the system.

28 28 Throughput of Slotted ALOHA Idle, busy and utilization periods are multiples of time slots. We need to count the time slots in each average period and we are done. Average length of idle period: I = number of slots in idle period time arrivals transmissions start no arrivals idle period starts

29 29 Idle Period in Slotted ALOHA I has one slot: time there is a prior busy period... at least one arrival! time I has two slots:... at least one arrival!no arrivals

30 30 Idle Period in Slotted ALOHA time I has k slots:... no arrivals 1k-1k … some arrivals This corresponds to the Geometric r.v., and we know its average value to be 1/p, with p being the probability of success. Success now consists of ending the idle period! Therefore:

31 31 Busy Period in Slotted ALOHA n We follow the same approach: p Solve the problem with the Geometric random variable time B has k slots:... some arrivals 1 k-1 k … no arrivals prior slot considered in idle period

32 32 Utilization Period n Here we have to make use of conditional probability! n A busy period has good and bad time slots (transmission periods). collision time sum The probability that a slot (transmission period) in the current busy period is successful is the probability that only one packet arrives in the prior slot, given that there is a busy period Arrivals are Poisson, so we make use of the definition of that random variable as follows….

33 33 Utilization Period The probability that a given slot within a busy period is successful is: The portion of an average busy period used to send useful data equals the length of the average busy period in slots, times the probability that any given slot is successful. We can use the Binomial random variable to proof the above!

34 34 Throughput of Slotted ALOHA n We now just substitute B,I, and U in S: Maximum throughput is twice that of ALOHA. This occurs when G = 1

35 35 Average Delay of MAC Protocols n We want to measure or compute the average time from the instant the first bit of a packet is first transmitted to the moment the last bit is received correctly at the destination. n Assume that arrivals (of new and retransmitted data or control packets) to the channel are Poisson. n Assume fully-connected networks.

36 36 Average Delay in ALOHA Direct method: The average number of transmissions needed for a packet to be received correctly is Therefore, the number of retransmissions is Assumptions: A satellite channel with propagation delay NxP, where P is the packet length and NxP >> P A retransmission is sent after an average backoff time of BxP seconds. A packet is transmitted (G/S-1) times in error (due to collisions) and each such transmission wastes P+NxP +BxP seconds. The last transmission is successful and must take P+NxP seconds. Therefore, the average delay incurred is:

37 37 Average Delay in ALOHA Indirect Method: Based on the fact that the success of a transmission is independent of others, and knowing how many times we have retransmitted does not change the likelihood of success in the next transmission! We use a diagram showing possible states, probabilities of transition, and delay incurred in that transition. START END BACK OFF From the diagram. we obtain a number of simultaneous equations that we solve to obtain delay from START to END.

38 38 Average Delay in ALOHA From the diagram we have: Solving these two equations: Substituting we obtain the same result expected from the Geometric r.v. The same method can be applied on the other MAC protocols!

39 39 Average Delay of ALOHA n The delay increases exponentially with heavy load, which is not acceptable for real-time applications.

40 40 CSMA: Carrier Sense Multiple Access n The capacity of ALOHA or slotted ALOHA is limited by the large vulnerability period of a packet. n By listening before transmitting, stations try to reduce the vulnerability period to one propagation delay. n This is the basis of CSMA (Kleinrock and Tobagi, UCLA, 1975) n Many of the assumptions made for ALOHA are made now for CSMA.

41 41 CSMA Protocol Assume non-persistent carrier sensing. Requires a maximum propagation delay much smaller than packet lengths! transmit no wait for a round-trip time positive ack? yes compute random backoff integer k no delay packet transmission k times Packet ready Channel Busy? yes

42 42 CSMA Throughput A virtual secondary channel used to send ACKs reliable and in 0 time! Same assumptions made for pure ALOHA analysis. All stations are at one propagation delay from each other and that equals: Arrivals are Poisson with average rate Peer-to-peer communication No base station or transponder Explicit feedback to sender!

43 43 CSMA Protocol The big difference compared to ALOHA is that busy periods are bounded! time user i time user j time sum... I B I B I B I RET. RET NEW P collision τ

44 44 CSMA Throughput P time RET. NEW collision I B I B I B I failed period successful period Length of average idle period (exponential interarrivals)? The probability that a packet is successful is? The average length of a utilization period is? (no packets can arrive within tau sec. after the start of the packet!) We can approximate:

45 45 CSMA Throughput Substituting we have: Pretty accurate for << P More accurate estimation of S requires finding the average length of B. time FIRST LAST P START END Y Y Y is a random variable!

46 46 CSMA Throughput time FIRST LAST START Y =y no arrivals, no more arrivals occur after LAST Note that the average length of B is determined by the time between the start of the first and the last packet in the busy period.

47 47 CSMA Throughput Substituting we get: Approximate:

48 48 Slotted CSMA n Non-persistent strategy. n A slot lasts one maximum propagation delay. no wait for a round-trip time quantized in slots positive ack? yes compute random backoff integer k no delay packet transmission k times Packet ready Channel Busy? yes transmit wait for start of next slot

49 49 Computing the Throughput of Slotted CSMA NEW P time collision I B I B I success RET. time I has k slots:... no arrivals 1k-1k … some arrivals Just as in slotted ALOHA, with slot duration equal to

50 50 Throughput of Slotted CSMA n We follow the same approach as in slotted ALOHA n B has k transmission periods, each of P + τ sec n What happens in a transmission period depends only on the last time slot of the prior transmission period! time... some arrivals in last slot of each transmission period 1 k-1 k … no arrivals in last slot of last transmission period Slotted CSMA:

51 51 Throughput of Slotted CSMA A transmission period is successful with probability and the period has useful data for P seconds We use the Geometric r.v. to obtain the average number of transmission periods in B :

52 52 Throughput of Slotted CSMA n We now substitute U, B and I in S:

53 53 CSMA Throughput n Because prop. delay is much smaller than pkt length, slotted and pure CSMA have very similar performance. n When MAC protocol requires small prop delays, we can use slotted version to predict performance of unslotted version. Reminder: These results are only an upper bound on performance, because we did not take into account the effect of ACKs sent from receivers!

54 54 CSMA/CD: CSMA with Collision Detection n CSMA improves on the performance of ALOHA tremendously. n The remaining limitation is that, once a packet is sent, feedback occurs a roundtrip time after the entire packet is transmitted. n The solution to improve on the performance of CSMA is to listen to the channel while a packet is being sent. n This is called collision detection. n R.M Metcalfe and D.R. Boggs, “Ethernet: Distributed Packet Switching for Local Computer Networks,” Comm. ACM, Vol. 19, 1976 (Xerox PARC).

55 55 CSMA/CD Protocol Non-persistent transmission strategy Collision detection serves as a NACK! transmit no abort transmission Collision detected? no compute random backoff integer k yes delay packet transmission k times Packet ready Channel busy? yes send jamming signal Assumption are: All stations hear one another Propagation delay is much smaller than packets Station listens to channel while transmitting; Collision is detected when signals sent and heard differ. Jamming signal sent to ensure all stations know of the collision.

56 56 Throughput of CSMA/CD time collision interval: successful packet: first packet starts (A) first interfering packet starts (B) A starts hearing B and jams B starts hearing A and jams idle period NEW A B average idle period:

57 57 Throughput of CSMA/CD n Notes: p The average length of a bad busy period is much smaller than in CSMA because J<<P. p This length is determined by the time between the first packet in the busy period and the first packet that interferes (in contrast, in CSMA, it is the last interfering packet that counts) For However, we can derive an exact value of the average value of Y. we can approximate: The utilization period is only that portion of a packet transmission that has no overhead, that is:

58 58 Throughput of CSMA/CD Substituting we get:

59 59 Throughput of CSMA/CD Therefore:


Download ppt "1 Poisson Random Process. 2 Mean and Variance Results You have to memorize these! You should be able to derive any of the above Exponential: Poisson:"

Similar presentations


Ads by Google