aloha, csma

54
12.1 Chapter 12 Multiple Access Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

Transcript of aloha, csma

Page 1: aloha, csma

8/7/2019 aloha, csma

http://slidepdf.com/reader/full/aloha-csma 1/54

12.1

Chapter 12Multiple Access

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

Page 2: aloha, csma

8/7/2019 aloha, csma

http://slidepdf.com/reader/full/aloha-csma 2/54

12.2

Figure 12.1 Data link layer divided into two functionality-oriented sublayers

Page 3: aloha, csma

8/7/2019 aloha, csma

http://slidepdf.com/reader/full/aloha-csma 3/54

12.3

Figure 12.2 T axonomy of multiple-access protocols discussed in this chapter

Page 4: aloha, csma

8/7/2019 aloha, csma

http://slidepdf.com/reader/full/aloha-csma 4/54

12.4

1212--1 RANDOM ACCESS1 RANDOM ACCESS

I nI n randomrandom accessaccess or or contentioncontention methods,methods, nono stationstation isissuperior superior toto another another stationstation and and nonenone isis assigned assigned thethecontrol control over over another another. . NoNo stationstation permits,permits, or or doesdoes not not permit,permit, another another stationstation toto send send.. At At eacheach instance,instance, a a

stationstation that that hashas datadata toto send send usesuses aa procedureprocedure defined defined byby thethe protocol protocol toto makemake aa decisiondecision onon whether whether or or not not totosend send..

ALOHACarrier Sense Multiple AccessCarrier Sense Multiple Access with Collision DetectionCarrier Sense Multiple Access with Collision Avoidance

T opics discussed in this section:T opics discussed in this section:

Page 5: aloha, csma

8/7/2019 aloha, csma

http://slidepdf.com/reader/full/aloha-csma 5/54

12.5

Figure 12.3 F rames in a pure ALOHA network

Page 6: aloha, csma

8/7/2019 aloha, csma

http://slidepdf.com/reader/full/aloha-csma 6/54

12.6

Figure 12.4 P rocedure for pure ALOHA protocol

Page 7: aloha, csma

8/7/2019 aloha, csma

http://slidepdf.com/reader/full/aloha-csma 7/54

12.7

T he stations on a wireless ALOHA network are amaximum of 600 km apart. I f we assume that signalspropagate at 3 × 10 8 m/s, we find

T p = (600 × 10 5 ) / (3 × 10 8 ) = 2 ms.

Now we can find the value of T B for different values of K .

a . F or K = 1, the range is {0, 1}. T he station needs to|generate a random number with a value of 0 or 1. T hismeans that T B is either 0 ms (0 × 2) or 2 ms (1 × 2),based on the outcome of the random variable.

Example 12.1

Page 8: aloha, csma

8/7/2019 aloha, csma

http://slidepdf.com/reader/full/aloha-csma 8/54

12.8

b. F or K = 2, the range is {0, 1, 2, 3}. T his means that T B

can be 0, 2, 4, or 6 ms, based on the outcome of therandom variable.

c. F or K = 3, the range is {0, 1, 2, 3, 4, 5, 6, 7}. T hismeans that T B can be 0, 2, 4, . . . , 14 ms, based on theoutcome of the random variable.

d. We need to mention that if K > 10, it is normally set to10.

Example 12.1 (continued)

Page 9: aloha, csma

8/7/2019 aloha, csma

http://slidepdf.com/reader/full/aloha-csma 9/54

12.9

Figure 12.5 V ulnerable time for pure ALOHA protocol

Page 10: aloha, csma

8/7/2019 aloha, csma

http://slidepdf.com/reader/full/aloha-csma 10/54

12.10

A pure ALOHA network transmits 200-bit frames on ashared channel of 200 kbps. What is the requirement tomake this frame collision-free?

Example 12.2

SolutionAverage frame transmission time T fr is 200 bits/200 kbps or 1 ms. T he vulnerable time is 2 × 1 ms = 2 ms. T his meansno station should send later than 1 ms before this station

starts transmission and no station should start sending during the one 1-ms period that this station is sending.

Page 11: aloha, csma

8/7/2019 aloha, csma

http://slidepdf.com/reader/full/aloha-csma 11/54

12.11

The throughput for pure ALOHA isS = G × e í2G .

The maximum throughputS max = 0.184 when G= (1/2).

Note

Page 12: aloha, csma

8/7/2019 aloha, csma

http://slidepdf.com/reader/full/aloha-csma 12/54

