Packet Scheduling - PowerPoint PPT Presentation

1 / 35
About This Presentation
Title:

Packet Scheduling

Description:

Packet scheduling determine packet processing priority. First come first served (FCFS/FIFO) ... Fairer resource sharing. 11. Conservation Law ... – PowerPoint PPT presentation

Number of Views:50
Avg rating:3.0/5.0
Slides: 36
Provided by: walterc6
Category:

less

Transcript and Presenter's Notes

Title: Packet Scheduling


1
Packet Scheduling
  • CS2520-TELCOM2321
  • Wide Area Networks
  • KyoungSoo Park
  • University of Pittsburgh
  • Slides borrowed from Dr. Cerroni

2
Todays Lecture
  • Packet scheduling determine packet processing
    priority
  • First come first served (FCFS/FIFO)
  • Priority queuing
  • (Weighted) fair queuing
  • Max-min fair share algorithm
  • Generalized processor sharing (GPS)
  • Traffic policing vs. shaping
  • Dropping/marking vs. spreading out
  • Leaky bucket
  • Token bucket

3
Multi-Service Network
  • Single network infrastructure carrying traffic
    from different services (data, voice, video...)
    in an integrated way
  • Different quality of service requirements to be
    met

4
Performance Bounds Delay Jitter
  • Delay jitter bound is useful for audio/video
    playback, where receiver can compensate delay
    variations
  • Delaying the first packet by the delay-jitter
    bound in an elasticity buffer
  • Playing back packets at a constant rate from the
    buffer

reception at the client
Constant Bit Rate(CBR) streaming at the source
buffered data
Cumulative data
variable network delay
CBR playbackat the client
playbackbuffer delay
Time
5
Packet Scheduling
  • Packets are queued at intermediate nodes
  • Store and forward
  • The server on each queue must
  • Decide which packet to serve next
  • Manage the queue of backlogged packets
  • The server uses a scheduling discipline to
  • Fairly share the resources
  • Provide performance guarantees
  • Trade-off between
  • Traffic isolation
  • Circuit switching guaranteed dedicated resources
  • Resource sharing
  • Packet switching complete resource sharing

6
Scheduling Policy Requirements
  • A scheduler should be
  • Scalable
  • The number of operations to implement a
    discipline should be as independent as possible
    of the number of scheduled connections
  • Fair
  • It should allocate a fair share of the link
    capacity and output queue buffer to each
    connection
  • Protective
  • The misbehavior of one source should not affect
    the performance received by other sources

7
The Simplest Scheduler FCFS or FIFO
  • First Come First Served or First In First Out
  • Packets are served in the same order as they
    arrive
  • Most commonly used scheduling discipline
  • Example
  • M/G/1 queue Poisson arrivals, generic service
    time
  • Stability condition on server utilization
  • Probability of idle server state

departure rate
arrival rate
averageservice time
server
queue
8
Limitations of FCFS
  • No consideration for delay sensitivity
  • Small packets must wait for long packets to be
    serviced
  • Unfair
  • Connections with large packets usually receive
    better services by getting higher percentage of
    server time
  • Not protective
  • Greedy connections are advantaged over friendlier
    connections
  • An excessively active connection may cause other
    connections implementing congestion control to
    back off more than required
  • Complete resource sharing without traffic
    isolation
  • Isolation through separate queues for different
    traffic flows or classes sharing the same
    bandwidth

9
Priority Queuing
  • K priority classes
  • Class 1 has highest priority, then class 2, then
    class 3, ...
  • Differentiate packet processing by its priority
  • Low-priority packets are serviced only when there
    are no packets of higher priority waiting to be
    serviced
  • FCFS within the same class
  • Arrivals of high-priority packets do not stop
    current service of low-priority packets
    (non-preemptive)

10
Priority Queuing
...
  • Flow with arrival rate and average
    service time
  • server utilization due to
    flow packets
  • Stability condition

11
Limitations of Priority Queuing
  • Effective only when high priority traffic is a
    small part of the total traffic
  • Efficient admission control and policing may be
    required
  • Not protective
  • A misbehaving source at a higher priority level
    can increase delay at lower priority levels
  • Unfair
  • Starvation of low-priority queues in case of
    heavy high-priority traffic
  • More sophisticated scheduling disciplines are
    required
  • Better traffic isolation
  • Fairer resource sharing

12
Conservation Law
  • Traffic isolation while sharing resources is
    limited by the conservation law
  • The sum of the mean queuing delays received by
    the set of multiplexed connections, weighted by
    their share of the link's load, is independent of
    the scheduling discipline
  • In other words, a scheduling discipline can
    reduce a particular connection's mean delay,
    compared with FCFS, only at the expense of
    another connection
  • Valid if server is idle only when queues are
    empty
  • Work-conserving schedulers

