19
Random Access 1. Aloha 2. Slotted Aloha 3. CSMA 4. CSMA/CD

Random Access - University of Waterloobbcr.uwaterloo.ca/~lcai/ece418/5-2.pdf · 2008. 7. 3. · ALOHA (pure ALOHA or unslotted ALOHA) • It was developed at the University of Hawaii

  • Upload
    others

  • View
    4

  • Download
    0

Embed Size (px)

Citation preview

  • Random Access

    1. Aloha

    2. Slotted Aloha

    3. CSMA

    4. CSMA/CD

  • Background

    • Modern Local Area Networks (LANs) operate as follows– Users are connected to communication

    medium, e.g. a wire, radio spectrum, etc.– When user A sends a message to user B, the

    message is broadcast to the medium and1. If no one else is broadcasting at the same

    time, every user on the LAN hears the message.

    2. If another user is broadcasting at the same time, then the message interfere (collide) with each other and no user on the LAN receives the individual message.

    A

    BC

    Communicationmedium

    No collisionCollision

  • Communication Protocol

    • Q: If there is a collision then there are (at least) two users that want to broadcast. How can we set up a protocol such that the users will rebroadcast and will not collide with each other again.

    • A: Users wait a “random” amount of time before trying to rebroadcast.

  • 4

    ALOHA (pure ALOHA or unslotted ALOHA)• It was developed at the University of Hawaii in the early 1970s to connect

    computers situated on different Hawaiian islands.

    • The computers of the ALOHA network transmit on the same radio channelwhenever they have a packet to transmit.

    • ALOHA is the father of multiple access protocols.

  • 5

    ALOHA protocol1. A user transmits whenever it has data to transmit

    2. If more than one frames are transmitted, they interfere witheach other (collide) and are lost

    3. If ACK not received within timeout, then a user picks randombackoff time (to avoid repeated collision)

    4. User retransmits frame after backoff time

    tt0t0-X t0+X t0+X+2tprop t0+X+2tprop + B

    Time-out

    Backoff period BFirst transmission Retransmission

  • ALOHA Model

    • Definitions and assumptions– X: frame transmission time (assume constant)– S: throughput (average # successful frame transmissions

    per X seconds)– G: load (average # transmission attempts per X sec.) – Psuccess : probability a frame transmission is successful

    successGPS =

    XXframe transmission

    Prior interval

    Any transmission that begins during vulnerable period leads to collisionSuccess if no arrivals during 2X seconds

  • Abramson’s Assumption• What is probability of no arrivals in vulnerable period?• Abramson assumption: aggregate traffic arrival that result from new

    arrivals and retransmissions has a Poisson distribution with an average number of arrivals of G arrivals/X (Effect of backoff algorithm is that frame arrivals are equally likely to occur at any time interval)

    2(2 )Pr{ transmissions in 2X seconds} , 0,1, 2,...(on average, 2G arrivals/2X seconds)!

    kGGk e k

    k−= =

    Xt −0 0t Xt +0

    The probability of a successful transmission is the probability that they are no additionalpacket transmission in the vulnerable period (2X).

    The throughput S = GPr{no collision}

    = GPr{0 transmissions in 2X seconds}0

    2(2 )0!

    GGG e−=

    2GGe−=

  • 8

    00.020.040.060.080.1

    0.120.140.160.180.2

    00.0

    0781

    250.0

    1562

    50.0

    3125

    0.062

    50.1

    25 0.25 0.5 1 2 4

    G

    S

    Throughput S versus load G for pure ALOHA

    0.5 / 0.184S e= =

    • Throughput S reaches a peak value of 0.5/e at load G = 0.5, and then declines back toward 0.

    • Intuitively, two or more arrivals in a vulnerable period (2X) result in a collision

    • For a given value of S there are two corresponding values for G. The system has two modes: for small G (i.e. S ≈ G, there is no collision) and for large G (i.e. G >>S, there are many backlogged users).

    • ALOHA system cannot achieve throughput higher than 18.4 percent (0.5/e)

    4. Observations

  • 9

    Slotted ALOHAProtocol

    1. Time is slotted in X seconds slots 2. Users synchronized to frame times3. Users transmit frames in first slot after frame arrival4. Backoff intervals in multiples of slots

    t(k+1)XkX t0 +X+2tprop+ B

    Vulnerable period Time-out

    Backoff period B

    t0 +X+2tprop

    Only frames that arrive during prior X seconds collide.

  • Example of Slotted Aloha

    2 3

    22 2

    1 2 2

    1

    1

    s ss sc s cs

    2

    sCommunication channel

    A

    B

    C

    s = success, c = collision

  • 11

    Throughput Analysis

    0( )[no collision] [no arrivals in X seconds] =0!

    G GGS GP GP G e G e− −= = ⋅ = ⋅

    0

    0.05

    0.1

    0.15

    0.2

    0.25

    0.3

    0.35

    0.4

    0.01

    563

    0.03

    125

    0.06

    25

    0.12

    5

    0.25 0.5 1 2 4 8

    Ge-G

    Ge-2G

    G

    S0.184

    0.368

    2. Observations

    1. The throughput S

    Throughput S reaches a peak value of 1/e = 0.368 at load G = 1

  • 12

    Example: ALOHA and Slotted ALOHA

    Suppose that a radio system uses a 9600 bps channels for sending call setuprequest messages to a base station. Suppose that packets are 120 bits long. Whatis the maximum throughput possible with ALOHA and with slotted ALOHA?

    • The system transmits packets at a rate

    = (9600 bits/second) x (1 packet/120bits)

    = 80 packets/second.

    • The maximum throughput for ALOHA

    = 80 x (0.184)

    ≈ 15 packets/second

    • The maximum throughput for slotted ALOHA

    = 80 x (0.368)

    ≈ 30 packets/second

  • 13

    A

    Station A begins transmission att = 0

    A

    Station A captureschannel at t = tprop

    A station senses the channel (by checking for a voltage) before it starts transmission– If busy, either wait or schedule backoff (different options)– If idle (no voltage sensed), start transmission– When collisions occur they involve entire frame transmission times– Vulnerable period is reduced to tprop

    Carrier Sense Multiple Access (CSMA)Protocol

    – If tprop > X (or if a = tprop/X > 1), no gain compared to ALOHA or slotted ALOHA

  • 14

    CSMA options differ when a station has a frame to transmit but the channel is busy– 1-persistent CSMA (most greedy)

    • Start transmission as soon as the channel becomes idle• Low delay and low efficiency

    – Non-persistent CSMA (least greedy)• Wait a backoff period, then sense carrier again• High delay and high efficiency

    – p-persistent CSMA (adjustable greedy)• Wait till channel becomes idle, transmit with prob. p; or wait one tprop time

    & re-sense with probability 1-p• Delay and efficiency can be balanced

    CSMA Options

    Sensing

  • 15

    0

    0.1

    0.2

    0.3

    0.4

    0.5

    0.60.

    02

    0.03

    0.06

    0.13

    0.25 0.5 1 2 4 8 16 32 64

    Smax = 0.53

    S

    G

    a = 0.01

    • Throughput S versus load G for 1-Persistent CSMA (three different a = tprop/X )

    Throughput Analysis

    Smax = 0.45

    Smax = 0.16a = 0.1

    a = 1

  • 0

    0.1

    0.2

    0.3

    0.4

    0.5

    0.6

    0.7

    0.8

    0.9

    0.01

    0.04

    0.12

    5

    0.35

    … 1

    2.82

    … 8

    22.6

    64

    16

    Smax = 0.81

    S

    G

    a = 0.01

    • Throughput S versus load G for Non-Persistent CSMA (three different a = tprop/X )

    Smax = 0.51

    Smax = 0.14a = 0.1

    a = 1

    • Observations– 1-persistent is sharper than non-persistent.

    – a=tprop/X has import impact on the throughput.

    – When a approaches 1, both 1-persistent and non-persistent is worse than ALOHAs

  • 17

    Carrier Sense Multiple Access with Collision Detection (CSMA/CD)Protocol

    • In CSMA/CD protocol, nodes with packets to transmit must sense the channel and proceed as follow:

    1. If the channel is idle, transmit and listen while transmitting

    2. If the channel is busy (similar to CSMA) persist, backoff immediately, or persist and attempt transmission with probability p.

    3. In case of a collision, a node transmits a short jamming signal so that other nodes know there is a collision and abort the transmission. Then, the backoff algorithm is used to schedule a future re-sensing time.

    • In CSMA, collisions result in wastage of X seconds spent in transmitting an entire frame

    • CSMA/CD reduces the wastage of time by aborting the transmission after detecting the collision

    • CSMA/CD scheme provides the basis for the Ethernet LAN protocol

  • 18

    CSMA/CD reaction time

    It takes 2 tprop to find out if channel has been captured

    A begins to transmit at

    t = 0A B

    B begins to transmit at t = tprop- δ

    B detectscollision at t = tprop

    A B

    A BA detectscollision at t= 2 tprop- δ

  • 19

    Maximum Achievable Throughputs of Random Access MAC Techniques

    0

    0.2

    0.4

    0.6

    0.8

    1

    0.01 0.1 1

    ALOHA

    Slotted ALOHA

    1-P CSMA

    Non-P CSMA

    CSMA/CD

    ρmax

    • For small a: CSMA-CD has best throughput• For larger a: Aloha & slotted Aloha better throughput

    a = tprop/X

    Random Access ��1. Aloha ��2. Slotted Aloha��3. CSMA��4. CSMA/CD�BackgroundCommunication ProtocolSlide Number 4Slide Number 5ALOHA ModelAbramson’s AssumptionSlide Number 8Slide Number 9Example of Slotted AlohaThroughput AnalysisSlide Number 12Slide Number 13CSMA OptionsSlide Number 15Slide Number 16Slide Number 17CSMA/CD reaction timeMaximum Achievable Throughputs of Random Access MAC Techniques