#8 1 victor s. frost dan f. servey distinguished professor electrical engineering and computer...

77
#8 1 Victor S. Frost Dan F. Servey Distinguished Professor Electrical Engineering and Computer Science University of Kansas 2335 Irving Hill Dr. Lawrence, Kansas 66045 Phone: (785) 864-4833 FAX:(785) 864-7789 e-mail: [email protected] http://www.ittc.ku.edu/ How are resources shared? #8 All material copyright 2006 Victor S. Frost, All Rights Reserved

Post on 19-Dec-2015

212 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: #8 1 Victor S. Frost Dan F. Servey Distinguished Professor Electrical Engineering and Computer Science University of Kansas 2335 Irving Hill Dr. Lawrence,

#8 1

Victor S. FrostDan F. Servey Distinguished Professor Electrical Engineering and Computer

ScienceUniversity of Kansas2335 Irving Hill Dr.

Lawrence, Kansas 66045Phone: (785) 864-4833 FAX:(785) 864-

7789 e-mail: [email protected]

http://www.ittc.ku.edu/

How are resources shared?

#8

All material copyright 2006Victor S. Frost, All Rights Reserved

Page 2: #8 1 Victor S. Frost Dan F. Servey Distinguished Professor Electrical Engineering and Computer Science University of Kansas 2335 Irving Hill Dr. Lawrence,

#8 2

How are resources shared?

• Review general access network topology• Resource sharing principles• Resource reservation (call) model

– Dedicated resources– Shared after reservation

• Always-on model– Polling– Random Access

• Asymmetric mechanisms– Assumptions– General descriptions– Scheduling in the downstream– Contention in the upstream

• Scheduling

Page 3: #8 1 Victor S. Frost Dan F. Servey Distinguished Professor Electrical Engineering and Computer Science University of Kansas 2335 Irving Hill Dr. Lawrence,

#8 3

General access network topology

• Sharing the upstream resources requires a “distributed” mechanism– Mulitpoint-to-point– Subject to collisions

• Sharing the downstream resources requires a scheduling mechanism– Point-to-multipoint

I nternet

AccessMedium

Downstream

Upstream

I nternet

AccessMedium

Downstream

Upstream

Page 4: #8 1 Victor S. Frost Dan F. Servey Distinguished Professor Electrical Engineering and Computer Science University of Kansas 2335 Irving Hill Dr. Lawrence,

#8 4

Resource sharing principles

• Complex– Demand for resources

• Diverse– Video– Voice– Short messages

• Dynamic, changes with time– Requirements for services

• Real-time• Near-real time• Non-real-time• Loss tolerant

– Desire for efficient use of resources– Basic tradeoff between:

• Providing “service”• Efficient use of resources

Page 5: #8 1 Victor S. Frost Dan F. Servey Distinguished Professor Electrical Engineering and Computer Science University of Kansas 2335 Irving Hill Dr. Lawrence,

#8 5

Resource sharing principles

• A large number of demands for resources will present an aggregate demand equal to the sum of the average of the individual demands

• Which is better, sharing– One large capacity link or– Several smaller capacity links?

Page 6: #8 1 Victor S. Frost Dan F. Servey Distinguished Professor Electrical Engineering and Computer Science University of Kansas 2335 Irving Hill Dr. Lawrence,

#8 6

Resource sharing principles

mseparatesystems

versus

Oneconsolidated

systemm

m

mseparatesystems

versus

Oneconsolidated

systemm

m

= Packet arrival rate (packets/sec)= Packet service rate (packets/sec) = load per server= = Total load = m

Buffers Servers

• One consolidated system is better• Therefore it is better to have a large number of users sharing a single server

Page 7: #8 1 Victor S. Frost Dan F. Servey Distinguished Professor Electrical Engineering and Computer Science University of Kansas 2335 Irving Hill Dr. Lawrence,

#8 7

Impact on resource sharing • Goal:

– Access the “entire” channel bandwidth– Through a “global buffer”

• Want– Global knowledge of who wants to send– Allow each to send according to some

schedule, e.g. FIFO• However,

– Users are geographically distributed– There is no perfect knowledge of system state– The messages to coordinate the transmissions

of the users must also use the same media

Page 8: #8 1 Victor S. Frost Dan F. Servey Distinguished Professor Electrical Engineering and Computer Science University of Kansas 2335 Irving Hill Dr. Lawrence,

#8 8

Impact on resource sharing

M/M/1 Delay

0

510

15

20

2530

35

0 0.2 0.4 0.6 0.8 1

Load

De

lay

Ideal MACPerformance

Page 9: #8 1 Victor S. Frost Dan F. Servey Distinguished Professor Electrical Engineering and Computer Science University of Kansas 2335 Irving Hill Dr. Lawrence,

#8 9

Impact on resource sharing T

rans

fer

Del

ay

