Lecture Slides for The Link Layer - Computer Engineering | ECE 284, Study notes of Electrical and Electronics Engineering

Material Type: Notes; Class: Topics/Computer Engineering; Subject: Electrical & Computer Engineer; University: University of California - San Diego; Term: Fall 2005;

Typology: Study notes

Pre 2010

Uploaded on 03/28/2010

koofers-user-kjl-1
koofers-user-kjl-1 🇺🇸

10 documents

1 / 21

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
1
The Link Layer
The Link Layer
Curt Schurgers
2
ECE 284
ECE 284
Scheduling
Scheduling
Scheduling issue: in which order should transmissions take place?
How is bandwidth allocated in a fair fashion?
Can throughput and delay be guaranteed?
MH1
MH2
MH3
MH4
in fade
in fade
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15

Partial preview of the text

Download Lecture Slides for The Link Layer - Computer Engineering | ECE 284 and more Study notes Electrical and Electronics Engineering in PDF only on Docsity!

The Link Layer The Link Layer

Curt Schurgers

2 ECEECE 284284

Scheduling Scheduling

„ Scheduling issue: in which order should transmissions take place?

● How is bandwidth allocated in a fair fashion? ● Can throughput and delay be guaranteed?

MH

MH

MH

MH

in fade

in fade

3 ECEECE 284284

Round Robin (RR) Round Robin (RR)

„ Round robin (RR) scheduling: visit each active connection in turn

„ RR with different flow weightsw or different packet lengths

● Can lead to long periods of unfairness

w = 2

w = 1

w = 1

4 ECEECE 284284

Generalized Processor Sharing (GPS) Generalized Processor Sharing (GPS)

„ GPS: similar to RR, but service infinitesimal fraction

● Different weightsw can provide different amount of service

● Proportionally shares resource ● Provides isolation between flows ● Non-implementable

w = 2

w = 1

w = 1

GPS

Figures from: http://www.comp.nus.edu.sg/~cs5229/

7 ECEECE 284284

Calculating Finish Numbers Calculating Finish Numbers

„ The finish number of a packet arriving at time k can be calculated as:

● : Finish number of packet k of flow i ● : Packet length of packet k of flow i ● R : Current round number

0 1 2 3 4 5 6 7

time

1 Kbps Service rate 1000 bits 1000 bits 1000 bits

500 bits 500 bits

500 bits 500 bits 500 bits

1500 bits

S / 1000 = 1/3 1/2 1/3 1

0 1 2 3 4 5 6 7

time

Packet arrivals

1000 bits 2000 bits 2000 bits (^) 2000 bits

F i ( k)=max [ Fi(k− 1 ),R] +Li(k)

F (^) i( k ) L (^) i( k )

R ( t 2 )=R(t 1 )+S[t 1 ,t 2 ]⋅ (t 2 −t 1 )

t = 0 R = 0 FA (1) = 1000 FB (1) = 2000 FC (1) = 2000 t = 3 R = 1000

S = 1000/

S = 1000/ t = 4 R = 1500 S = 1000/3 FA (2) = 1500 + 2000 = 3500 t = 5.5 R = 2000 S = 1000 t = 7 R = 3500 S = 0

8 ECEECE 284284

WFQ with Different Weights WFQ with Different Weights

„ WFQ serves connections in the order of smallest finish number

● Upon arrival of a new packet: calculate its finish number

● Keep track of the round number

● B is the set of active connections Š Active connection: finish number of packet in queue or last served packet is larger than the current round number

[ ]

i

i i i w

L k F k F k R

( )=max ( − 1 ), +

R ( t 2 )= R(t 1 )+S[t 1 ,t 2 ]⋅(t 2 −t 1 ) ∑ ∈

= k B

wk

C S

Different weights

9 ECEECE 284284

WFQ Properties WFQ Properties

„ Finish number is not related to the finish time of the actual transmission

„ Benefits of WFQ ● Connections are shielded from each other ● Delay guarantees under certain conditions ● Guaranteed service rate at each time for flowi is:

„ Drawbacks of WFQ

● State required per connection: expensive to implement

„ Other variants: WF 2 Q, self-clocked fair queuing, start-time fair queuing

A B (^) C A

0 1 2 3 4 5 6 7

time

WFQ packet transmission schedule

0 1 2 3 4 5 6 7

time

GPS service rate

C

