Docsity

Packet Scheduling - Local Area Network - Lecture Slides, Slides of Network security

Partial preview of the text

Download Packet Scheduling - Local Area Network - Lecture Slides and more Slides Network security in PDF only on Docsity!

Packet Scheduling and Buffer

Management in Routers

(A Step Toward Quality-of-service)

10-

Best-effort V.S. Guaranteed-service

  • The current IP network does not provide any guarantee for the service that a packet will receive.
  • The only guarantee is that the IP network will do its best to deliver your packets to their destinations.
  • This type of service is called “best-effort” service. Most of people are already used to it. E.g. FTP, email, WWW, etc.
  • However, sometimes some people may want guaranteed service for their performance critical applications.
  • For example, NCTU may want a minimum bandwidth at all time between its campus and the Internet. (^) 10- 2

Asking Network Users to Behave Themselves Is Impractical

  • The most commonly used FIFO packet scheduling and drop-tail buffer management schemes in today’s routers/switches cannot provide any quality-of-service (QoS) guarantee or fairness.
  • For example, a greedy user (e.g., a UDP or a modified super strong TCP) can easily use up all the bandwidth of a bottleneck link.
  • Asking all users of the Internet to behave themselves is too impractical.
  • We got to do something (packet scheduling and buffer management) in the network (routers) to enforce fairness and provide QoS. 10- 4

Packet Scheduling Determines the Order

In Which Packets in the Queue Are Served

  • Think about this! If there is no packet in the queue, do we need to do anything special other than FIFO? - No. We do not need to do anything special. The fact that no packet is queued up in the router means that there is no congestion at all. The bandwidth is larger than the traffic demand, there is not queueing delay, the delay-jitter is 0, the loss rate is 0%. Why would we need to do special actions?
  • Packet scheduling scheme can control the service that a packet would receive in the router. - E.g., more bandwidth for a user, less delay for a user’s packets, less loss rate for a user’s packets. 10- 5

The Conservation Law

  • The simplest possible scheduling discipline is first- come-first-serve (FCFS or FIFO).
  • As we noted before, FIFO cannot allocate some connections lower mean queueing delays than others.
  • A more sophisticated scheduling discipline can achieve this objective.
  • However, the sum of the mean queueing delay received by the set of multiplexed connections, weighted by their share of the link’s load, is independent of the scheduling disciplines.
  • That is, a scheduling discipline can reduce a particular connection’s mean delay, compared with FIFO, only at the expense of another connection. (^) 10- 7

Requirements for A Scheduling Discipline

  • Ease of implementation
    • If there are N connections passing through the router, we would want the router to make a scheduling decision in O(1), rather than O(N) steps.
    • Also, we would want the router to keep only O(1), rather than O(N) scheduling states.
  • Fairness and protection
    • Want the router to provide fair service and protection to contending users. E.g., FIFO does not provide protection.
  • Performance bounds
    • Want the router to provide performance bounds such as delay, bandwidth, loss rate.
  • Ease and efficiency of admission control
    • Want the router to quickly decide whether it can meet the new connection’s performance bounds without jeopardizing the performance of existing connections. 10- 8

The Max-min Fairness Definition

  • Informal Rules:
    • Resources are allocated in order of increasing demand
    • No source gets a resource share larger than its demand
    • Sources with unsatisfied demands get an equal share of the resource.
  • Formal definition:
    • X1, x2, x3, .. Xn are resource demands and x1 <= x2 <= x3 <= x4 …<= Xn
    • Let the server has a capacity of C.
    • Initially we give C/n to each sources.
    • If C/n > x1, then distribute the excess (C/n – x1)/(n-1) to source x2, x3, .., xn, else stop.
    • Now, source 2 receives C/n + (C/n-x1)/(n-1). If this is larger than its demand, distribute the excess to the other n-2 sources, else stop.
    • Repeat the above process. 10- 10Docsity.com

An Example of Max-min Bandwidth Allocation

  • Compute the max-min fair allocation for a set of four sources s1, s2, s3, and s4 with demands 2, 2.6, 4, 5 when the resource has a capability of 10. - 10/4 = 2.5. Because 2.5 > 2 (x1’s demand), we distribute the excess (2.5-2)/3 = 0.166 among s2, s3, and s4. - Now s2 receives 2.5+0.166 = 2.666, which > its demand 2.6, so we distribute the excess (2.666 – 2.6)/ among s3 and s4. - Now s3 receives 2.5 + 0.166 + 0.033 = 2.7, which is < its demand 4. - So s4 also receive 2.5 + 0.166 + 0.033 = 2.7. 10- 11

An Example of Max-min Bandwidth

 - 1/ Allocation - 3/ 
  • 1/ - 3/
    • 3/ - 1/ - 1/ - 10-

Performance Bounds

  • A bandwidth bound requires that a connection receive at least a minimum bandwidth from the network.
  • A delay bound is a deterministic or statistical bound on some parameters of the delay distribution. (e.g., worst-case delay, mean delay, 99-percentile delay)
  • A delay-jitter bound requires that the network bound the difference between the largest and smallest delays received by packets on a connection.
  • A loss bound requires that the fraction of packets lost on a connection be smaller than some bound. 10- 14

Delay-jitter Bound Is Important for Elastic Playback Applications

  • If the delay-jitter is bounded, the receiver can eliminate delay variation in the network by delaying the playback of the first packet by the delay-jitter bound in an elasticity buffer, then playing packets out from the connection a constant time after they were transmitted.
  • Thus, the larger the delay-jitter bound, the larger the elasticity buffer (the required size is play_rate * the delay-jitter bound).
  • Thus, if delay-jitter bound is too large, it is only useful for non-interactive streaming application (such as the VOD system), and not useful for interactive applications (such as video conference) (^) 10- 16

Removing Delay-jitter by Delaying

the Playback of the First Packet

10- 17

Work-conserving V.S. Non-work-

conserving Disciplines

  • A work-conserving scheduler is idle only when

there is no packet awaiting service.

  • In contrast, a non-work-conserving scheduler may

be idle even if it has packets to serve.

  • Why using a non-work-conserving scheduler?
    • By idling away time, it can make the traffic arriving at downstream routers more predictable.
    • Thus, the required buffer size and delay-jitter can be reduced

10- 19

Work-conserving Scheduler May Cause a

Smooth Traffic to Become Bursty Traffic

10- 20