Presentation is loading. Please wait.

Presentation is loading. Please wait.

EEC-484/584 Computer Networks Lecture 9 Wenbing Zhao (Part of the slides are based on materials supplied by Dr. Louise Moser at UCSB and.

Similar presentations


Presentation on theme: "EEC-484/584 Computer Networks Lecture 9 Wenbing Zhao (Part of the slides are based on materials supplied by Dr. Louise Moser at UCSB and."— Presentation transcript:

1 EEC-484/584 Computer Networks Lecture 9 Wenbing Zhao wenbing@ieee.org (Part of the slides are based on materials supplied by Dr. Louise Moser at UCSB and Prentice-Hall)

2 2 Spring Semester 2006EEC-484/584: Computer NetworksWenbing Zhao Outline Channel allocation problem Multiple Access Protocols

3 3 Spring Semester 2006EEC-484/584: Computer NetworksWenbing Zhao Medium Access Control Sublayer Broadcast channels often used on DLL –multiaccess or random access The channel allocation problem: Who gets to use the channel? –Static Channel Allocation –Dynamic Channel Allocation

4 4 Spring Semester 2006EEC-484/584: Computer NetworksWenbing Zhao Static Channel Allocation FDM – Frequency Division Multiplexing –Frequency spectrum divided into logical channel –Each user has exclusive use of own frequency band TDM – Time Division Multiplexing –Time divided into slots each user has time slot –Users take turns in round robin fashion Problem: wasted bandwidth if user does not use his/her frequency band or timeslot

5 5 Spring Semester 2006EEC-484/584: Computer NetworksWenbing Zhao Frequency Division Multiplexing

6 6 Spring Semester 2006EEC-484/584: Computer NetworksWenbing Zhao Time Division Multiplexing T1 Carrier (1.544 Mbps)

7 7 Spring Semester 2006EEC-484/584: Computer NetworksWenbing Zhao Model for Dynamic Channel Allocation N independent stations (also called terminals) Probability of a frame being generated in an interval  t is  t (arrival rate constant) Once a frame has been generated, the station is blocked until the frame is transmitted successfully

8 8 Spring Semester 2006EEC-484/584: Computer NetworksWenbing Zhao Model for Dynamic Channel Allocation Single Channel shared by all stations Collision – event when two frames transmitted simultaneously and the resulting signal is garbled –All stations can detect collisions

9 9 Spring Semester 2006EEC-484/584: Computer NetworksWenbing Zhao Model for Dynamic Channel Allocation Frame transmission time –Continuous Time – can begin at any instant –Slotted Time – always begin at the start of a slot Carrier sense or not –Carrier sense – stations can tell if the channel is busy. Do not send if channel is busy –No carrier sense – just go ahead and send

10 10 Spring Semester 2006EEC-484/584: Computer NetworksWenbing Zhao Multiple Access Protocols ALOHA Carrier Sense Multiple Access Protocols Collision-Free Protocols Wireless LAN Protocols

11 11 Spring Semester 2006EEC-484/584: Computer NetworksWenbing Zhao Pure ALOHA Let users transmit whenever they have data to send If frame destroyed (due to collision), sender waits random amount of time, sends again User does not listen before transmitting

12 12 Spring Semester 2006EEC-484/584: Computer NetworksWenbing Zhao Pure ALOHA Let frame time = amount of time to transmit frame = frame length / bit rate Assume infinite population of users, generate new frames according to a Poisson distribution with mean N frames per frame time If N > 1, more frames generated than channel can handle –Nearly every frame involved in collision For reasonable throughput, want 0 < N < 1

13 13 Spring Semester 2006EEC-484/584: Computer NetworksWenbing Zhao Pure ALOHA: Vulnerable Period Vulnerable period for a frame: A collision will happen if another frame is sent during this period 2 frame time

14 14 Spring Semester 2006EEC-484/584: Computer NetworksWenbing Zhao Pure ALOHA Throughput S = GP 0 –G – offered load –P 0 – probability that a frame does not suffer a collision A frame will not undergo collision if no other frame sent during the vulnerable time –Vulnerable time: 2 frame time –In an interval two frame times long, the mean number of frames generated is 2G => P 0 = e -2G –S = GP 0 = G e -2G, max occurs when G=0.5, S = 0.184

15 15 Spring Semester 2006EEC-484/584: Computer NetworksWenbing Zhao Pure ALOHA Throughput for ALOHA systems

16 16 Spring Semester 2006EEC-484/584: Computer NetworksWenbing Zhao Slotted ALOHA Idea: divide time into intervals, each interval corresponds to one frame –Station is permitted to send only at the beginning of next slot Vulnerable period is halved (1 frame time) –Probability of no collision in time slot = e -G –Throughput S = G e -G –Max occurs when G = 1, S = 2*0.184

17 17 Spring Semester 2006EEC-484/584: Computer NetworksWenbing Zhao Slotted ALOHA Operating at higher values of G reduces number of empty slots, increases number of collisions exponentially Probability of no collision = e -G, probability of collision = 1 – e -G Probability of transmission requiring exactly k attempts, i.e., k-1 collisions followed by 1 success: P k = e -G (1- e -G ) k-1

18 18 Spring Semester 2006EEC-484/584: Computer NetworksWenbing Zhao Slotted ALOHA Expected number of transmissions (original + retrans) Small increases in channel load G can drastically reduce performance

19 19 Spring Semester 2006EEC-484/584: Computer NetworksWenbing Zhao Carrier Sense Multiple Access When station has data to send, listens to channel to see if anyone else is transmitting If channel is idle, station transmits a frame Else station waits for it to become idle If collisions occurs, station waits random amount of time, tries again Also called 1-persistent CSMA –With probability 1 station will transmit if channel is idle

20 20 Spring Semester 2006EEC-484/584: Computer NetworksWenbing Zhao After a station starts sending, it takes a while before 2nd station receives 1st station ’ s signal –2nd station might start sending before it knows that another station has already been transmitting If two stations become ready while third station transmitting –Both wait until transmission ends and start transmitting, collision results Carrier Sense Multiple Access: Collision Still Possible

21 21 Spring Semester 2006EEC-484/584: Computer NetworksWenbing Zhao p-persistent CSMA: Reduce the Probability of Collision Sense continuously, but does not always send when channel is idle –Applicable for slotted channels When ready to send, station senses the channel –If channel idle, station transmits with probability p, defers to next slot with probability q = 1-p –Else (if channel is busy) station waits until next slot tries again –If next slot idle, station transmits with probability p, defers with probability q = 1-p –…–…

22 22 Spring Semester 2006EEC-484/584: Computer NetworksWenbing Zhao Non-Persistent CSMA Does not sense continuously, send if it senses the channel is idle Before sending, station senses the channel –If channel is idle, station begins sending –Else station does not continuously sense, waits random amount of time, tries again

23 23 Spring Semester 2006EEC-484/584: Computer NetworksWenbing Zhao Persistent and Nonpersistent CSMA Improves over ALOHA because they ensure no station to transmit when it senses channel is busy

24 24 Spring Semester 2006EEC-484/584: Computer NetworksWenbing Zhao CSMA with Collision Detection If two stations start transmitting simultaneously, both detect collision and stop transmitting Minimum time to detect collision = time for signal to propagate CSMA/CD can be in one of three states: –Transmission: a station is busy transmitting, it has exclusive usage on the channel –Contention: when a transmission finishes, one or more stations might want to start transmitting, and compete for the channel –Idle: if no station has anything to transmit

25 25 Spring Semester 2006EEC-484/584: Computer NetworksWenbing Zhao CSMA with Collision Detection

26 26 Spring Semester 2006EEC-484/584: Computer NetworksWenbing Zhao Contention Period: Minimum Time to Detect Collision Let the time for a signal to propagate between the two farthest stations be  For station to be sure it has channel and other stations will not interfere, it must wait 2  without hearing a collision (not  as you might expect) –At t 0, station A begins transmitting –At t 0 +  - , B begins transmitting, just before A ’ s signal arrives –B detects collision and stops –At t 0 +  -  +  (t 0 +2  -  ), A detects collision A B

27 27 Spring Semester 2006EEC-484/584: Computer NetworksWenbing Zhao Collision-Free Protocols For long, high-bandwidth fiber optic networks –large transmission delay , short frames, collisions are a problem –collision-free protocols are more desirable Assumption: N stations with addresses 0, …,N-1 Bit map protocol

28 28 Spring Semester 2006EEC-484/584: Computer NetworksWenbing Zhao Bit-Map Protocol Reservation based If station k has frame to send, transmits 1 in k th slot, announcing that it has a frame to send Stations then transmit in numerical order

29 29 Spring Semester 2006EEC-484/584: Computer NetworksWenbing Zhao Bit-Map Protocol: Time to Wait before Transmitting For low-numbered stations => 1.5N –On average, the station will have to wait N/2 slots for the current scan to finish –Another full N slots for the following scan to run to completion For high-numbered stations => 0.5N –Only needs to wait N/2 slots for the current scan to finish Mean for all stations is N slots

30 30 Spring Semester 2006EEC-484/584: Computer NetworksWenbing Zhao Bit-Map Protocol: Channel Efficiency Low load –Overhead per frame: N bits –If amount of data is d bits, efficiency is d/(N+d) High load –Overhead per frame: 1 bit –If amount of data is d bits, efficiency is d/(1+d)

31 31 Spring Semester 2006EEC-484/584: Computer NetworksWenbing Zhao Contention vs. Collision-Free Protocols Contention protocols –At low load, low delay => preferable –As load increases, overhead increases due to channel arbitration Collision-free protocols –At low load, high delay –As load increases, channel utilization improves

32 32 Spring Semester 2006EEC-484/584: Computer NetworksWenbing Zhao Wireless LAN Protocols: Infrastructure Base stations wired by copper/fiber in building If transmission power of base stations 3-4 meters, then each room forms a single cell Each cell has one channel Bandwidth 11-108 Mbps (for now)

33 33 Spring Semester 2006EEC-484/584: Computer NetworksWenbing Zhao Wireless LAN Protocols: Special Problems When receiver within range of two active transmitters, resulting signals garbled and useless Not all stations within range of each other Walls etc. impact range of each station What matters is interference at receiver –Sender needs to know whether there ’ s activity around the receiver

34 34 Spring Semester 2006EEC-484/584: Computer NetworksWenbing Zhao Hidden Station Problem A transmits to B C out of range of A, thinks OK to transmit to B C transmits to B, interference occurs at B

35 35 Spring Semester 2006EEC-484/584: Computer NetworksWenbing Zhao Exposed Station Problem B transmits to A C sense transmission, concludes can ’ t send to D, when it could have

36 36 Spring Semester 2006EEC-484/584: Computer NetworksWenbing Zhao Multiple Access with Collision Avoidance: MACA Protocol A sends Request to Send (RTS) to B containing length of data frame to follow B replies with Clear to Send (CTS) to A containing length in RTS When A receives CTS, A sends data frame Collision can occur (for RTS), use exponential backoff

37 37 Spring Semester 2006EEC-484/584: Computer NetworksWenbing Zhao MACA Any station (e.g., C,E) hearing RTS is close to A, must keep quite until B finishes sending CTS Any station (e.g., D,E) hearing CTS is close to B, must keep quite until A finish sending data frame

38 38 Spring Semester 2006EEC-484/584: Computer NetworksWenbing Zhao Exercise How long does a station, s, have to wait in the worst case before it can start transmitting its frame over a LAN that uses the basic bit-map protocol? (Assume N stations, each frame is d bits)

39 39 Spring Semester 2006EEC-484/584: Computer NetworksWenbing Zhao Exercise Six stations, A through F, communicate using the MACA protocol. Is it possible that two transmissions take place simultaneously?

40 40 Spring Semester 2006EEC-484/584: Computer NetworksWenbing Zhao Static Channel Allocation Let –T = mean time delay –C = channel capacity in bps – = arrival rate in frames/sec –1/  = mean frame length in bits/frame T = 1/(  C – ) from queueing theory –C = 100Mbps, 1/  = 10,000bits, = 5000 frames/sec –T = 200  sec –If no queueing delay, transmission time over 100Mbps line is 100  sec

41 41 Spring Semester 2006EEC-484/584: Computer NetworksWenbing Zhao Static Channel Allocation If we divide the single channel into N independent subchannels –Each subchannel has capacity C/N bps –Mean input rate /N –T FDM = 1/(  C/N – /N) = N/(  C – l) = NT –Mean delay is N times worse than that for 1 queue!


Download ppt "EEC-484/584 Computer Networks Lecture 9 Wenbing Zhao (Part of the slides are based on materials supplied by Dr. Louise Moser at UCSB and."

Similar presentations


Ads by Google