100 likes | 256 Views
Scheduling. Determines which packet gets the resource. Enforces resource allocation to each flows. To be “Fair”, scheduling must: Keep track of how many packets each flow has sent Consider resources reserved for each flow. Basic requirements Isolation and sharing
E N D
Scheduling • Determines which packet gets the resource. • Enforces resource allocation to each flows. • To be “Fair”, scheduling must: • Keep track of how many packets each flow has sent • Consider resources reserved for each flow.
Basic requirements • Isolation and sharing • All flows are isolated in circuit switched networks. • In the current Internet, all flows share all resources at the packet level. • Ensuring QoS requires isolation • Too much isolation lower the resource utilization. • To support QoS in IP network, we need to be able to emulate the traffic isolation while sharing resources at the packet level. • Delay bounds: • IntServ requires scheduling to support delay bounds. • Delay bounds reflect the trade-off between isolation and sharing.
Basic requirements • Bandwidth allocation. • Fair-sharing policy. (What is fair?) • Max-min fair sharing maximize the minimum share of a flow • Resources are allocated in order of increasing demands • No flow is allocated more than its demand • Flows with unsatisfied demands get an equal share of the resource.
Basic requirements • Max-min fair sharing calculation • Calculate the initial fair share = total capacity / no. of flows • Flows that have a demand less than or equal to its fair share, allocate the flow’s demand • Allocate the fair share to flows with a larger demand (than the fair share). • Remove the satisfied flows and subtract the allocated capacities from the total capacity. • Repeat until all demands are met or capacity run out. • Can associate a weight with a flow • Example: Link speed 10Mbps to support 5 flows 1Mbps, 2Mbps, 3Mbps, 4Mbps, 5Mbps
Design choice: • Work-conserving versus non-work-conserving schedulers • Is the scheduler always busy when a packet is presented? • Simple priority: not sufficient by itself • Approaches • Fair-queuing: guaranteed to get its entitled bandwidth and may get more. • Deadline-based schemes: earliest deadline-first • Rate-based:
Weighted Fair Queuing (WFQ) • Supports bandwidth allocation and delay bounds • Widely implemented in routers for supporting QoS. • Fluid Model (Figure 2.19)
Generalized Processor Sharing (GPS) • An ideal fair-queuing algorithm based on the fluid model that provide exact max-min weighted fair sharing • Parameters: • N flows served by a server with service rate R • Ith flow has a weight a Wi • S(I, t1, t2) be the amount of data serviced for flow I during interval (t1, t2). • For each backlogged flow I and any other flow J, S(I, t1, t2)/S(j, t1, t2) >= Wi / Wj
Generalized Processor Sharing (GPS) • For each backlogged flow I and any other flow J, S(I, t1, t2)/S(j, t1, t2) >= Wi / Wj • The minimum fair share: Wi/sum(W) * R • The service that a flow receives in a GPS system is no worse than an equivalent dedicated link with a capacity of Wi/Sum(W) * R
Weighted Fair Queuing: • Packet by packet generalized processor sharing • Trying to emulated GPS • Calculate the departure time of a packet (finish time) • Schedule packet based on the finish time • Computing finish time is doable, but somewhat hard since flows can move between backlogged and nonbacklogged state. (See Figure 2.21) • Worst case delay is larger than GPS due to the packetization, but still bounded – this is the theoretical fundation for IntServ.
Weighted Fair Queuing variations: • Make it more “fair” • Deal with more situations • Simplify the calculation • Worst-case Fair WFQ (WF^2Q) • Hierarchical WFQ • Self-clocking Fair Queuing (SCFQ) • Weighted Round Robin (WRR) • Deficit Round Robin (DRR)