w

w g (^) N

k

k

i i = ⋅

= 1

10 ECEECE 284284

Scheduling Wireless Links Scheduling Wireless Links

„ Errors in wireless links are bursty and spatially uncorrelated

● Due to interference or fades ● Common model: 2-state Markov chain on packet level

„ FIFO (first in, first out) scheduling leads to head-of-line blocking

● Packets that are destined for the terminal with the bad channel are retransmitted over and over ● Bad resource utilization and negative effect on TCP ● Fairness problem: terminal with bad channel affects those with a good link

TCP

TCP

TCP

TCP

P1P4P2P3P1P

MH

MH

MH MH

in fade

WLAN Card Xmit

Recv

Source: http://nesl.ee.ucla.edu/courses/ee206a/2002s /

PER = 0 Good Bad PER = 1

13 ECEECE 284284

Wireless Fair Queuing Wireless Fair Queuing

„ Goal: provide fairness despite temporary localized channel errors

● Channel errors should be almost transparent to the user

„ If a scheduled flow is experiences a bad channel, one with a good channel will be allowed to transmit instead to avoid wasting capacity

„ Flows most be compensated for capacity lost due to channel errors

„ Issues:

● Monitoring the channel state ● Separation between flows: flows that always perceive a good channel should not be impacted

14 ECEECE 284284

Wireless Fair Service (WFS) Wireless Fair Service (WFS)

„ A variant of WFQ is used as the reference model

„ Properties

● Short-term and long-term fair ● Achieves delay and throughput bounds ● Delay and bandwidth decoupling ● Graceful relinquishing of slots ● Fair compensation of lagging flows

15 ECEECE 284284

Need for Adaptation Need for Adaptation

„ Intrinsic variability ● Channel variability Š Dynamic channel conditions in space and time ● Traffic variability Š New streams, applications, users Š Non-constant data rate, e.g. mpeg video

„ Traditional approach: design system for worst case operating conditions ● E.g. certain outage probability ● Wasteful in terms of resources

„ Adaptation ● Adjust the system settings to the best operating point for the current channel/traffic conditions and constraints

Static snapshot of signal intensity map

Source:[IEEE99]

16 ECEECE 284284

Channel Variability Channel Variability

„ Channel varies in time and space „ Different models at different levels of detail

„ Severe channel degradation ● ‘Deep’ fades: e.g. 5 ms average BAD state duration in 2-state model, with ρ = -20 dB and speed of 10 km/h ● Heavy shadowing „ Additional quality variations when the channel is good enough to support communication

GOOD BAD

~ speed

~ speed

BERgood

BERbad

channel gain

time (s)

19 ECEECE 284284

Packet Size Adaptation [Let98] Packet Size Adaptation [Let98]

„ Variability ● Channel quality varies (BER or distance varies)

„ Control knobs ● Adjust the packet length ● Fixed transmit power and raw data rate ● Erroneous packets are retransmitted

„ Maximize the goodputG (useful bit rate as seen by the higher layers)

G R

L L H O BER b

= L^ H

⋅ ( 1 − )+

L packet payload H packet MAC header O PHY overhead

L (bytes)

Adaptation problem 2

20 ECEECE 284284

Packet Size Adaptation Packet Size Adaptation

„ Variability ● Channel fading rate varies: two-state Markov chain for different speeds (~transition prob) and same BER (^) good „ Control knobs ● Adjust the packet length ● Fixed transmit power and raw data rate ● TCP traffic source ● Erroneous packets are retransmitted at the MAC level ● Include error coding „ Minimize the energy

Sampling effect: fit more packets in the ‘good’ state

Adaptation problem 3

21 ECEECE 284284

Adaptive Modulation [Web95] Adaptive Modulation [Web95]

SNR (dB)

BER

4-QAM16-QAM64-QAM256-QAM

Adaptation problem 4

„ Variability ● Channel quality varies: varying SNR „ Control knobs ● Adjust the constellation size ● Fixed transmit power and symbol rate ● Fixed target BER „ Maximize the throughput

„ Strategy ● Estimate SNR ● Look up highest constellation size that can be supported with target BER „ Side issue ● In a shared medium, slower nodes require more time to transmit the same amount of information. Fairness?

22 ECEECE 284284

Modulation Scaling [Sch03] Modulation Scaling [Sch03]

Adaptation problem 5