13
Max-Min Fair Share
  • Resources should be shared in a fair way,
    especially when they are not sufficient to
    satisfy all requests
  • Max-Min fair share
  • Bandwidth allocation technique that tries to
    maximize the minimum share for non-satisfied
    flows
  • Basic principles
  • Resources are allocated in order of increasing
    demands
  • Users with relatively small demands are satisfied
  • No user gets a resource share larger than its
    demand
  • Users with unsatisfied demands get an equal share
    of unused resources

14
Max-Min Fair Share
  • Order demands d1, d2, ..., dN such that d1 d2
    ... dN
  • Compute the initial fair share of the total
    capacity CFS C / N
  • For each demand dk such that dk FS allocate the
    requested bandwidth
  • Compute the remaining bandwidth R and the number
    of unsatisfied demands M
  • Repeat steps 3 and 4 using the updated fair share
    FS R / M until no demand left is FS
  • Allocate the current FS to remaining demands

15
Max-Min fair share Example
  • Demands d1 23, d2 27, d3 35, d4 45, d5
    55
  • Bandwidth C 155
  • FS 155 / 5 31
  • d1 and d2 satisfied, M 3
  • Bandwidth left R 155 (23 27) 105
  • FS 105 / 3 35
  • d3 satisfied, M 2
  • R 105 35 70
  • FS 70 / 2 35
  • d4 and d5 not satisfied ? they get 35

16
Max-Min Weighted Fair Share
  • Max-Min fair share assumes that all flows are
    equal
  • Different flows might have different QoS
    requirements
  • e.g. voice and video flows require different
    bandwidth levels
  • Customers of video service are willing to pay
    more to get the required bandwidth
  • Associate a weight to each demand to take into
    account different requirements
  • Normalize demands with corresponding weight
  • Use weights to compute fair share

17
Max-Min Weighted Fair Share Example
  • Demands d1 d2 10, d3 d4 25, d5 50
  • Bandwidth C 100
  • Max-Min satisfies d1, d2, d3, and d4 while d5
    gets 30
  • If d5 has the same right as the others, use
    weighted Max-Min
  • Weights w1 w2 w3 w4 1, w5 5
  • Weighted demands d1 d2 10, d3 d4 25,
    d5 50 / 5 10
  • FS C / (sum of weights) 100 / 9 11.11
  • d1, d2 and d5 satisfied, d5 gets 50
  • Sum of weights of unsatisfied demands M w3
    w4 2
  • Bandwidth left R 100 (10 10 50) 30
  • FS 30 / 2 15
  • d3 and d4 not satisfied ? they get 15

18
Fair Queuing
  • A router maintains multiple queues
  • Separate queues for different traffic flows or
    classes
  • Queues are serviced by a round-robin scheduler
  • Empty queues are skipped over
  • Bit-by-bit fairness among active flows
  • Send one bit from every flow and repeat this
    process
  • Packet-by-packet delivery in practice

1
2
...
K
19
Earliest Finish Time First
  • For every packet i, calculate the finishing
    time(Fi) of packet transmission
  • Fi Si Pi
  • Si packet sending start time
  • Pi number of clock ticks required to send
    packet i
  • Si max(Fi-1, Ai), where Ai is the arrival time
    of packet i
  • Clock increments when every active flow sends one
    bit
  • Scheduler sends a packet with the lowest Fi
  • Smaller packet that arrives late can be sent
    earlier than others
  • Properties
  • Work conserving
  • No more than 1/n th share for any flow

20
Generalized Processor Sharing (GPS)
  • Ideal fair queuing discipline based on fluid
    model
  • Fluid model
  • Traffic is infinitely divisible
  • Can serve multiple flows at the same time
  • Reflects weights
  • Each nonempty queue is serviced for an
    infinitesimal amount of data in proportion to the
    associated weight
  • Server capacity is split among nonempty queues
    according to weights
  • Provides an exact Max-Min weighted fair share
    allocation
  • WFQ is packet-by-packet GPS
  • Lowest finish time first with weights

21
GPS Formal Definition
  • GPS is a work conserving scheduler operating at
    fixed capacity C over K flows
  • Each flow is characterized by a positive real
    weight
  • is the amount of traffic from flow
    serviced in the interval
  • GPS server is defined as a server for which
    for any flow that is backlogged (i.e. has
    nonempty queue) throughout

