Docsity

Link Layer Scheduling: RR, GPS, and Weighted Fair Queuing, Study notes of Electrical and Electronics Engineering

Toggle sidebar
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
3
ECE 284
ECE 284
Round Robin (RR)
Round Robin (RR)
Round robin (RR) scheduling: visit each active connectio n in turn
RR with different flow weights
w
or different packet lengths
●Can lead to long periods of unfairness
w = 2
w = 1
w = 1
4
ECE 284
ECE 284
Generalized Processor Sharing (GPS)
Generalized Processor Sharing (GPS)
GPS: similar to RR, but service infinitesimal fraction
●Different weights
w
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/
5
ECE 284
ECE 284
Weighted Fair Queuing (WFQ)
Weighted Fair Queuing (WFQ)
Weighted Fair Queuing (WFQ) is a packetized approxim ation of GPS
●Calculates when packets would have finished in GPS
●Serves packets in order of these GPS finish time
●Example: 3 flows A, B, C with equal weights
WFQ
043
25
17
6time
Packet arrivals
1000 bits
2000 bits
2000 bits 2000 bits
043
25
17
6time
1 Kbps Service rate
1000 bits
1000 bits
1000 bits
500
bits
500
bits
500 bits
500 bits
500 bits
1500 bits
w = 1
w = 1
w = 1
A
B
C
6
ECE 284
ECE 284
Emulating GPS
Emulating GPS
Model GPS as a bit-by-bit service
●Round number
R
: the number of rounds a bit-by-bit RR scheduler has
completed
●Each round takes a variable amount of time
●Finish number of a packet is the round in which it finishes (≠time)
●Consider the time progression:
t
R
S∂
∂
=
043
25
17
6time
C = 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/2 1/3 1
1/3
flowsactive
C
S#
=
Source: http://nesl.ee.ucla.edu/courses/ee206a/2002s /
pf3
pf4
pf5

Partial preview of the text

Download Link Layer Scheduling: RR, GPS, and Weighted Fair Queuing and more Study notes Electrical and Electronics Engineering in PDF only on Docsity!

The Link Layer The Link Layer

Curt Schurgers

2 ECE 284ECE 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?

MH

MH

MH

MH

in fade

in fade

3 ECE 284ECE 284

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 ECE 284ECE 284

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/

5 ECE 284ECE 284

Weighted Fair Queuing (WFQ)Weighted Fair Queuing (WFQ)

„ Weighted Fair Queuing (WFQ) is a packetized approximation of GPS

● Calculates when packets would have finished in GPS ● Serves packets in order of these GPS finish time

● Example: 3 flows A, B, C with equal weights

WFQ

0 1 2 3 4 5 6 7

time

Packet arrivals

1000 bits 2000 bits 2000 bits (^) 2000 bits

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

w = 1

w = 1

w = 1

A

B

C

6 ECE 284ECE 284

Emulating GPSEmulating GPS

„ Model GPS as a bit-by-bit service ● Round numberR: the number of rounds a bit-by-bit RR scheduler has completed ● Each round takes a variable amount of time ● Finish number of a packet is the round in which it finishes (≠time)

● Consider the time progression: t

R

S

0 1 2 3 4 5 6 7

time

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

active flows

C S

=

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

7 ECE 284ECE 284

Calculating Finish NumbersCalculating 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 F (^) A (1) = 1000 F (^) B(1) = 2000 F C (1) = 2000 t = 3 R = 1000

S = 1000/

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

8 ECE 284ECE 284

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

Lk F k Fk 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 ECE 284ECE 284

WFQ PropertiesWFQ 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 ECE 284ECE 284

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 BadPER = 1

11 ECE 284ECE 284

Channel State Dependent SchedulingChannel State Dependent Scheduling

„ Per-destination queues: scheduler decide which terminal is served ● Takes channel state into account ● Different from WFQ (state independent)

„ To provide quality of service in such a scenario ● Scheduler: provide fair resource allocation ● Policing: provide separation between flows ● Admission control: make sure the flows are schedulable

TCP

TCP

TCP TCP

MH

MH

MH MH

in fade

WLAN Card Xmit

Recv

scheduler

channel state per-destination queues monitor

12 ECE 284ECE 284

Problem with WFQProblem with WFQ

„ Example from [Nan99]

„ Allocation is not fair „ A link with a bad channel cannot be treated the same as a non-active one (not backlogged one)

19 ECE 284ECE 284

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 ECE 284ECE 284

Packet Size AdaptationPacket Size Adaptation

„ Variability ● Channel fading rate varies: two-state Markov chain for different speeds (~transition prob) and same BERgood „ 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 ECE 284ECE 284

Adaptive Modulation [Web95] Adaptive Modulation [Web95]

SNR (dB)

BER

4-QAM16-QAM64-QAM 256-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 ECE 284ECE 284

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-QAM256-QAM

23 ECE 284ECE 284

Analysis of the RadioAnalysis of the Radio

Analog electronics

Power amplifier

Radiated power

Transmit electronics

Receive electronics

Power amplifier

Tx Rx