12.12

A pure ALOHA network transmits 200-bit frames on ashared channel of 200 kbps. What is the throughput if thesystem (all stations together) producesa. 1000 frames per second b. 500 frames per second c. 250 frames per second.

Example 12.3

SolutionT he frame transmission time is 200/200 kbps or 1 ms.a. I f the system creates 1000 frames per second, this is 1

frame per millisecond. T he load is 1. I n this caseS = G× e í2 G or S = 0.135 (13.5 percent). T his meansthat the throughput is 1000 × 0.135 = 135 frames. Only135 frames out of 1000 will probably survive.

Page 13: aloha, csma

8/7/2019 aloha, csma

http://slidepdf.com/reader/full/aloha-csma 13/54

12.13

Example 12.3 (continued)

b. I f the system creates 500 frames per second, this is(1/2) frame per millisecond. T he load is (1/2). I n thiscase S = G × e í2G or S = 0.184 (18.4 percent). T hismeans that the throughput is 500 × 0.184 = 92 and that only 92 frames out of 500 will probably survive. Notethat this is the maximum throughput case,percentagewise.

c. I f the system creates 250 frames per second, this is (1/4)frame per millisecond. T he load is (1/4). I n this caseS = G × e í 2G or S = 0.152 (15.2 percent). T his meansthat the throughput is 250 × 0.152 = 38. Only 38frames out of 250 will probably survive.

Page 14: aloha, csma

8/7/2019 aloha, csma

http://slidepdf.com/reader/full/aloha-csma 14/54

12.14

Figure 12.6 F rames in a slotted ALOHA network

Page 15: aloha, csma

8/7/2019 aloha, csma

http://slidepdf.com/reader/full/aloha-csma 15/54

12.15

The throughput for slotted ALOHA isS = G × e íG .

The maximum throughputS max = 0.368 when G = 1.

Note

Page 16: aloha, csma

8/7/2019 aloha, csma

http://slidepdf.com/reader/full/aloha-csma 16/54

12.16

Figure 12.7 V ulnerable time for slotted ALOHA protocol

Page 17: aloha, csma

8/7/2019 aloha, csma

http://slidepdf.com/reader/full/aloha-csma 17/54

12.17

A slotted ALOHA network transmits 200-bit frames on ashared channel of 200 kbps. What is the throughput if thesystem (all stations together) producesa. 1000 frames per second b. 500 frames per second c. 250 frames per second.

Example 12.4

SolutionT he frame transmission time is 200/200 kbps or 1 ms.a. I f the system creates 1000 frames per second, this is 1

frame per millisecond. T he load is 1. I n this caseS = G× e íG or S = 0.368 (36.8 percent). T his meansthat the throughput is 1000 × 0.0368 = 368 frames.Only 386 frames out of 1000 will probably survive.

Page 18: aloha, csma

8/7/2019 aloha, csma

http://slidepdf.com/reader/full/aloha-csma 18/54

12.18

Example 12.4 (continued)

b. I f the system creates 500 frames per second, this is(1/2) frame per millisecond. T he load is (1/2). I n thiscase S = G × e íG or S = 0.303 (30.3 percent). T hismeans that the throughput is 500 × 0.0303 = 151.Only 151 frames out of 500 will probably survive.

c. I f the system creates 250 frames per second, this is (1/4)frame per millisecond. T he load is (1/4). I n this caseS = G × e íG or S = 0.195 (19.5 percent). T his meansthat the throughput is 250 × 0.195 = 49. Only 49frames out of 250 will probably survive.

Page 19: aloha, csma

8/7/2019 aloha, csma

http://slidepdf.com/reader/full/aloha-csma 19/54

12.19

Figure 12.8 Space/time model of the collision in CSMA

Page 20: aloha, csma

8/7/2019 aloha, csma

http://slidepdf.com/reader/full/aloha-csma 20/54

12.20

Figure 12.9 V ulnerable time in CSMA

Page 21: aloha, csma

8/7/2019 aloha, csma

http://slidepdf.com/reader/full/aloha-csma 21/54

12.21

Figure 12.10 B ehavior of three persistence methods

Page 22: aloha, csma

8/7/2019 aloha, csma

http://slidepdf.com/reader/full/aloha-csma 22/54

12.22

Figure 12.11 F low diagram for three persistence methods

Page 23: aloha, csma

8/7/2019 aloha, csma

http://slidepdf.com/reader/full/aloha-csma 23/54

