How are resources shared? - KU ITTC are resources shared? • Review general access network topology...

39
#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 #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

Transcript of How are resources shared? - KU ITTC are resources shared? • Review general access network topology...

#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]://www.ittc.ku.edu/

How are resources shared?

#8

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

#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

#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

InternetAccessMedium

Downstream

Upstream

InternetAccessMedium

Downstream

Upstream

#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

#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?

#8 6

Resource sharing principles

λ

λ

λ

µ

µ

µ

mseparatesystems

versus One

consolidatedsystem

mµλ

λ

λ

µ

µ

µ

mseparatesystems

versus One

consolidatedsystem

λ = 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

#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

#8 8

Impact on resource sharing

M/M/1 Delay

05

101520253035

0 0.2 0.4 0.6 0.8 1

Load

Del

ay

Ideal MACPerformance

#8 9

Impact on resource sharing

Tran

sfer

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

#8 10

Classification of MAC Schemes

MAC

Always-on Fixed Allocation

PollingContention

Hybrid

TDMA

CDMA

FDMA

SDMA

#8 11

Classification of MAC Schemes

MAC

Dynamically Scheduled Fully Scheduled

PollingRandom Access

Hybrids

TDMA

CDMA

FDMA

Another perspective

SDMA

#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

#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

#8 14

Circuit Switching

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

Using Circuit Switching530ms

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

A B

Call Set-up

Data Transmission

#8 15

Example

Air interface

AC = authentication centerBSS = base station subsystemEIR = equipment identity register

HLR = home location register

MSC

PSTN

BSS

STP SS7HLR

VLR

EIRAC

MSC = mobile switching centerPSTN = public switched telephone network

STP = signal transfer pointVLR = visitor location register

Physical Connection

Signaling PathInformation Path

Adapted from: Leon-Garcia & Widjaja: Communication Networks

Simplified Cellular System

#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

#8 17

∑=

=== N

n

n

N

B

n

NNkPP

0 !

!][ρ

ρ

Performance of circuit switching

Erlang BBlocking Formula λ = Call arrival rate (call/sec)µ= Call service rate (call/sec)ρ= load (Erlangs)

PB=Blocking Probability=

#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

AverageHolding Time =

Arrival Rate (call/min)=

C

C

Telephone Trunks

Blocked Calls C

#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

#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%.

#8 21

Performance Evaluation: Example

• Traffic intensity = 14 Erlangs

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

#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.

#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.

#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

#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

#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

#8 27

Virtual Circuit Packet Switching

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

#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

#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 Mbytefile to transmit. The file transfer time is:

#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

#8 31

CallArrival

CallDuration

VoIPPacket Arrivals

VoIPPacket Lengths

Dynamically Scheduled

Session Interarrivals

Session Duration

Packet Interarrivals

Packet LengthsResources are requested on a burst/packet basis.

VoIP Example

Time

#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

InternetAccessMedium

Downstream

Upstream

InternetAccessMedium

Downstream

Upstream

#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

#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.

#8 35

Deterministic Protocols

Master

Node

Node

Node

Node

#8 36

Deterministic Protocols

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

Node

Node

NodeNode

Node

#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

#8 38

Random Access

• Each node sends data with limitedcoordination 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]

#8 39

Random Access

• Advantage: Simple• Disadvantage:

–No guarantee that you will ever get to send.

–The MAC protocol technology does not scale

#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

#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

#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

#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

#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

#8 45

Limitations on Random Access Protocols

• Distance– Time to learn channel state

Propagation time

• Speed– Time to learn channel state

Clocking speed

#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

#8 47

Random Access ProtocolsAnalysis of Aloha

– If collision detected then station iretransmitts 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

#8 48

Random Access ProtocolsAnalysis of Aloha

Assumptions

λ1. = Average number of new message arrival to the system

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

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

S = λL ≤ 1S = throughput

#8 49

Random Access ProtocolsAnalysis of Aloha

Collision Mechanism

Target Packet

2L

Target packet is vulnerable to collision for 2L Sec.

Arrival Arrival Arrival

#8 50

Random Access Protocols: Analysis of Aloha

18% is Alohafor t throughpuMaximum The

0.18=2e1 =Sor

21 =G when 0 =

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

ThenL)=(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-

dGdS

ΛΛ

Λ

Λ

Λ

ΛΛ

λ

λ

Load

Delay

0.18

#8 51

Random Access ProtocolsAnalysis of Slotted Aloha

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

Target Packet

#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

#8 53

Random Access ProtocolsPerformance of Unslotted and Slotted Aloha

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

#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

#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

#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/Xkcwhere

X= packet length in bits

#8 57

Random Access ProtocolsPerformance

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

#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

#8 59

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.90.

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

#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

#8 61

Random Access ProtocolsCSMA Protocols: States

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

#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.

#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

#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

#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

#8 66

Reservation Aloha

• Consider a slotted system with N slots/Frame

• 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 in

next frame• If state is other then do not send in that

time slot in next frame• If state is empty then contend for that slot

sin Al h in n xt f m

#8 67

Reservation Aloha

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

• 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?

#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 frequency channel• The centralized system is used in many access

technologies, e.g.,– DOCSIS– IEEE 802.16– WCDMA HSDPA– CDMA2000 EV-DO

Adapted from: Leon-Garcia & Widjaja: Communication Networks

#8 69

Reservation Systems

TimeCycle 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; minislot can carry other information, e.g., number of frame to TX, station backlog, CQI

Adapted from: Leon-Garcia & Widjaja: Communication Networks

Upstream Transmissions

Minislot

#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

#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

#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 Access network– Heavy load stations have packets to send– All requests are granted– one minislot needed for each packet/station

• Time to transmit M packets = Mv+MX

XMXM

MXS vv +=

+=

1

1max

Adapted from: Leon-Garcia & Widjaja: Communication Networks

#8 73

Throughput

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

XkMkXM

MkXS vv +=

+=

1

1max

Adapted from: Leon-Garcia & Widjaja: Communication Networks

#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, backoffand retry.

#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 minislotsseem longer

XX(1+ev)

1 1 + 2.71v/X

Smax = =

#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

#8 77

References

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

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