Load

E[T]/E[X]

max-2 1

1

max-1

MAC Protocol 1

MAC Protocol 2

Adapted from: Leon-Garcia & Widjaja: Communication Networks

Page 10: #8 1 Victor S. Frost Dan F. Servey Distinguished Professor Electrical Engineering and Computer Science University of Kansas 2335 Irving Hill Dr. Lawrence,

#8 10

Classification of MAC Schemes

MAC

Always-on Fixed Allocation

PollingContention

Hybrid

TDMA

CDMA

FDMA

SDMA

Page 11: #8 1 Victor S. Frost Dan F. Servey Distinguished Professor Electrical Engineering and Computer Science University of Kansas 2335 Irving Hill Dr. Lawrence,

#8 11

Classification of MAC Schemes

MAC

Dynamically Scheduled Fully Scheduled

PollingRandom Access

Hybrids

TDMA

CDMA

FDMA

Another perspective

SDMA

Page 12: #8 1 Victor S. Frost Dan F. Servey Distinguished Professor Electrical Engineering and Computer Science University of Kansas 2335 Irving Hill Dr. Lawrence,

#8 12

Fully scheduled (call) modelCircuit switching

• In fixed allocation– User requests connection– via signaling – Connection is established– Speakers converse– User(s) hang up– Network releases

connection resources

Signal

Source

Signal

Release

Signal

Destination

Goahead Message

Adapted from: Leon-Garcia & Widjaja: Communication Networks

Page 13: #8 1 Victor S. Frost Dan F. Servey Distinguished Professor Electrical Engineering and Computer Science University of Kansas 2335 Irving Hill Dr. Lawrence,

#8 13

Resource reservation (call) model

• Circuit switching is a form of fully scheduled

• After call set up resources are dedicated for duration of “call”

• Signaling messages and user information may use different channels

• Signaling facilitates mobility• Enables billing per resources (min) used• Time wasted doing signaling

Page 14: #8 1 Victor S. Frost Dan F. Servey Distinguished Professor Electrical Engineering and Computer Science University of Kansas 2335 Irving Hill Dr. Lawrence,

#8 14

Circuit Switching

Example: Example: Find the time to transmit a 37.5 Mbyte message Find the time to transmit a 37.5 Mbyte message coast-to-coast is the USA (3000Km) coast-to-coast is the USA (3000Km) on a 600 Mb/s linkon a 600 Mb/s link

Using Circuit SwitchingUsing Circuit Switching530ms530ms

Key issue is holding time relative to call set-up time

AA BB

Call Set-upCall Set-up

Data Transmission

Page 15: #8 1 Victor S. Frost Dan F. Servey Distinguished Professor Electrical Engineering and Computer Science University of Kansas 2335 Irving Hill Dr. Lawrence,

#8 15

Example

Air interface

AC = authentication center BSS = base station subsystem EIR = equipment identity register HLR = home location register

MSC

PSTN

BSS

STP SS7HLR

VLR

EIR

AC

MSC = mobile switching centerPSTN = public switched telephone network STP = signal transfer point VLR = visitor location register

Physical Connection

Signaling Path

Information Path

Adapted from: Leon-Garcia & Widjaja: Communication Networks

Simplified Cellular System

Page 16: #8 1 Victor S. Frost Dan F. Servey Distinguished Professor Electrical Engineering and Computer Science University of Kansas 2335 Irving Hill Dr. Lawrence,

#8 16

• In fully scheduled there are N resources available– Channels– Time slots– Codes

• Typically there for M users with access to N resources where M>>N

• Performance is measured in terms of probability of requesting a resource when all are busy

Performance of circuit switching

Page 17: #8 1 Victor S. Frost Dan F. Servey Distinguished Professor Electrical Engineering and Computer Science University of Kansas 2335 Irving Hill Dr. Lawrence,

#8 17

N

n

n

N

B

n

NNkPP

0 !