12.23

Figure 12.12 Collision of the first bit in CSMA/CD

Page 24: aloha, csma

8/7/2019 aloha, csma

http://slidepdf.com/reader/full/aloha-csma 24/54

12.24

Figure 12.13 Collision and abortion in CSMA/CD

Page 25: aloha, csma

8/7/2019 aloha, csma

http://slidepdf.com/reader/full/aloha-csma 25/54

12.25

A network using CSMA/CD has a bandwidth of 10 Mbps.I f the maximum propagation time (including the delays inthe devices and ignoring the time needed to send ajamming signal, as we see later) is 25.6 s, what is the

minimum size of the frame?

Example 12.5

SolutionT he frame transmission time is T fr = 2 × T p = 51.2 s.T his means, in the worst case, a station needs to transmit

for a period of 51.2 s to detect the collision. T heminimum size of the frame is 10 Mbps × 51.2 s = 512bits or 64 bytes. T his is actually the minimum size of theframe for Standard Ethernet.

Page 26: aloha, csma

8/7/2019 aloha, csma

http://slidepdf.com/reader/full/aloha-csma 26/54

12.26

Figure 12.14 F low diagram for the CSMA/CD

Page 27: aloha, csma

8/7/2019 aloha, csma

http://slidepdf.com/reader/full/aloha-csma 27/54

12.27

Figure 12.15 Energy level during transmission, idleness, or collision

Page 28: aloha, csma

8/7/2019 aloha, csma

http://slidepdf.com/reader/full/aloha-csma 28/54

12.28

Figure 12.16 T iming in CSMA/CA

Page 29: aloha, csma

8/7/2019 aloha, csma

http://slidepdf.com/reader/full/aloha-csma 29/54

12.29

In CSMA/CA, the IFS can also be used todefine the priority of a station or a frame.

Note

Page 30: aloha, csma

8/7/2019 aloha, csma

http://slidepdf.com/reader/full/aloha-csma 30/54

12.30

In CSMA/CA, if the station finds thechannel busy, it does not restart thetimer of the contention window;

it stops the timer and restarts it whenthe channel becomes idle.

Note

Page 31: aloha, csma

8/7/2019 aloha, csma

http://slidepdf.com/reader/full/aloha-csma 31/54

12.31

Figure 12.17 F low diagram for CSMA/CA

Page 32: aloha, csma

8/7/2019 aloha, csma

http://slidepdf.com/reader/full/aloha-csma 32/54

12.32

1212--2 CONTROLLED ACCESS2 CONTROLLED ACCESS

I nI n controlled controlled accessaccess ,, thethe stationsstations consult consult oneone another another toto find find whichwhich stationstation hashas thethe right right toto send send.. AA stationstationcannot cannot send send unlessunless it it hashas beenbeen authorized authorized byby other other

stationsstations. . WeWe discussdiscuss threethree popular popular controlled controlled- -accessaccessmethodsmethods. .

ReservationPollingToken Passing

T opics discussed in this section:T opics discussed in this section:

Page 33: aloha, csma

8/7/2019 aloha, csma

http://slidepdf.com/reader/full/aloha-csma 33/54

12.33

Figure 12.18 R eservation access method

Page 34: aloha, csma

8/7/2019 aloha, csma

http://slidepdf.com/reader/full/aloha-csma 34/54

12.34

Figure 12.19 Select and poll functions in polling access method

Page 35: aloha, csma

8/7/2019 aloha, csma

http://slidepdf.com/reader/full/aloha-csma 35/54

12.35

Figure 12.20 Logical ring and physical topology in token-passing access method

Page 36: aloha, csma

8/7/2019 aloha, csma

http://slidepdf.com/reader/full/aloha-csma 36/54

12.36

1212--3 CHANNELIZATION3 CHANNELIZATION

ChannelizationChannelization isis aa multiplemultiple--accessaccess method method inin whichwhichthethe availableavailable bandwidthbandwidth of of aa link link isis shared shared inin time,time,frequency,frequency, or or throughthrough code,code, betweenbetween different different stationsstations. .

I nI n thisthis section,section, wewe discussdiscuss threethree channelizationchannelizationprotocolsprotocols. .

Frequency-Division Multiple Access (FDMA)Time-Division Multiple Access (TDMA)Code-Division Multiple Access (CDMA)

T opics discussed in this section:T opics discussed in this section:

Page 37: aloha, csma

8/7/2019 aloha, csma

