1 / 86

# Medium Access Control Sublayer

Medium Access Control Sublayer. Static Channel Allocation. FDM TDM Wastage of resources when some of the users are idle. What if the number of users increase. Dynamic Channel Allocation :.

Télécharger la présentation

## Medium Access Control Sublayer

E N D

### Presentation Transcript

1. Medium Access ControlSublayer

2. Static Channel Allocation • FDM • TDM Wastage of resources when some of the users are idle. What if the number of users increase

3. Dynamic Channel Allocation : Systems in which multiple users share a common channel in a way that can lead to conflicts are called contention systems.

4. Basic Assumptions • Station model : N independent stations. Once a frame has been generated, the station is blocked, does nothing until the frame has been successfully transmitted • Single Channel : All channel can transmit on it and all can recv from it. • Collisions : when more than one station try to transmit a frame and they overlap in time, both of them are garbled and we say that a collision has occurred. Both the frames must be transmitted again.. There r no errors other than collision

5. Basic assumptions contd… 4. Continous time / Discrete time 5. Carrier Sense/ No carrier sense

6. Multiple Access Protocols • ALOHA (by Norman Abramson in 1970) – No carrier Sense • Carrier Sense Multiple Access Protocols • Collision-Free Protocols • Limited-Contention Protocols • Wavelength Division Multiple Access Protocols • Wireless LAN Protocols

7. PURE ALOHA • Continuous Time • No Carrier Sense

8. Pure ALOHA contd… • We assume that all the frame lengths are same because , it makes the study easier , and the performance of the system is best when the frames are of fixed size.

9. Pure ALOHA contd… • Let N : average number of frames created a new per frame time • G : average number of frames transmitted ( new frames + retransmission due to collision) per frame time • Let both follow Poisson distribution I.e. for eg. Pr[k] = G^k e^{-G} / k! Is the probability of transmitting k frames in a given frame time.

10. Pure ALOHA contd… • Throughput S = fraction of all the frames transmitted that escape the collision, per frame time For eg . If the throughput is 18% and If frame time = 1/100 sec Then though 100 frames can be transmitted in one second only (at most) 18 of them are transmitted successfully.

11. Pure ALOHA contd… • S = GP_0 Average number of frames transmitted X the probability that it will not suffer a collision. Where P_0 is the probability that a frame doesn’t suffer a collision

12. Pure ALOHA contd…

13. Contd.. • The frames that collide with the shaded frame are generated in the intervals to – to+t and to+t – to + 2t. Average number of frames generated in these two time intervals is 2G. • Probability that no frame is transmitted in these two intervals is therefore e^{-2G}

14. Pure ALOHA contd… • Since Pr[k] = G^k e^-G / k! Therefore , P_0 = e^-2G, for two frames and S = G e^-2G The max thruput occurs at G = 0.5 with S = 1/2e = .184

15. Slotted ALOHA • S = G e^-G Max at G =1, with S = 1/e = .368 ~ .37 Probability that a slot is idle = P_0 = 1/e ~ .37 Hence 37% idle, 37 % success and remaining 26% collisions.

16. Slotted ALOHA contd…

17. Slotted ALOHA • Higher values of G reduces the empty slots but increases collisions exponentially.

18. CSMA : Carrier Sense Multiple Access Protocols • 1 – persistent CSMA when a station is ready to send a frame , it senses the channel : if busy : continuously sense it and waits for it to become free if idle : sends it (with probability 1) ..hence the name 1 -persistent if collision : waits for random time and tries again

19. CSMA contd… • Effect of propagation delay in CSMA – if signal from station A has not reached station B and station B is ready to send, it will sense the channel to be idle and send its frame. • Collision can be there even when propagation delay is zero and carrier sense is also there – Two stations wait for a third station to finish and then transmit simultaneously.

20. 1-persistent contd.. • Better than Pure ALOHA but would have been better if the two stations were more patient.

21. Nonpersistent CSMA • Less greedy than 1 persistent , hence better channel utilization but longer delays when a station is ready to send a frame , it senses the channel : if busy : waits for random time rather than continuously sense it for the purpose of seizing it if idle : sends it . if collision : waits for random time and tries again

22. p- persistent CSMA • Applies to slotted channels • Senses the channel when ready If busy : waits for the next slot If idle : sends its frame with probability p and defers it with probability q = 1 – p to the next slot : Note that it defers even when the channel is idle Repeats above until either it or some other station grabs the channel. In case some other channel grabs it ..it treats it like a collision I.e. waits for a random time and starts again

23. Comparison

24. CSMA/CD: CSMA with Collision Detection • Suppose after a station has finished sending its frame, say at time to, other stations try to sense the channel for collision. In case, collision is detected, it refrains from transmitting, waits for a random amount of time and tries again. • The above procedure is repeated until the station gets a chance to transmit its frame.

25. CSMA with Collision Detection CSMA/CD can be in one of three states: contention, transmission, or idle.