!][

Performance of circuit switching

Erlang BErlang BBlocking Formula Blocking Formula = Call arrival rate (call/sec)= Call service rate (call/sec)= load (Erlangs)

PB=Blocking Probability=

Page 18: #8 1 Victor S. Frost Dan F. Servey Distinguished Professor Electrical Engineering and Computer Science University of Kansas 2335 Irving Hill Dr. Lawrence,

#8 18

Example simulation

3V 1 2

D

T U

D

T U

D

T U Exit#

Exit#

Exit#

D

T U1 2 3

Rand

Count

#r

Exit#

Number Calls

Generated

Exit#

Number Calls

Generated

Average

Holding Time =

Arrival Rate

(call/min)=

C

C

Telephone Trunks

Blocked Calls C

Page 19: #8 1 Victor S. Frost Dan F. Servey Distinguished Professor Electrical Engineering and Computer Science University of Kansas 2335 Irving Hill Dr. Lawrence,

#8 19

0 166.6667 333.3333 500 666.6667 833.3333 10000

1.822917

3.645833

5.46875

7.291667

9.114583

10.9375

12.76042

14.58333

16.40625

18.22917

20.05208

21.875

23.69792

25.52083

27.34375

29.16667

Time

% Blocked CallsPlotter, Discrete Event

Solid Blue GrayPat Red GrayPat Green ltGrayPat Black

Holding time=3min, Arrival rate=0.833 calls/min ->PB = 0.15, Simulated PB = 0.198

Example simulation

Page 20: #8 1 Victor S. Frost Dan F. Servey Distinguished Professor Electrical Engineering and Computer Science University of Kansas 2335 Irving Hill Dr. Lawrence,

#8 20

Performance Evaluation: Example

• A department has 140 phones, each phone is busy 10% of the time during the busy hour.

• How many lines do you need to buy from the phone company to keep the blocking probability less than 2%.

Page 21: #8 1 Victor S. Frost Dan F. Servey Distinguished Professor Electrical Engineering and Computer Science University of Kansas 2335 Irving Hill Dr. Lawrence,

#8 21

Performance Evaluation: Example

•Traffic intensity = 14 Erlangs

•From Erlang Table –14 Erlangs & 2% –Blocking ==> 21 lines

Page 22: #8 1 Victor S. Frost Dan F. Servey Distinguished Professor Electrical Engineering and Computer Science University of Kansas 2335 Irving Hill Dr. Lawrence,

#8 22

Performance Evaluation: Example

• Design of a building phone system. The design goal is to minimize the number of lines needed between the building and the phone company. The blocking QoS is specified to be 5%.

• A building has four floors, on each floor is a separate department. Each department has 22 phones, each busy 10% of the time during the busy hour.

Page 23: #8 1 Victor S. Frost Dan F. Servey Distinguished Professor Electrical Engineering and Computer Science University of Kansas 2335 Irving Hill Dr. Lawrence,

#8 23

Performance Evaluation: Example-Case A

•Acquire one telephone switch for each floor.

•2.2 Erlangs/floor & B=5% gives:

•5 lines/floor or 20 lines for the building.

Page 24: #8 1 Victor S. Frost Dan F. Servey Distinguished Professor Electrical Engineering and Computer Science University of Kansas 2335 Irving Hill Dr. Lawrence,

#8 24

Performance Evaluation: Example-Case B

• Acquire one telephone switch for the building.

• 88 phones @ .1 Erlang/phone = 8.8 Erlangs

• 8.8 Erlangs & B=5% gives:• 13 lines for the building• Select Case B

– More traffic sharing more resources

Page 25: #8 1 Victor S. Frost Dan F. Servey Distinguished Professor Electrical Engineering and Computer Science University of Kansas 2335 Irving Hill Dr. Lawrence,

#8 25

Virtual Circuit Packet Switching

• Use signaling process to set up a call• Resources are not necessarily

reserved for the flow • A “logical connection” is established

between the source and destination• All packets flow over the same route

through the network• Packets still “statistically share” link

Page 26: #8 1 Victor S. Frost Dan F. Servey Distinguished Professor Electrical Engineering and Computer Science University of Kansas 2335 Irving Hill Dr. Lawrence,

#8 26

Virtual Circuit Packet Switching

• Forwarding decisions are made based on a “virtual circuit identifier” not on the full address

• Packet share transmission facilities• Switches save state/connection• State is saved for duration of the

connection• QoS can be guaranteed• Facilities billing

Page 27: #8 1 Victor S. Frost Dan F. Servey Distinguished Professor Electrical Engineering and Computer Science University of Kansas 2335 Irving Hill Dr. Lawrence,

#8 27

Virtual Circuit Packet Switching

*Note: Do not need the same VCI end-to-end

Page 28: #8 1 Victor S. Frost Dan F. Servey Distinguished Professor Electrical Engineering and Computer Science University of Kansas 2335 Irving Hill Dr. Lawrence,

#8 28

Fully Scheduled

• Efficient when resource demands have long holding times, e.g., movies, telephone calls

• Resource being scheduled can be:– Frequency band (FDMA)– Time slot (TDMA)– Code (CDMA)– Space– Combinations of the above

Page 29: #8 1 Victor S. Frost Dan F. Servey Distinguished Professor Electrical Engineering and Computer Science University of Kansas 2335 Irving Hill Dr. Lawrence,

#8 29

sec40

50sec/10

81017

6

bits

bitxx

Potential for improvement

• Example– A common transmission media has a rate

of 10 Mb/s and supports 50 users. The system uses fully scheduled allocation. A user has a 1 Mbyte file to transmit. The file transfer time is:

Page 30: #8 1 Victor S. Frost Dan F. Servey Distinguished Professor Electrical Engineering and Computer Science University of Kansas 2335 Irving Hill Dr. Lawrence,

#8 30

• Dynamically scheduled– Suppose you send a message to all the

other 49 users saying, ‘I need the whole channel for about 1sec, do not use it, please’

– As long as the overhead incurred in sending the message is less than 39 sec. the user will get better performance.

– The essence of dynamically scheduled mechanisms is their distributed coordination of transmissions

Potential for improvement

Page 31: #8 1 Victor S. Frost Dan F. Servey Distinguished Professor Electrical Engineering and Computer Science University of Kansas 2335 Irving Hill Dr. Lawrence,

#8 31

CallArrival

CallDuration

VoIP Packet Arrivals

VoIP Packet Lengths

Dynamically Scheduled

Session InterarrivalsSession Interarrivals

Session DurationSession Duration

Packet InterarrivalsPacket Interarrivals

Packet LengthsPacket Lengths

Resources are requested on a burst/packet basis.

VoIP Example

Time

Page 32: #8 1 Victor S. Frost Dan F. Servey Distinguished Professor Electrical Engineering and Computer Science University of Kansas 2335 Irving Hill Dr. Lawrence,

#8 32

Dynamically Scheduled

• Approaches– Polling– Contention (Random)– Hybrids

• Suitable for Access Networks– Geographically small

networks (few Km)– Owned by one

organization• Cable company• Telephone company• Power company

I nternet

AccessMedium

Downstream

Upstream

I nternet

AccessMedium

Downstream

Upstream

Page 33: #8 1 Victor S. Frost Dan F. Servey Distinguished Professor Electrical Engineering and Computer Science University of Kansas 2335 Irving Hill Dr. Lawrence,

#8 33

Deterministic: Polling, Token Ring &Token Bus

• Advantage: the maximum time between users chances to transmit is bounded. (assuming a limit on the token holding time)

• Disadvantage: Time is wasted polling other users if they have no data to send.

• The technology does not scale– With geographic size– Network Speed– Number of users

Page 34: #8 1 Victor S. Frost Dan F. Servey Distinguished Professor Electrical Engineering and Computer Science University of Kansas 2335 Irving Hill Dr. Lawrence,

#8 34

Deterministic Protocols

•Roll Call Polling–Master/slave arrangement–Master polls each node; Do you have data to send?

– If the polled node has data it is sent otherwise next node is polled.

Page 35: #8 1 Victor S. Frost Dan F. Servey Distinguished Professor Electrical Engineering and Computer Science University of Kansas 2335 Irving Hill Dr. Lawrence,

#8 35

Deterministic Protocols

MasterMaster

NodeNode

NodeNode

NodeNode

NodeNode

Page 36: #8 1 Victor S. Frost Dan F. Servey Distinguished Professor Electrical Engineering and Computer Science University of Kansas 2335 Irving Hill Dr. Lawrence,

#8 36

Deterministic Protocols

• Hub Polling– No master station– Each nodes polls the next node in turn

NodeNode

NodeNode

NodeNodeNodeNode

NodeNode

Page 37: #8 1 Victor S. Frost Dan F. Servey Distinguished Professor Electrical Engineering and Computer Science University of Kansas 2335 Irving Hill Dr. Lawrence,

#8 37

Deterministic Protocols

• Example:– # nodes = 10– Link rate = 1 Mb/s– Packet Size = 1000 bits– Low load no queueing– 0.1 ms between nodes– Find the effective transmission rate and efficiency.

• On average destination is 5 nodes away .5 ms• Time to transmit 1000 bits = 0.5 ms + 1 ms = 1.5 ms• Effective transmission rate = 1000 bits/ 1.5 ms = 666Kb/s• Efficiency = (666 Kb/s)/(1000 Kb/s) = 0.66

– Repeat for link rate = 10 Mb/s• On average destination is 5 nodes away .5 ms• Time to transmit 1000 bits = 0.5 ms + .1 ms = .6 ms• Effective transmission rate = 1000 bits/ .6 ms = 1.67 Mb/s• Efficiency = (1.67 Mb/s)/(10 Mb/s) = 16.7%

– Conclusion Polling does not scale with link rate

Page 38: #8 1 Victor S. Frost Dan F. Servey Distinguished Professor Electrical Engineering and Computer Science University of Kansas 2335 Irving Hill Dr. Lawrence,

#8 38

Random Access

• Each node sends data with limited coordination between users: No explicit permission to transmit

• Total chaos: Send data as soon as ready• Limited chaos: Listen before sending data, if the

channel is busy do not send.• Further Limiting chaos: Listen before sending

data, continue listening after sending and if collision with another transmission stop sending. [Carrier Sense Multiple Access with Collision Detection

CSMA/CD]

Page 39: #8 1 Victor S. Frost Dan F. Servey Distinguished Professor Electrical Engineering and Computer Science University of Kansas 2335 Irving Hill Dr. Lawrence,

#8 39

Random Access

• Advantage: Simple• Disadvantage:

–No guarantee that you will ever get to send.

–The MAC protocol technology does not scale

Page 40: #8 1 Victor S. Frost Dan F. Servey Distinguished Professor Electrical Engineering and Computer Science University of Kansas 2335 Irving Hill Dr. Lawrence,

#8 40

Random Access Protocols

• Assumptions– Overlap in time and space of two

or more transmissions causes a collision and the destruction of all packets involved.

[ No capture effects]

– One channel– For analysis no station buffering

Page 41: #8 1 Victor S. Frost Dan F. Servey Distinguished Professor Electrical Engineering and Computer Science University of Kansas 2335 Irving Hill Dr. Lawrence,

#8 41

Random Access Protocols

– Time-Alternatives• Synchronization between users (Slotted

time)• No synchronization between users

(unsloted time)

– Knowledge of the channel state-Alternatives• Carrier sensing• Collision detection

Page 42: #8 1 Victor S. Frost Dan F. Servey Distinguished Professor Electrical Engineering and Computer Science University of Kansas 2335 Irving Hill Dr. Lawrence,

#8 42

Random Access ProtocolsStrategies

• Aloha– No coordination between users– Send a PDU, wait for

acknowledgment, if no acknowledgment then backoff

and retransmit

• Slotted Aloha– Same as Aloha only time is slotted

Page 43: #8 1 Victor S. Frost Dan F. Servey Distinguished Professor Electrical Engineering and Computer Science University of Kansas 2335 Irving Hill Dr. Lawrence,

#8 43

Random Access ProtocolsStrategies

• p-persistent CSMA– Listen to channel, if idle or on transition

from busy to idle transmit with probability p– After sending the PDU, wait for

acknowledgment, if no acknowledgment then backoff and

retransmit

• Non-persistent, if channel busy then reschedule transmission

• 1-persistent, Transmit as soon as idle

Page 44: #8 1 Victor S. Frost Dan F. Servey Distinguished Professor Electrical Engineering and Computer Science University of Kansas 2335 Irving Hill Dr. Lawrence,

#8 44

Random Access ProtocolsStrategies

•CSMA/CD–1-persistent but continue to sense the channel, if collision detected then stop transmission.

–CSMA/CD is used in 10, 100 Mb/s, and 1 Gb/s Ethernet

Page 45: #8 1 Victor S. Frost Dan F. Servey Distinguished Professor Electrical Engineering and Computer Science University of Kansas 2335 Irving Hill Dr. Lawrence,

#8 45

Limitations on Random Access Protocols

• Distance– Time to learn channel state

Propagation time

• Speed– Time to learn channel state

Clocking speed

Page 46: #8 1 Victor S. Frost Dan F. Servey Distinguished Professor Electrical Engineering and Computer Science University of Kansas 2335 Irving Hill Dr. Lawrence,

#8 46

Random Access ProtocolsAnalysis of Aloha:

• Goal: Find Smax

• Protocol Operation– Packet of length L (sec) arrives at station i

• Station i transmits immediately• Station i starts an acknowledgment timer

– If no other station transmits while i is transmitting then success

– Else a collision occurred– Station i learns that a collision occurred if

the acknowledgment timer fires before the acknowledgment arrives

Page 47: #8 1 Victor S. Frost Dan F. Servey Distinguished Professor Electrical Engineering and Computer Science University of Kansas 2335 Irving Hill Dr. Lawrence,

#8 47

Random Access ProtocolsAnalysis of Aloha

– If collision detected then station i retransmitts at a later time, this time is pseudo-random and is determined by a backoff algorithm

• Design Issue:– Determine the maximum

normalized throughput for an Aloha system

Page 48: #8 1 Victor S. Frost Dan F. Servey Distinguished Professor Electrical Engineering and Computer Science University of Kansas 2335 Irving Hill Dr. Lawrence,

#8 48

Random Access ProtocolsAnalysis of Aloha

AssumptionsAssumptions

1. 1. = Average number of = Average number of newnew message arrival message arrival to the systemto the system

2. 2. = Average number arrivals to the system, i.e.,= Average number arrivals to the system, i.e., new arrivals + retransmissionsnew arrivals + retransmissions

3. The total arrival process is Poisson3. The total arrival process is Poisson4. Fixed Length Packets4. Fixed Length Packets

SL1

Sthroughput

Page 49: #8 1 Victor S. Frost Dan F. Servey Distinguished Professor Electrical Engineering and Computer Science University of Kansas 2335 Irving Hill Dr. Lawrence,

#8 49

Random Access ProtocolsAnalysis of Aloha

Collision Mechanism

Target PacketTarget Packet

2L2L

Target packet is Target packet is vulnerablevulnerable to collision for 2L Sec. to collision for 2L Sec.

Arrival Arrival Arrival

Page 50: #8 1 Victor S. Frost Dan F. Servey Distinguished Professor Electrical Engineering and Computer Science University of Kansas 2335 Irving Hill Dr. Lawrence,

#8 50

Random Access Protocols: Analysis of

Aloha

18% is Alohafor t throughpuMaximum The

0.18=2e

1 =Sor

2

1 =G when 0 =

S Find

Ge = Sor )e -G(1 + S =G

Then

L)=(S load Offered = L =G

Let

)e -(1 + =

But

e -1 =

sec] 2Lin arrivals Prob[no -1 =Collision ofy Probabilit

max

max

2L-2L-

2L-

2L-

dG

dS

LoadLoad

DelayDelay

0.18

Page 51: #8 1 Victor S. Frost Dan F. Servey Distinguished Professor Electrical Engineering and Computer Science University of Kansas 2335 Irving Hill Dr. Lawrence,

#8 51

Random Access ProtocolsAnalysis of Slotted Aloha

Synchronization reduces the vulnerable period Synchronization reduces the vulnerable period from 2L to L so the maximum throughput isfrom 2L to L so the maximum throughput isincreases to 36%increases to 36%

Target PacketTarget Packet

Page 52: #8 1 Victor S. Frost Dan F. Servey Distinguished Professor Electrical Engineering and Computer Science University of Kansas 2335 Irving Hill Dr. Lawrence,

#8 52

Number of transmissions required for success

71.2on Transmissi ofNumber Expected 1 GAt

)1(on Transmissi ofNumber Expected

)1( attemptsk in success ofy Probabilit

1Collision ofy Probabilit

1

e

ePPk

PPP

eP

G

k

kcc

kcck

Gc

Page 53: #8 1 Victor S. Frost Dan F. Servey Distinguished Professor Electrical Engineering and Computer Science University of Kansas 2335 Irving Hill Dr. Lawrence,

#8 53

Random Access ProtocolsPerformance of Unslotted and Slotted Aloha

From: “Computer Networks, 3rd Edition, A.S. Tanenbaum. Prentice Hall, 1996

Page 54: #8 1 Victor S. Frost Dan F. Servey Distinguished Professor Electrical Engineering and Computer Science University of Kansas 2335 Irving Hill Dr. Lawrence,

#8 54

Random Access ProtocolsCSMA Protocols

• Listen to the channel before transmitting to reduce the vulnerable period

• Let D = maximum distance between nodes• Let R = the transmission rate (b/s)• Let c = speed of light = 3 x 108 m/s• The end-to-end propagation time = D/kc=

k is a constant for the physical media: k = .66 for fiber, k=.88 for coax

Page 55: #8 1 Victor S. Frost Dan F. Servey Distinguished Professor Electrical Engineering and Computer Science University of Kansas 2335 Irving Hill Dr. Lawrence,

#8 55

Random Access ProtocolsCSMA Protocols

• Assume node A transmits at time t and node B at t -x, where x 0(That is, Node B transmits right before it hears A)

• If after 2D/kc sec. no collision occurred, then none will occur

• Let a= /L=(D/kc)/L = normalized length of the bus

• Remember L(sec) = (Packet Length [bits])/R [b/s]

• As a --> 1, CSMA performance approaches Aloha performance

Page 56: #8 1 Victor S. Frost Dan F. Servey Distinguished Professor Electrical Engineering and Computer Science University of Kansas 2335 Irving Hill Dr. Lawrence,

#8 56

Random Access ProtocolsCSMA Protocols

• Limits on a– Want a small to keep vulnerable

period short by having:•Short bus•Lower speeds•Long packets

– Lower limit (Minimum) packet length to upper bound a

– Maximum packet length to be fair

a= DR/Xkc whereX= packet length in bits

Page 57: #8 1 Victor S. Frost Dan F. Servey Distinguished Professor Electrical Engineering and Computer Science University of Kansas 2335 Irving Hill Dr. Lawrence,

#8 57

Random Access ProtocolsPerformance

From: “Computer Networks, 3rd Edition, A.S. Tanenbaum. Prentice Hall, 1996

Page 58: #8 1 Victor S. Frost Dan F. Servey Distinguished Professor Electrical Engineering and Computer Science University of Kansas 2335 Irving Hill Dr. Lawrence,

#8 58

Random Access ProtocolsCSMA Protocols

• Example: Ethernet– Rate = 100 Mb/s– Minimum packet size = 512 bits– Maximum packet size = 12144 bits– D (max per segment) = 500 m– a --> [0.001, 0.03]

• CSMA networks do not scale– Increase D performance degrades– Increase R performance degrades

Page 59: #8 1 Victor S. Frost Dan F. Servey Distinguished Professor Electrical Engineering and Computer Science University of Kansas 2335 Irving Hill Dr. Lawrence,

#8 59

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

0.02

0.03

0.06

0.13

0.25 0.5 1 2 4 8 16 32 64

0.81

0.51

0.14

S

G

a = 0.01

Non-Persistent CSMA Throughput

a = 0.1

a = 1

• Higher maximum throughput than 1-persistent for small a

• Worse than Aloha for a > 1

Adapted from: Leon-Garcia & Widjaja: Communication Networks

Page 60: #8 1 Victor S. Frost Dan F. Servey Distinguished Professor Electrical Engineering and Computer Science University of Kansas 2335 Irving Hill Dr. Lawrence,

#8 60

Performance of Random Access Protocols

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

a

max

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

From: Leon-Garcia & Widjaja: Communication Networks

Page 61: #8 1 Victor S. Frost Dan F. Servey Distinguished Professor Electrical Engineering and Computer Science University of Kansas 2335 Irving Hill Dr. Lawrence,

#8 61

Random Access ProtocolsCSMA Protocols: States

From: “Computer Networks, 3rd Edition, A.S. Tanenbaum. Prentice Hall, 1996

Page 62: #8 1 Victor S. Frost Dan F. Servey Distinguished Professor Electrical Engineering and Computer Science University of Kansas 2335 Irving Hill Dr. Lawrence,

#8 62

Collision Free Protocols

• Collision free protocols establish rules to determine which stations sends after a successful transmission.

• Assume there are N stations with unique addresses 0 to N-1.

• A contention interval is a period after a successful transmission that is divided into N time slots, one for each station.

Page 63: #8 1 Victor S. Frost Dan F. Servey Distinguished Professor Electrical Engineering and Computer Science University of Kansas 2335 Irving Hill Dr. Lawrence,

#8 63

Collision Free Protocols

• If a station has a PDU to send it sets a bit to 1 in its time slot in the contention interval.

• At the end of the contention interval all nodes know who has data to send and the order in which it will be sent.

From: “Computer Networks, 3rd Edition, A.S. Tanenbaum. Prentice Hall, 1996

Page 64: #8 1 Victor S. Frost Dan F. Servey Distinguished Professor Electrical Engineering and Computer Science University of Kansas 2335 Irving Hill Dr. Lawrence,

#8 64

Collision Free Protocols

• Example of using resources, time to “schedule” transmissions

• Problems:– Fairness– Flexibility

• Many systems use the basic approach of collision free protocols

Page 65: #8 1 Victor S. Frost Dan F. Servey Distinguished Professor Electrical Engineering and Computer Science University of Kansas 2335 Irving Hill Dr. Lawrence,

#8 65

Hybrids

• Hybrid approaches combine:– Random access– Fully scheduled

• Idea is to limit the time (resources) involved in collisions

• Different protocols can be used in the upstream and downstream directions

Page 66: #8 1 Victor S. Frost Dan F. Servey Distinguished Professor Electrical Engineering and Computer Science University of Kansas 2335 Irving Hill Dr. Lawrence,

#8 66

Reservation Aloha

• Consider a slotted system with N slots• Each slot can be in one of three states:

• Empty, i.e., not is use• Mine, i.e., in use by me• Other, i.e., in use by another node

• Protocol• If state is mine then continue to use it• If state is other then do not send in that time slot• If state is empty then contend for that slot using

Aloha

Page 67: #8 1 Victor S. Frost Dan F. Servey Distinguished Professor Electrical Engineering and Computer Science University of Kansas 2335 Irving Hill Dr. Lawrence,

#8 67

Reservation Aloha

• At low loads the network performs like a random access systems, i.e., no waiting for permission to send.

• At high loads the systems performs like a TDM system.

• Example – Some time “reserved” for contention.– Distributed algorithm

• This scheme has a problem with fairness• How are opportunities to transmit in time slots

granted?

Page 68: #8 1 Victor S. Frost Dan F. Servey Distinguished Professor Electrical Engineering and Computer Science University of Kansas 2335 Irving Hill Dr. Lawrence,

#8 68

Random Access and Reservations

• Distributed systems: Stations implement a decentralized algorithm to determine transmission order, e.g., reservation Aloha

• Centralized systems: A central controller accepts requests from stations and issues grants to transmit– Frequency Division Duplex (FDD): Separate frequency

bands for uplink & downlink– Time-Division Duplex (TDD): Uplink & downlink time-

share the same channel• The centralized system is used in many access

technologies, e.g.,– DOCSIS– IEEE 802.16

Adapted from: Leon-Garcia & Widjaja: Communication Networks

Page 69: #8 1 Victor S. Frost Dan F. Servey Distinguished Professor Electrical Engineering and Computer Science University of Kansas 2335 Irving Hill Dr. Lawrence,

#8 69

Reservation Systems

Time

Cycle n

Reservationinterval

Frame transmissions

r d d d r d d d

Cycle (n + 1)

r = 1 2 3 M

• Transmissions organized into cycles (or frames)• Cycle: reservation interval + frame transmissions• Reservation interval has a minislot for each station to request reservations for

frame transmissions

Adapted from: Leon-Garcia & Widjaja: Communication Networks

Upstream Transmissions

Page 70: #8 1 Victor S. Frost Dan F. Servey Distinguished Professor Electrical Engineering and Computer Science University of Kansas 2335 Irving Hill Dr. Lawrence,

#8 70

Reservation System Options

• Centralized or distributed system– Centralized systems: A central controller listens

to reservation information, decides order of transmission, issues grants

– Distributed systems: Each station determines its slot for transmission from the reservation information

• Single or Multiple Frames– Single frame reservation: Only one frame transmission

can be reserved within a reservation cycle– Multiple frame reservation: More than one frame

transmission can be reserved within a frame• Channelized or Random Access Reservations

– Channelized (typically TDMA) reservation: Reservation messages from different stations are multiplexed without any risk of collision

– Random access reservation: Each station transmits its reservation message randomly until the message goes through

Adapted from: Leon-Garcia & Widjaja: Communication Networks

Page 71: #8 1 Victor S. Frost Dan F. Servey Distinguished Professor Electrical Engineering and Computer Science University of Kansas 2335 Irving Hill Dr. Lawrence,

#8 71

Reservation System

• System Characteristics– Asymmetric

• Upstream– Minislots with requests for resources– Access Minislots via random access protocol

• Downstream– Accepts minislots and includes grants for

transmission– Grants control the flow on the upstream link– Order of grants established via a “scheduling”

algroithm

Page 72: #8 1 Victor S. Frost Dan F. Servey Distinguished Professor Electrical Engineering and Computer Science University of Kansas 2335 Irving Hill Dr. Lawrence,

#8 72

Throughput• Let

– R = Link rate (b/s)– L = packet size (bits)– V = minislot size (sec)– M = Number of stations– X = L/R

• Assume– Propagation delay < X– Heavy load

• Need one minislot needed for each station– Time to transmit M packets = Mv+MX

vv

1

1max MXM

MX

Adapted from: Leon-Garcia & Widjaja: Communication Networks

Page 73: #8 1 Victor S. Frost Dan F. Servey Distinguished Professor Electrical Engineering and Computer Science University of Kansas 2335 Irving Hill Dr. Lawrence,

#8 73

Throughput

• If k frame transmissions can be reserved with a reservation message and if there are M stations, as many as Mk frames can be transmitted in XM(k+v) seconds

kMkXM

MkXS

vv

1

1max

Adapted from: Leon-Garcia & Widjaja: Communication Networks

Page 74: #8 1 Victor S. Frost Dan F. Servey Distinguished Professor Electrical Engineering and Computer Science University of Kansas 2335 Irving Hill Dr. Lawrence,

#8 74

Throughput: with random access contention for Minislots

• Real systems have too many nodes for each to get a fixed minislot.

• Therefore a random access protocol is used to transmit in a minslot.– A station attempts to obtain a grant by

transmitting in a minslot in the upstream direction.

– If successful the station will get the grant on the down stream

– If unsuccessful then assume collision, backoff and retry.

Page 75: #8 1 Victor S. Frost Dan F. Servey Distinguished Professor Electrical Engineering and Computer Science University of Kansas 2335 Irving Hill Dr. Lawrence,

#8 75

Throughput: with random access contention for Minislots

• Assume slotted Aloha is used for contention for minislots.

• On average, each reservation takes at least e = 2.71 minislot attempts

• Effect is just to make the minislots seem longer

X X(1+ev)

1 1 + 2.71v

Smax = =

Page 76: #8 1 Victor S. Frost Dan F. Servey Distinguished Professor Electrical Engineering and Computer Science University of Kansas 2335 Irving Hill Dr. Lawrence,

#8 76

A user perspective

• Call model– User connects to service– Then does activity– Examples

• Dial-up models• Cell phones

• Always-on model– User is “always” connected– Have packet just “send” it– “send” it happens in some

controlled way– No call process (dialing #) – No waiting for connection– Examples:

• Cable modems• WiFi• DSL

• Call model– Fully scheduled– Efficient for long holding times

• Always-on model– Dynamically scheduled– Needs coordination– Support large number of users– Often users can send at full link

speed– Efficient for bursty traffic

Page 77: #8 1 Victor S. Frost Dan F. Servey Distinguished Professor Electrical Engineering and Computer Science University of Kansas 2335 Irving Hill Dr. Lawrence,

#8 77

References

• Leon-Garcia & Widjaja: Communication Networks, McGraw Hill, 2004

• “Computer Networks, 3rd Edition, A.S. Tanenbaum. Prentice Hall, 1996