http://slidepdf.com/reader/full/aloha-csma 37/54

12.37

We see the application of all thesemethods in Chapter 16 whenwe discuss cellular phone systems.

Note

Page 38: aloha, csma

8/7/2019 aloha, csma

http://slidepdf.com/reader/full/aloha-csma 38/54

12.38

Figure 12.21 F requency-division multiple access ( F DMA)

Page 39: aloha, csma

8/7/2019 aloha, csma

http://slidepdf.com/reader/full/aloha-csma 39/54

12.39

In FDMA, the available bandwidthof the common channel is divided intobands that are separated by guard

bands.

Note

Page 40: aloha, csma

8/7/2019 aloha, csma

http://slidepdf.com/reader/full/aloha-csma 40/54

12.40

Figure 12.22 T ime-division multiple access ( T DMA)

Page 41: aloha, csma

8/7/2019 aloha, csma

http://slidepdf.com/reader/full/aloha-csma 41/54

12.41

In TDMA, the bandwidth is just onechannel that is timeshared betweendifferent stations.

Note

Page 42: aloha, csma

8/7/2019 aloha, csma

http://slidepdf.com/reader/full/aloha-csma 42/54

12.42

In CDMA, one channel carries alltransmissions simultaneously.

Note

Page 43: aloha, csma

8/7/2019 aloha, csma

http://slidepdf.com/reader/full/aloha-csma 43/54

12.43

Figure 12.23 Simple idea of communication with code

Page 44: aloha, csma

8/7/2019 aloha, csma

http://slidepdf.com/reader/full/aloha-csma 44/54

12.44

Figure 12.24 Chip sequences

Page 45: aloha, csma

8/7/2019 aloha, csma

http://slidepdf.com/reader/full/aloha-csma 45/54

12.45

Figure 12.25 Data representation in CDMA

Page 46: aloha, csma

8/7/2019 aloha, csma

http://slidepdf.com/reader/full/aloha-csma 46/54

12.46

Figure 12.26 Sharing channel in CDMA

Page 47: aloha, csma

8/7/2019 aloha, csma

http://slidepdf.com/reader/full/aloha-csma 47/54

12.47

Figure 12.27 Digital signal created by four stations in CDMA

Page 48: aloha, csma

8/7/2019 aloha, csma

http://slidepdf.com/reader/full/aloha-csma 48/54

12.48

Figure 12.28 Decoding of the composite signal for one in CDMA

Page 49: aloha, csma

8/7/2019 aloha, csma

http://slidepdf.com/reader/full/aloha-csma 49/54

12.49

Figure 12.29 General rule and examples of creating Walsh tables

Page 50: aloha, csma

8/7/2019 aloha, csma

http://slidepdf.com/reader/full/aloha-csma 50/54

Page 51: aloha, csma

8/7/2019 aloha, csma

http://slidepdf.com/reader/full/aloha-csma 51/54

12.51

F ind the chips for a network witha. T wo stations b. F our stations

Example 12.6

Solution

We can use the rows of W 2 and W 4 in F igure 12.29:a. F or a two-station network, we have

[+ 1 +1] and [+ 1 í1].

b. F or a four-station network we have[+ 1 +1 +1 +1], [+ 1 í1 +1 í1],

[+ 1 +1 í1 í1], and [+ 1 í1 í1 +1].

Page 52: aloha, csma

8/7/2019 aloha, csma

http://slidepdf.com/reader/full/aloha-csma 52/54

12.52

What is the number of sequences if we have 90 stations inour network?

Example 12.7

Solution

T he number of sequences needs to be 2 m. We need tochoose m = 7 and N = 2 7 or 128. We can then use 90of the sequences as the chips.

Page 53: aloha, csma

8/7/2019 aloha, csma

http://slidepdf.com/reader/full/aloha-csma 53/54

12.53

P rove that a receiving station can get the data sent by aspecific sender if it multiplies the entire data on thechannel by the sender¶s chip code and then divides it bythe number of stations.

Example 12.8

SolutionLet us prove this for the first station, using our previousfour-station example. We can say that the data on the

channel D = ( d 1 c1 + d 2 c2 + d 3 c3 + d 4 c4).T he receiver which wants to get the data sent by station 1multiplies these data by c 1.

Page 54: aloha, csma

8/7/2019 aloha, csma

http://slidepdf.com/reader/full/aloha-csma 54/54

12 54

Example 12.8 (continued)

When we divide the result by N, we get d 1 .