„ Variability ● Traffic requirements: data rate „ Control knobs ● Adjust the constellation size and the transmit power ● Fixed symbol rate ● Fixed target BER ● Fixed channel „ Minimize the energy per bit „ Extension ● Include channel variations ● Vary FEC instead of, or together with, constellation size

„ Challenge ● Does transmit power relate to energy? ● Previous adaptations reduced number of packets to save energy

SNR (dB)

BER

4-QAM16-QAM64-QAM 256-QAM

25 ECEECE 284284

Analysis of the Radio Analysis of the Radio

„ Power of interest,P, depends on the communication setup

● Transmitter constrained

● Receiver constrained ● Transmitter and receiver constrained:

„ Power components depend on the baseline

● With shutdown ● Without shutdown

P =P Tx

P =P Rx

P =PTx +P Rx

Time

Power Idle

Time

Power

Sleep

PTx =PTx−P sleep

PTx =PTx−P idle

PRx =PRx−P sleep

PRx =PRx−P idle

PTx = PS+P ETx PRx = PERx+PDEC

Source: [Sch02b]

26 ECEECE 284284

Analysis of the Radio Analysis of the Radio

„ Adaptation variesR, the ‘raw’ number of bits/symbol ● Headers and useful user data are both part of the ‘raw’ number of bits

„ The total energy consumption per packet is then

„ Scaling optimizes the ‘raw energy per bit’

● Other techniques: minimize headers, packet length adaptation, minimize overhead, …

MAC headers FEC^ modulation

R bits/symbol

RRS bits/s^ RS symbols/s

S

bit RR

T

Epacket =P⋅Tbit⋅ ( L+H) +Eoverhead

( ) L

E

L

L H

PT

L

E

E (^) usefulbit packet bit + overhead

Ebit =P⋅T bit

L packet payload H all packet headers Eoverhead energy of PHY overhead

27 ECEECE 284284

„ For a system with a variable symbol rate, some parts of the electronics operate at the maximum symbol rate, while others operate at the instantaneous symbol rate

„ The FEC decoder energy is expressed as a function of the decode energy per bit before encoding,E (^) DEC ● The decoding energy depends on the complexity of the code, which is related toR

● Example

Analysis of the RadioAnalysis of the Radio

PDEC =EDEC⋅R⋅R S

max

  • 1 2 PETx = CETx⋅RS+CETx⋅R S max
  • 1 2 PERx =CERx⋅RS+CERx⋅R S

2

1 DEC

DEC DEC C R

C

E = +

(^01) 1.2 1.4 1.6 1.8 2

100

200

300

S

bit c R

T R = 1

I bit

RS (n = 15)

RS (n = 63)

RS (n = 255)

MIPS

P E I proc DEC = bit⋅

Reed-Solomon decoding on a StrongARM microprocessor [Let99]

28 ECEECE 284284

„ The performance of the communication system depends onE (^) b /N 0 , which is a function of the received electro-magnetic powerPR

„ The received power is a function of the transmitted powerPT and the channel gain ● A: constant large scale channel gain ● α: fading (normalized to 1) – note that this is apower factor here

„ How the PA power,PS , relates to the transmitted power depends on the efficiency of the power amplifier

Analysis of the RadioAnalysis of the Radio

0 0

0 N RR N

E

PR SNRN W b⎟⎟⋅ ⋅ S⋅ ⎠

S

b R

W

R

SNR

N

E

0

PR = PT⋅A⋅ α

PS = γ 1 ⋅PT+ γ 2

PT PR

PETx PS PERx

A ⋅α

2 0

2

0 0

N

E

RR

C

A

RR N

N

E

PS b S S S b A

N

C S^1

31 ECEECE 284284

Analysis of the Radio Analysis of the Radio

R

1 R

1

Dynamic Modulation Scaling (DMS)

Dynamic Code Scaling (DCS)

PSK

QAM

RS (n = 15)

RS (n = 63) RS (n = 255) RCPC

b ↓ RC ↓

N 0

E (^) b N 0

E (^) b

„ Two examples ● Modulation scaling: vary the constellation size ● Code scaling: vary the redundancy of the code (code rateR (^) c = number of bits before coding/number of bits after coding)

R =b⋅R c

Rc = (^1) b = 1 (BPSK)

32 ECEECE 284284

Analysis of the Radio Analysis of the Radio