PA

Digital electronics

Intersil PRISM II

24 ECE 284ECE 284

„ Four operating modes (possible submodes) ● Transmit (Tx) ● Receive (Rx) ● Idle: radio on, but not actively Tx or Rx

● Sleep

„ What power to optimize for? What is the baseline?

Analysis of the RadioAnalysis of the Radio

Time

Power

Sleep

Startup Idle

Rx

Tx (^) Tx Tx

Rx PETx PS PERx

Power amplifier

Transmit electronics

Receive electronics

PTx =PS+P ETx PRx =PERx+P DEC

P idle Psleep

Time

Power

Sleep

Tx Tx Transmitter

Time

Power

Idle Rx (^) Rx Receiver

25 ECE 284ECE 284

Analysis of the RadioAnalysis 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 ECE 284ECE 284

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

R ⋅ RS bits/s^ RS symbols/s

S

bit RR

T

E packet =P⋅Tbit⋅ ( L+H) +Eoverhead

L

E

L

LH

PT

L

E

E (^) bit overhead packet usefulbit +

Ebit =P⋅T bit

L packet payload H all packet headers E (^) overhead energy of PHY overhead

27 ECE 284ECE 284

„ 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,EDEC ● 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 ECE 284ECE 284

„ The performance of the communication system depends onEb /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,P (^) S, relates to the transmitted power depends on the efficiency of the power amplifier

Analysis of the RadioAnalysis of the Radio

0 0

0 RR N

N

E

PR SNRNW b⎟⎟⋅ ⋅S⋅ ⎠

S

b R

W

R

SNR

N

E

0

PR = PT⋅A⋅ α

PS = γ 1 ⋅PT+ γ 2

P (^) T P (^) R

P (^) ETx P (^) S P (^) ERx

A ⋅α

2 0

2

0 0

1 γ α

γ α

γ + ⎟

N

E

RR

C

A

RR N

N

E

P (^) S b S S S b A

N

C S^1

γ

29 ECE 284ECE 284

Analysis of the RadioAnalysis of the Radio

E S E S DEC S

b S

S C R CR C RR

N

E

RR

C

P + + ⋅ + ⋅ + ⋅ ⋅

= ⋅⋅ ⋅ 2 1 2 max^2 0

γ α

max 2

1 2 2 0

DEC S

E E S S

S b bit bit C R

R

R

C

R

C

N RR

C E

E PT + + ⋅ +

γ α

P = PS +PETx+PERx+P DEC

1 1 1 1 CE = CETx+CERx+C DEC 2 2 2 CE =CETx+C ERx

R

C

N

C E

E (^) bit S b+E ⎟

α 0

2 1 2 E E S

E C C

R

C = + +

γ

„ Putting it all together

„ Observations ● Ebit is a decreasing function ofR (^) S: optimum is always operating at the maximumR (^) S ● CDEC^2 is a constant offset, which we can neglect (and add to the total at the end)

30 ECE 284ECE 284

„ The generic expressions for the ‘raw energy per bit’ cover a wide range of scenarios ● Turning the radio off between transmissions or not (impacts the baseline) ● Optimizing the transmitter, the receiver or both (Cs = 0 if transmitter not important) ● Power amplifier that maintains its linearity ( γ 2 = 0) or has a constant power drain ( γ 1 =C (^) s = 0)

„ Adaptation principle: adapt the data rateR ● The delay increases with decrease rateR ● The energy depends on two functions with different behavior

Analysis of the RadioAnalysis of the Radio

R

C

N

C E

E

S b E bit (^) ⎟⎟+ ⎠

α (^0) s bit RR

T

N 0

Eb

R R

1 R

37 ECE 284ECE 284

Code Scaling ExampleCode Scaling Example

38 ECE 284ECE 284

Code Scaling ExampleCode 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 ECE 284ECE 284

Code Scaling ExampleCode Scaling Example

40 ECE 284ECE 284

ReferencesReferences

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

41 ECE 284ECE 284

References References

Required Reading:

  • [Sch03]

[Sch02b] Schurgers, C., “Energy-Aware Communication Systems,” Chapter 2, Ph.D. Thesis, UCLA, 2002. [Pra01] Prabhakar,B., Biyikoglu, E., El Gamal, A., “Energy-efficient transmission over a wireless link via lazy packet scheduling,” Infocom’01, Anchorage, AK, pp.386– 394, 2001. [Sch01] Schurgers, C., Aberthorne, O., Srivastava, M., “Modulation Scaling for Energy Aware Communication Systems,” ISLPED'01, Huntington Beach, CA, pp. 96-99,

[Rag04] Raghunathan, V., Ganeriwal, S., Schurgers, C., Srivastava, M., “Energy Efficient Wireless Packet Scheduling and Fair Queuing,” ACM Transactions on Embedded Computing Systems, Vol.3, No.1, pp. 431-447, 2004. [Min02] Min, R., Chandrakasan, A., “A Framework for Energy-Scalable Communication in High-Density Wireless Networks,” ISLPED '02, Monterey, CA, pp.36-41, 2002.