Presentation is loading. Please wait.

Presentation is loading. Please wait.

TANENBAUMComputer Networks 11 Chapter 4 – 1 The Medium Access Sublayer Multiple Access Protocols.

Similar presentations


Presentation on theme: "TANENBAUMComputer Networks 11 Chapter 4 – 1 The Medium Access Sublayer Multiple Access Protocols."— Presentation transcript:

1 TANENBAUMComputer Networks 11 Chapter 4 – 1 The Medium Access Sublayer Multiple Access Protocols

2 TANENBAUMComputer Networks 12 Broadcast Channels zAlso called yMultiaccess Channels yRandom Access Channels zDetermining who will use the channel next is a problem zMedium Access Control (MAC) sublayer solves this problem zMAC is a sublayer (bottom part) of data link layer

3 TANENBAUMComputer Networks 13 Static Channel Allocation zUsually done by FDM or TDM zNot an efficient method for data traffic. E.g. yLet xThe capacity of a channel be C bps xThe mean time delay of the channel be T (seconds) xFrame arrival rate is a random variable from Poisson distribution with mean frames/second xFrame length is a random variable from exponential probability density function with mean 1/  bits/frame yThen xT = 1 / (  C - ) (result from queuing theory) yNow, let the channel be divided into N subchannels with capacity C/N and mean input rate /N xT FDM = 1 / (  (C/N) – ( /N) = N / (  C - ) = NT xThe mean delay is N times worse

4 TANENBAUMComputer Networks 14 Dynamic Channel Allocation Assumptions 1 zStation Model yGenerates frames at a rate of  frames/unit time (Frame generation is Poisson Distribution) yOnce a frame is generated, the station is blocked until the frame is successfully transmitted zSingle Channel Assumption yAll stations transmit and receive with equal priority over a unique channel

5 TANENBAUMComputer Networks 15 Dynamic Channel Allocation Assumptions 2 zCollision Assumption yOverlapping transmission by two or more stations at the same time garbles the frames (collision) yAll stations detect collisions yThere are no errors other than those generated by collisions zContinuous Time yFrame transmission can begin at any instant zSlotted Time yTime is divided into slots yFrame transmission always begins with a slot

6 TANENBAUMComputer Networks 16 Dynamic Channel Allocation Assumptions 3 zCarrier Sense yStations can tell if the channel is in use yLANs generally have carrier sense zNo Carrier Sense yStations can not sense the channel before trying to use it ySatellite networks do not have carrier sense

7 TANENBAUMComputer Networks 17 Pure ALOHA zUsers transmit any time zIf there is collision ysender knows about it after a certain time, ywaits random amount of time, ysends the frame again zContention systems ySystems in which multiple users share a common channel in a way that can lead to conflicts zTo maximize throughput, frames have uniform size

8 TANENBAUMComputer Networks 18 Frames in Pure ALOHA

9 TANENBAUMComputer Networks 19 ALOHA Assumptions zFrame time=time to transmit one frame zNumber of frames generated in a frame time is a Poisson Distribution with mean N. xIf N>1, every frame will suffer a collision x0<N<1 is reasonable zProbability of k transmission attempts in a frame time is Poisson with parameter G. Pr[k]=G k e -G /k! For small N, G  N For large N, G>N

10 TANENBAUMComputer Networks 110 ALOHA cont’d zP 0 = probability that a frame does not suffer a collision zS = Probability of a transmission succeeding zS = G P 0

11 TANENBAUMComputer Networks 111 ALOHA Frame Collision Period

12 TANENBAUMComputer Networks 112 Efficiency of ALOHA zReferring to Fig 4-2, the vulnerable period is two frame times zThe probability that no frame is transmitted during this period is e -2G yPr[0]=e -G in one frame period so P 0 =e -2G in two frame periods zTherefore S = G e -2G zThe maximum of S occurs at G=0.5, S=1/2e

13 TANENBAUMComputer Networks 113 ALOHA Throughput

14 TANENBAUMComputer Networks 114 Slotted ALOHA 1 zCan only transmit at the beginning of a slot zVulnerable period is halved zHence S = G e -G zS peaks at G = 1 zProbability that a frame avoids a collision is e -G zThe probability of a collision is 1-e -G zProbability of a transmission requiring exactly k attempts is P k =e -G (1-e -G ) k-1

15 TANENBAUMComputer Networks 115 Slotted ALOHA 2 zExpected number of transmissions, E, per each created frame is    E =  k P k =  ke -G (1-e -G ) k-1 =  d/dG(1-e -G ) k = k=1 k=1 k=1  d/dG  (1-e -G ) k = d/dG e G = e G k=1 zConclusion: Performance exponentially degrades by the load

16 TANENBAUMComputer Networks 116 Carrier Sense Multiple Access (CSMA) Protocols zALOHA does not listen to the channel before it transmits, ending up with poor performance zCarrier Sense Protocols yStations listen the channel if there is any transmission going on before they transmit

17 Computer Networks 117 Persistent and Nonpersistent CSMA z1-persistent CSMA yStations transmit with probability 1 whenever they find the channel idle zNonpersistent CSMA yIf the channel is idle before the first attempt, transmit yIf the channel is already in use, wait for a random amount of time, and then listen to the channel for transmission zP-persistent CSMA yApplies to slotted channels yIf the channel is idle, xtransmit with probability p xDefer transmission until the next slot with probability q = 1 – p xIf, in the mean time, someone else transmits, wait a random time yIf channel busy xWait for the next slot

18 TANENBAUMComputer Networks 118 Channel Utilization for Random Access Protocols

19 TANENBAUMComputer Networks 119 CSMA with Collision Detection (CSMA/CD) zcollision Detection yAbort transmission as soon as detect collision yIf  is the time the signal propagates between two farthest stations, the station has to wait 2  to make sure that no collision has occurred zCSMA/CD model has contention, transmission and idle periods zContention period is modeled as a slotted ALOHA with slot size 2 

20 TANENBAUMComputer Networks 120 CSMA/CD States

21 TANENBAUMComputer Networks 121 Collision-Free Protocols zAssumptions yThere are N stations yEach station has a unique address (0 to N-1) hardwired to it zQuestion yWhich station gets the channel after a successful transmission?

22 TANENBAUMComputer Networks 122 A Bit-Map Protocol (Reservation Protocol) zTwo rounds of transmission cycle yFirst Round (Contention Period) xConsists of N slots each reserved for a particular station xIn this period, each station transmits 1 if it has a frame to transmit 0 if it has no frame to transmit xAt the completion of the first round everybody knows who wants to transmit ySecond Round (Transmission Period) xStations transmit according to the order formed in the first round xThere will not be any collisions

23 TANENBAUMComputer Networks 123 The basic bit-map protocol

24 TANENBAUMComputer Networks 124 Reservation Protocol Performance :Binary Countdown zEach station has a binary station address zA station wanting to transmit broadcasts its address starting with the high-order bit zThe bits from each station are boolean Or’ed zArbitration Rule yAs soon as a station sees that a high-order bit position that is 0 in its address is overwritten by 1, it gives up zChannel Efficiency is d/(d+log 2 N) yIf station address is the first field in the frame then efficiency is 100%.

25 TANENBAUMComputer Networks 125 Binary Countdown Example

26 TANENBAUMComputer Networks 126 Wavelength Division Multiple Access (WDMA) Protocols zAll optical LANs divide the spectrum into wavelength bands zEach station is assigned two channels yNarrow channel: Control channel to signal the station yWide channel: Station outputs data frames zNarrow channel is divided into m time slots zWide channel is divided into n+1 slots yn for data output y1 for status (to indicate which slots on both channels are free)

27 TANENBAUMComputer Networks 127 WDMA 2

28 TANENBAUMComputer Networks 128 WDMA 3 zBoth connection-oriented and connectionless traffic is supported zEach station has: yA fixed-wavelength receiver for listening to its own control channel yA tunable transmitter for sending on other station’s control channel yA fixed-wavelength transmitter for outputting data frames yA tunable receiver for selecting a data transmitter to listen to

29 TANENBAUMComputer Networks 129 WDMA Connection Setup Procedure zA tunes its data receiver to B’s data channel and waits for the status slot to learn about a free B control slot (on 4 of A) zA chooses a free control slot and sends a CONNECTION REQUEST (on 2 of A) zB assigns a data slot to A by announcing it in the status slot (on 3 of B, B also tunes 4 to A’s 3) zA reads this announcement and a unidirectional connection from A to B is established (A transmits on 4 in the slot assigned by B) zIf the request was for two way communications, B would repeat the same procedure


Download ppt "TANENBAUMComputer Networks 11 Chapter 4 – 1 The Medium Access Sublayer Multiple Access Protocols."

Similar presentations


Ads by Google