26. What should be the size of the contention interval? • How long does it take for a channel to detect a collision (max time)? • Let the time it takes for a signal to travel between the two farthest stations, say A and B, is t • At t0, A starts transmitting. • At t-epsilon, an instant before the signal reaches B, B also starts transmitting, collision occurs • But the collided signal reaches back to A not before additional t time .. I.e. at an instant 2t-epsilon • Hence it takes about 2t time for A to detect a collision • Hence the contention interval must be 2t.

27. CSMA/CD contd.. • If a station detects collision in the midway of generating its frame, it stops immediately rather than generating the entire frame. • Widely used • Also in Ethernet LAN.

28. CSMA/CD • Collisions do not occur in CSMA/CD once a station has acquired a channel. However, the collisions can still occur during the contention periods.

29. Collision-Free Protocols • Not used these days in major systems but possess some nice properties.

30. Collision-Free Protocols The basic bit-map protocol.

31. Performance • Under light load, few frames and more contention slots, so overhead is high • Let one time unit = time for contention bit slot • Let one frame time = d time units • Efficiency is roughly = d/(d+N) where N is the number of contention slots, assuming roughly 1 frame per N contention slots • Under heavy loads, lots of frames, so overhead per frame is low, assuming N frames for every N contention slots, efficiency = dN/(dN + N) = d/(d+1)

32. Collision-Free Protocols (2) The binary countdown protocol. A dash indicates silence.

33. Channel efficiency • = d/(d + log N) • Disadv : Biased towards higher numbered stations

34. A Variation of Binary countdown – by Mok and Ward(1979) • Use round-robin A station which has been served is numbered lower (say given lower priority) and others behind it are moved up.

35. Revisit p-persistent Protocol • It is symmetric .I.e each station acquires a channel with the same probability p. • Suppose k stations are contending probability that some station acquires the channel in a given slot is k p (1 – p)^(k-1) What should be the value of p so that this probability is maximum? Ans : p = 1/k and the max probability is ( 1 – 1/k)^(k-1)

36. Performance Comparison • Contention Protocols • Low delays, better channel efficiency at low load • Poor channel efficiency at heavy load • Collision- free Protocols • High delays, poor efficiency at low load • Better channel efficiency at heavy loads.

37. Limited- Contention Protocols • Combine the benefits of both the strategies • Divide the number of contending stations into groups • stations in group 0 contend for slot 0 • If one of them acquires, it transmits the frame • Else, stations in group 1 contend for slot 1 • And so on

38. Assign stations to groups dynamically • Assign many stations to a group under light load ( slotted ALOHA types) • Competition is more (actually light under light load) but the bit map and hence the overhead is less • Assign few (may be one) station to a group under heavy loads ( close to bit map) • Competition per slot is less but the bit map size increases but that’s fine because overhead per frame is not much under heavy loads.

39. Adaptive Tree Walk Protocol • Think of the stations as the leaves of a binary tree

40. How far down the tree the search must begin? • Does it make sense to allot slot 0 to node 1 at heavy load ? • Assume that each station has a good estimate of the number of stations q contending at any point of time • Further assume that the ready stations are uniformly distributed at the leaves of the binary tree.

41. At a node at level i the expected number of ready channels under it is q/2^i • Intuitively, the optimal level to begin search is the one for which q/2^i is 1 • I.e. i = log q.

42. WDMA: Wavelength Division Multiple access : MAC sub-layer in optical networks • The spectrum is divided in to channels (wavelength bands) • Each channel is divided into groups of time slots • Each station is assigned two channels • Narrow channel – control channel • Wide channel – data channel

43. Contd.. • There is no relation between the number of time slots in the control channel (say m), the number of time slots in the data channel (say n + 1) and the number of stations. • Each data channel has one slot as the status slot.. Which tells other stations about its free slots. • A station might use zero, one or more of the time slots in data or control channels.

44. More topics for presentation(1 person each) • MAC Sublayer in Optical Networks. • MAC Sublayer in WLANs (802.11) • MAC Sublayer in Broadband Wireless(802.16)

45. Wavelength Division Multiple Access Protocols Wavelength division multiple access.

46. 3 types of traffic • Constant data rate CO traffic • variable data rate CO traffic • Data-gram traffic

47. Dynamic WDMA contd… • Each Station has two transmitting channels and two receiving channels as follows : • Fixed wavelength receiver for listening to its own control channel • Tunable transmitter for sending on other stations’ control channels • Fixed wavelength transmitter for outputting data frames • Tunable receiver for selecting a data transmitter to listen to

48. Variable Data Rate CO traffic • Connection is established to exchange control information but not for data. • “There is a frame for you in slot 3” • Collision in establishing a connection in the control slot : no problem  try again • Problem is : 2 stations establish connection with B say in slots 4 and 5, but both send “There is a frame for you in slot 3” …. B chooses one of them by tuning itself to one of them and the frame from the other is discarded.

49. Constant Data Rate COO • A connection is established in a data slot also • When A asks for a connection it also says something like : Is it all right if I send you a frame in every occurrence of slot 3. If A is free in that slot, a guaranteed bandwidth connection is established

More Related