1 / 50

Chap 4 Multiaccess Communication (Part 2)

Chap 4 Multiaccess Communication (Part 2). Ling-Jyh Chen. Classification of Multiple Access Protocols. Multiple access protocols. Contention-based. Conflict-free. Collision resolution. Random access. TREE, WINDOW, etc. ALOHA, CSMA, BTMA, etc. FDMA, TDMA, CDMA, Token Bus,

eben
Télécharger la présentation

Chap 4 Multiaccess Communication (Part 2)

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. Chap 4 Multiaccess Communication(Part 2) Ling-Jyh Chen

  2. Classification of Multiple Access Protocols Multiple access protocols Contention-based Conflict-free Collision resolution Random access TREE, WINDOW, etc ALOHA, CSMA, BTMA, etc FDMA, TDMA, CDMA, Token Bus, etc BTMA: Busy Tone Multiple Access

  3. Contention Protocols • ALOHA • Developed in the 1970s for a packet radio network by Hawaii University. • Whenever a station has a data, it transmits. Sender finds out whether transmission was successful or experienced a collision by listening to the broadcast from the destination station. Sender retransmits after some random time if there is a collision. • Slotted ALOHA • Improvement: Time is slotted and a packet can only be transmitted at the beginning of one slot. Thus, it can reduce the collision duration.

  4. Slotted ALOHA Node 1 Packet Nodes 2 & 3 Packets Retransmission Retransmission 1 2&3 2 3 Time Collision Slot

  5. Slotted ALOHA (cont.)

  6. Throughput of Slotted ALOHA • The probability of no collision is given by • The throughput S is • The Maximum throughput of slotted ALOHA is

  7. ALOHA Waiting a random time Node 1 Packet Node 2 Packet Retransmission Retransmission 1 2 3 3 2 Time Collision Node 3 Packet

  8. (2G) e - 2 G ( ) = P n n ! Throughput of ALOHA • The probability that n packets arrive in two packets time is given by n where G is traffic load. • The probability P(0) that a packet is successfully received without collision is calculated by letting n=0 in the above equation. We get • We can calculate throughput S with a traffic load G as follows: • The Maximum throughput of ALOHA is

  9. Comparison of Aloha and S-Aloha 0.368 Slotted Aloha S 0.184 Aloha G

  10. CSMA: Carrier Sense Multiple Access

  11. Contention Protocols • CSMA (Carrier Sense Multiple Access) • Improvement: Start transmission only if no transmission is ongoing • CSMA/CD (CSMA with Collision Detection) • Improvement: Stop ongoing transmission if a collision is detected • CSMA/CA (CSMA with Collision Avoidance) • Improvement: Wait a random time and try again when carrier is quiet. If still quiet, then transmit

  12. Carrier Sense Multiple Access • In many multiaccess systems--e.g., LANs--ready station can determine if medium is idle before transmitting • if medium is sensed as busy, ready station defers until it becomes idle • collisions are still possible if two (or more) ready stations sense idle at same time Node 5 sense Node 1 Packet Node 2 Packet Delay Node 3 Packet 5 1 2 3 4 Time Delay Collision Node 4 sense

  13. CSMA

  14. CSMA Slotted Aloha • The major difference between CSMA Slotted Aloha and ordinary slotted Aloha is that idle slots in CSMA have a duration β. • If a packet arrives at a node while a transmission is in progress, the packet is regarded as backlogged and begins transmission with probability qr after each subsequent idle slot. • Packets arriving during an idle slot are transmitted in the next slot as usual. • a.k.a. nonpersistent CSMA

  15. nonpersistent CSMA Idle Period Collision!! Time Busy Period

  16. CSMA Slotted Aloha Variations • persistent CSMA • frames arriving during an idle slot β are transmitted at end of the minislot • arrivals during busy period are transmitted as soon as medium is sensed as idle (after β) • backlogged stations (holding collided frames) retransmit at end of each idle minislot with probability qr • P-Persistent CSMA • frames arriving during an idle minislot are transmitted at end of the minislot • arrivals during busy period are transmitted at end of each idle minislot with probability p • backlogged stations retransmit at end of each idle minislot with probability qr < p

  17. Mathematical analysis of nonpersistent • Markov chain model (discrete time) • state is number n of backlogged stations • each busy (success or collision) slot has unit length • each busy slot is followed by one (idle) minislot • each time step in the MC corresponds to a real time interval of either b (if no station transmits) or 1+ b (if at least one station transmits)

  18. CSMA Slotted Aloha Analysis • At a transition into state n (i.e., at the end of an idle slot), the prob. of no transmissions in the following slot is e-λβ(1-qr)n. • The first term is the prob of no arrivals in the previous idle slot • The second term is the prob of no transmissions by the backlogged nodes

  19. CSMA Slotted Aloha Analysis (cont.) • The expected time (T) between state transitions in the state n is β+(1-e-λβ(1-qr)n). • Clearly, β ≦T ≦ β+1 • Using Little’s Theorem, the expected number of arrivals between state transitions is: E{arrival} = λ (β+1-e-λβ(1-qr)n)

  20. CSMA Slotted Aloha Analysis (cont.) • The expected number of departure between state transitions in state n is simply the probability of a successful transmission, that is given by: • The drift in state n is defined as the expected number of arrivals less the expected number of departures between state transitions.

  21. CSMA Slotted Aloha Analysis (cont.) • For small qr, (1- qr)n-1≒(1- qr)n ≒e-qrn • Therefore, • where g(n) = λβ+ qrn is the expected number of attempted transmissions following a transition to state n • The drift is negative if • The numerator is the expected number of departures per state transition, and the denominator is the expected duration of a state transition period; thus the ratio can be interpreted as departure rate.

  22. Departure Rate (i.e., throughput) Departure rate: λ Arrival rate Equilibrium large backlog

  23. Throughput vs β • Using GNUPlot 4.4.2: skip

  24. CSMA unslotted Aloha • When a packet arrives, the transmission starts immediately if the channel is sensed to be idle. • If the channel is sensed to be busy, or if the transmission results in a collision, the packet is regarded as backlogged. • Each backlogged packet repeatedly attempts to retransmit at randomly selected times separated by independent, exponentially distributed random delays τ, with prob density xe-xτ

  25. CSMA unslotted Aloha (cont.) • We assume a propagation and detection delay of β, so that if one transmission starts at time t, another node will not detect that the channel is busy until t+β, thus causing the possibility of collisions. • Consider an idle period that starts with a backlog of n. The time until the first transmission starts is an exponentially distributed R.V. with rate G(n)=λ+nx • G(n) is the attempt rate in packets per unit time.

  26. CSMA unslotted Aloha (cont.) • A collision occurs if the next sensing is done within time β. Thus, the prob that this busy period is a collision is 1-e-βG(n) • The prob of a transmission following an idle period is e-βG(n) • The expected time from the beginning of one idle period until the next is 1/G(n) + (1+ β) • The first term is the expected time until the first transmission starts • The second term is the time until the first transmission ends and the channel is detected as being idle again.

  27. CSMA unslotted Aloha (cont.) • The departure rate when the backlog is n is given by: • For small β, the maximum value occurs when G(n)≒β-1/2, and the value is • The MAX value is slightly smaller than the MAX value of CSMA slotted Aloha. The reason is when CSMA is not being used, collisions are somewhat more likely fit a given attempt rate in an unslotted system than a slotted system.

  28. CSMA unslotted Aloha (cont.) • However, in a slotted system, β would have to be larger than in an unslotted system to compensate for synchronization inaccuracies and worst-case propagation delay. • Thus, unslotted Aloha appears to be the natural choice for CSMA. 4.4.4: skip

  29. CSMA/CD: CSMA + Collision detection

  30. CSMA/CD • In CSMA protocols • If two stations begin transmitting at the same time, each will transmit its complete packet, thus wasting the channel for an entire packet time • In CSMA/CD protocols • The transmission is terminated immediately upon the detection of a collision • CD = Collision Detect

  31. CSMA/CD

  32. CSMA/CD (cont’d) • Sense the channel • If idle, transmit immediately • If busy, wait until the channel becomes idle • Collision detection • Abort a transmission immediately if a collision is detected • Try again later after waiting a random amount of time

  33. CSMA/CD (cont’d) • Carrier sense • reduces the number of collisions • Collision detection • reduces the effect of collisions, making the channel ready to use sooner

  34. Slotted CSMA/CD • We visualize S-CSMA/CD in terms of slots and minislots. • The minislots are of duration β, which denotes the time required for a signal to propagate from one end of the cable to the other and to be detected. • If the nodes are all synchronized into minislots of this duration, and if one node transmits in a minislot, all the other nodes will detect the transmission and not use subsequent minislots until the entire packet is completed.

  35. Slotted CSMA/CD (cont.) • If more than one node transmits in a minislot, each transmitting node will detect the condition by the end of the minislot and cease transmitting. • Thus, the minislots are used in a contention mode, and when a successful transmission occurs in a minislot, it effectively reserves the channel for the completion of the packet.

  36. Slotted CSMA/CD (cont.) • We assume each backlogged node transmits after each idle slot with prob qr • The node transmitting rate after an idle slot is Poisson with parameter g(n)=λβ+ qrn • Consider state transitions at the ends of idle slots: if no transmissions occur, the next idle slot ends after time β; if one transmission occurs, the next idle slot ends after 1+ β

  37. Slotted CSMA/CD (cont.) • Variable-length packets are allowed here, but the packet durations should be multiples of the idle slot durations. • For simplicity, we assume the expected packet duration is 1. • Finally, if a collision occurs, the next idle slot ends after 2β, i.e. nodes must hear an idle slot after the collision to know that it is safe to transmit.

  38. Slotted CSMA/CD (cont.) • The expected length of the interval between state transitions is: E{interval}=β+g(n)e-g(n)+β[1-(1+g(n)) e-g(n)] • The second term is 1 times the success prob • The third term is the additional β times the collision prob • The prob of success is g(n)e-g(n) • The drift in state n is λE{interval} - Psucc

  39. Slotted CSMA/CD (cont.) • The departure rate in state n is • This quantity is maximized over g(n) at g(n)=0.77, and the resulting value is 1/(1+3.31β) • The constant (i.e. 3.31) is dependent on the detailed assumptions of the system. However, if β is very small, this constant is not very important. • Unslotted CSMA/CS makes more sense due to the difficulty of perfect synchronizing on short minislots.

  40. Node 2 heardNode 1 stops Node 1 starts Time Propagation delay Node 2 starts Node 1 heardNode 2 stops Unslotted CSMA/CD • Suppose a node at one end starts to transmit, and then, almost β time units later, a node at the other end starts. The 2nd node ceases its transmission almost immediately upon hearing the 1st node, but nonetheless causes errors in the first packet and forces the 1st node to stop transmission another β time units later.

  41. Unslotted CSMA/CD (cont.) • Nodes closer together on the cable detect collisions faster than those more spread apart. • As a result, the MAX throughput achievable with Ethernet depends on the arrangement of nodes on the cable and is very complex to calculate exactly. • Goal: to find bounds on all the relevant parameters from the end of one transmission to the end of the next in order to get a conservative bound on max throughput!

  42. Unslotted CSMA/CD (cont.) • Assume that each node initiates transmissions according to an independent Poisson process whenever it senses the channel idle, and the overall rate is G. • All nodes sense the beginning of an idle period at most β after the end of a transmission. • The expected time to the beginning of the next transmission is at most 1/G. • The next packet will collide with some later starting packet with prob at most 1-e-βg • The colliding packet will cease transmission after at most 2β • The packet will be successful with prob at least e-βg and will occupy 1 time unit.

  43. Unslotted CSMA/CD (cont.) • The departure rate S for a given G is the success prob divided by the expected time of a success or collision; so • The MAX occurs at • The corresponding MAX value is • This analysis is very conservative, but if β is very small, throughputs very close to 1 can be achieved.

  44. Unslotted CSMA/CD (cont.) • The MAX stable throughput approaches 1 with decreasing β; whereas the approach is as a constant times β1/2for CSMA. • The reason for the difference is that collisions are not very costly with CSMA/CD, and thus much higher attempt rates can be used. • CSMA/CD (and CSMA) becomes increasingly inefficient with increasing bus length (i.e. β), with increasing data rate (i.e. C), and with decreasing data packet size (i.e. L). ps:

  45. IEEE 802 LANs • LAN: Local Area Network • What is a local area network? • A LAN is a network that resides in a geographically restricted area • LANs usually span a building or a campus

  46. Characteristics of LANs • Short propagation delays • Small number of users • Single shared medium (usually) • Inexpensive

  47. Common LANs • Bus-based LANs • Ethernet (*) • Token Bus (*) • Ring-based LANs • Token Ring (*) • Switch-based LANs • Switched Ethernet • ATM LANs (*) IEEE 802 LANs

  48. OSI Layers and IEEE 802 IEEE 802 LAN standards OSI layers Higher Layers Higher Layers 802.2 Logical Link Control 802.3 802.4 802.5 Medium Access Control Data Link Layer CSMA/CD Token-passing Token-passing bus bus ring Physical Layer

  49. IEEE 802 Standards 802.1: Introduction 802.2: Logical Link Control (LLC) 802.3: CSMA/CD (Ethernet) 802.4: Token Bus 802.5: Token Ring 802.6: DQDB 802.11: CSMA/CA (Wireless LAN)

  50. Summary 4.5.1, 4.5.3, 4.5.4, 4.5.5, 4.5.6, 4.6: skip

More Related