„ SendNtot bits within delay boundT (^) A (symbol rate is fixed)

„ Special case of a time-invariant channel in [0,T (^) A]: α = 1

„ Due to the convexity of , the optimum strategy is to use the same rate on all information carrying symbols

R

C

N

E

Ebit CS b⎟⎟+ E ⎠

0

E bit

S

bit RR

T

PA dominates

Electronics dominate

Etot = T ⋅N tot

Ttot = T ⋅N tot

(^0) T A

Ttot = T⋅N tot

(^0) T A

Etot = T⋅N tot Etot =Ebit⋅Ntot *

Ttot =Tbit⋅N tot

TA < T⋅N tot 0 *

E*

tot

tot N

E

tot

A N

T

Region of scaling

T^ *

Region of shutdown 1 2 3

1 2 3

33 ECEECE 284284

Analysis of the Radio Analysis of the Radio

normalized Ebit

= 104 S

E C

C

= 3 ⋅ 102 S

E C

C

= 10 S

E C

C

R ↓

Shorter transmit range

(^1) R =Tbit ⋅R S

QAM-scaling

Shutdown-based system: Transmit as fast as possible and shut down the radio afterwards

Scaling-based system: Transmit as slow as possible and use all time available

0

2000

4000

6000

8000

0

100

200

300

0

200

400

600

nJ/bit (^) GSM

Medusa sensor node

WLAN

PA

TransmitelectronicsReceiveelectronics

34 ECEECE 284284

Scaling and Scheduling Scaling and Scheduling

„ When multiple packets need to be transmitted, the problem becomes one of scheduling ● Different traffic conditions and constraints lead to different scheduling problems ● E.g. Scheduling for random packet arrivals under a global deadline constraint [Pra01]

„ Channel variations also result in scheduling issues ● Important when the optimization criterion is a long-term effect, e.g. long-term average throughput ● Intuitive explanation: it is better to transmit when the channel is good, but the future is unknown

Arrival 1 Deadline 1

Arrival 2 Deadline 2

Arrival 1 Deadline 1

Arrival 2 Deadline 2

time

Channel gain

37 ECEECE 284284

Code Scaling Example Code Scaling Example

38 ECEECE 284284

Code Scaling Example Code Scaling Example

„ Adaptation improves the way energy scales with distance ● Impact of electronics on energy consumption ● Graceful degradation

„ Implementation dependent ● These tradeoffs depend on the hardware platform that is chosen (e.g. Viterbi decoding on the StrongARM is costly) ● Accurate hardware models are essential

„ Adaptation impacts other system tradeoffs ● Data aggregation ● Single hop versus multi-hop routing

39 ECEECE 284284

Code Scaling Example Code Scaling Example

40 ECEECE 284284

References References

[Nan99] Nandagopal, T., Lu, S., Bharghavan, V., “A unified architecture for the design and evaluation of wireless fair queueing algorithms,” Mobicom’99, Seattle, WA, pp.132-142, 1999. [Sch03] Schurgers, C., Raghunathan, V., Srivastava, M., "Power Management for Energy-Aware Communication Systems," ACM Transactions on Embedded Computing Systems, Vol.2, No.3, pp. 431-447, 2003. [Par94] Parekh, A., Gallager, R., “A generalized processor sharing approach to flow control in integrated services networks: The multiple node case,” Transactions on Networking, Vol.2, No.2, pp.137–150, 1994. [IEEE99] IEEE 802.11, 1999 Edition (ISO/IEC 8802-11: 1999),Local and Metropolitan Area Network -- Specific Requirements -- Part 11: Wireless LAN Medium Access Control (MAC) and Physical Layer (PHY) Specifications, http://standards.ieee.org/getieee802/802.11.html. [Let99] Lettieri, P., Schurgers, C., Srivastava, M., “Adaptive Link Layer Strategies for Energy Efficient Wireless Networking,” Wireless Networks, Vol.5, No.5, ACM/Baltzer, pp. 339-335, 1999. [Let98] Lettieri, P., Srivastava, M., “Adaptive frame length control for improving wireless link throughput, range, and energy efficiency,” Infocom'98, San Francisco, CA, pp.564-571, 1998. [Web95] Webb, W., Steele, R., “Variable rate QAM for mobile radio,” IEEE Transactions on Communications, Vol.43, No.7, pp.2223–2230, 1995.