22
GPS Flow Rate
  • Summing over all flows
  • Each backlogged flow receives a service rate of
  • If a flow source rate satisfies
    then such rate is always guaranteed independently
    of the other flows
  • 0 lt N(t) ltK number of active flows at time t
  • The service rate seen by flow when N(t) gt0
    iswith the sum taken over all active flows

23
Weighted Round Robin
  • Each flow is characterized by its
  • Weight
  • Average packet size
  • The server divides each flow weight by its mean
    packet size to obtain a normalized set of weights
  • Normalized weights are used to determine the
    number of packets serviced from each connection
    in each round
  • Simpler scheduler than WFQ
  • Mean packet size may not be known a-priori

24
Deficit Round Robin
  • DRR modifies WRR to handle variable packet sizes
    without knowing the mean packet size of each flow
    in advance
  • DRR associates each flow with a deficit counter
  • In each turn, the server attempts to serve one
    quantum" worth of bits from each visited flow
  • A packet is serviced if the sum of the deficit
    counter and the quantum is larger than the packet
    size
  • If the packet receives service, its deficit
    counter is reduced by the packet size
  • If the packet does not receive service, a quantum
    is added to its deficit counter
  • During a visit, if connection is idle, its
    deficit counter is reset to 0
  • Prevents a connection from cumulating service
    while idle

25
Traffic Policing Shaping
26
Traffic Policing
  • Source behavior must comply with traffic
    descriptor
  • Traffic policing is performed at network edges to
    detect contract violations
  • No queuing required
  • Packets conforming to agreed bounds are forwarded
  • Required resources are guaranteed
  • Packets exceeding the agreed bounds can be
  • Dropped at edge or
  • Marked as non-conforming
  • Dropped at any point in case of congestion
  • No resource guarantee

27
Traffic Shaping
  • In order to comply with descriptor, source
    traffic could be shaped to a predictable pattern
  • Smoothing burstiness out
  • Applied at source or network edges
  • Exceeding packets are delayed
  • Sent later when they eventually conform to
    descriptor
  • Queuing required - overflow may cause
    loss/marking
  • Latency introduced
  • Traffic policing must still be enforced if
    shaping is left to the source

28
Traffic Policing vs. Traffic Shaping
Example based on peak rate
policing
Rate
Time
Peak rate
Rate
Rate
Time
shaping
Time
29
Traffic Shaping Leaky Bucket
data
  • Purpose is to shape bursty traffic into a regular
    stream of packets
  • Bucket is characterized by a size ß
  • Flow is characterized by a drain rate, ?
  • Impose a hard limit on transmission rate
  • When bucket is full, packets can be
  • Discarded
  • Marked as non-conforming
  • The effect of ß is to
  • Limit the maximum bucket size
  • Bound the amount of delay a packet can incur
  • Given ß ? loss/marking rate vs. ? tradeoff
  • ß 0 for peak rate policing

ß
?
30
Traffic Shaping Leaky Bucket
  • Leaky bucket generates fixed-rate data flows
  • QoS requirements easily guaranteed
  • Suitable for smoothing small rate variations
  • Depending on ß
  • Highly variable rate sources must choose rate ?
    very close to their peak rate
  • Wasteful solution
  • Bursts are not permitted
  • A shaper allowing limited rate variation at the
    output would be better

31
Traffic Shaping Token Bucket
  • Bucket collects tokens
  • Tokens are generated at rate ?
  • Discarded when bucket is full
  • Each packet requires a token to be sent
  • A burst lesser than or equal to the number of
    tokens available can be transmitted (up to s)
  • When bucket is empty, packets are buffered and
    sent at rate ?

?
tokens
s
data
ß
32
Traffic Shaping Token Bucket
  • Number of packets sent in interval of length t
  • N ? t s ? Linear Bounded Arrival Process
  • ß 0 for LBAP policing
  • Given ß, the minimal LBAP descriptor is not
    unique
  • ? and s must be chosen
  • Average rate A gt ? ? buffer grows without bound
    ? avoiding packet losses would require s to be
    infinite
  • Peak rate P lt ? ? there are always tokens
    available ? s can be small at will
  • As ? increases in the range A, P , the minimum
    s needed to meet the loss bounds decreases
  • Any ? and its corresponding s is a minimal LBAP
    descriptor

33
Traffic Shaping Token Bucket
s
ß is fixed
s0
?0
?
A
P
34
Project Proposals
35
Sorted by Alphabetical Order
  • Santiago Bock
  • Jushua Geiger
  • Sumedha Gupta
  • Asim Jamshed
  • Xuelian Long
  • Victor Puchkarev
  • Joshua Stachel
  • Yinglin Sun
  • Saman TaghaviZargar
  • Pratik Vijay
Write a Comment
User Comments (0)
About PowerShow.com