cnit - unigereti.dist.unige.it/reti/reti2/scheduling.pdf · cnit cnit-university of genoa research...

37
1 AN INTRODUCTION TO SCHEDULING DISCIPLINES IN COMPUTER COMMUNICATION NETWORKS 149 cnit CNIT-University of Genoa Research Unit D.I.S.T. Department of Communications, Computer and Systems Science University of Genova Via Opera Pia 13 16145 Genova, Italy Tel: +390103532983 Fax: +390103532154 E-mail: [email protected] , [email protected] AN INTRODUCTION TO SCHEDULING DISCIPLINES IN COMPUTER COMMUNICATION NETWORKS Franco Davoli and Riccardo Minciardi AN INTRODUCTION TO SCHEDULING DISCIPLINES IN COMPUTER COMMUNICATION NETWORKS 150 cnit SUMMARY Introduction Objectives and requirements of a scheduling policy The degrees of freedom in defining a scheduling policy Scheduling best-effort traffic Scheduling guaranteed-service traffic Conclusions

Upload: buithuy

Post on 16-Feb-2019

220 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: cnit - Unigereti.dist.unige.it/reti/Reti2/Scheduling.pdf · cnit CNIT-University of Genoa Research Unit D.I.S.T. Department of Communications, Computer and Systems Science University

1

AN INTRODUCTION TO SCHEDULING DISCIPLINES IN COMPUTER COMMUNICATION NETWORKS 149

cnit

CNIT-University of Genoa Research Unit

D.I.S.T.Department of Communications, Computer and Systems Science

University of Genova

Via Opera Pia 1316145 Genova, Italy

Tel: +390103532983 Fax: +390103532154

E-mail: [email protected], [email protected]

AN INTRODUCTION TO SCHEDULING DISCIPLINES IN COMPUTER

COMMUNICATION NETWORKS

Franco Davoli and Riccardo Minciardi

AN INTRODUCTION TO SCHEDULING DISCIPLINES IN COMPUTER COMMUNICATION NETWORKS 150

cnitSUMMARY

Introduction Objectives and requirements of a scheduling

policy The degrees of freedom in defining a scheduling

policy Scheduling best-effort traffic Scheduling guaranteed-service traffic Conclusions

Page 2: cnit - Unigereti.dist.unige.it/reti/Reti2/Scheduling.pdf · cnit CNIT-University of Genoa Research Unit D.I.S.T. Department of Communications, Computer and Systems Science University

2

AN INTRODUCTION TO SCHEDULING DISCIPLINES IN COMPUTER COMMUNICATION NETWORKS 151

cnit1-INTRODUCTION (1)

Within a computer network the competition for the access to a givenresource (a transmission link, a buffer, a printer, etc.) is a quitecommon situation. In general the competition takes place among a setof customer sources, and is due to the under sizing of the resource(which is usually characterized by high setup and maintenance costs)with respect to the demand, or, at least, to demand peaks.

For the sake of simplicity, we will focus only on the case where aresource is a transmission link, and the customers are packets to betransmitted, operating on a time-multiplexing basis. Thus, thescheduler will be also called as switch, as it turns the availability of theresource from one source to another. Besides, we will stress a basicfeature of computer network scheduling environments, that is, a multi-class traffic model, in which the customers are packets coming fromdifferent sources, with different sizes, arrival processes, andrequirements.

AN INTRODUCTION TO SCHEDULING DISCIPLINES IN COMPUTER COMMUNICATION NETWORKS 152

cnit1-INTRODUCTION (2)

In general, the considered scheduling problem can be posed asfollows:

given a transmission resource, and two or more flows of customerscompeting for service over such a resource, define the servicediscipline, i. e., the rule under which the various incoming customers,possibly waiting in an input buffer, are sequentially served.

Page 3: cnit - Unigereti.dist.unige.it/reti/Reti2/Scheduling.pdf · cnit CNIT-University of Genoa Research Unit D.I.S.T. Department of Communications, Computer and Systems Science University

3

AN INTRODUCTION TO SCHEDULING DISCIPLINES IN COMPUTER COMMUNICATION NETWORKS 153

cnit1-INTRODUCTION (3)

the number of different sources of customers, and theirdifferent requirements and priorities;

the statistics of the arrival processes of customers foreach class;

the statistics of the service (i.e., transmission) process foreach class of customers, i.e., each source; this is, of course,related to the statistics of the packet sizes (generally, thepacket size is not constant, even for the same source);

the buffer lengths (in general, a buffer is needed for eachsource);

the service discipline.

The basic characteristics of a scheduling model can thus besummarized as follows:

AN INTRODUCTION TO SCHEDULING DISCIPLINES IN COMPUTER COMMUNICATION NETWORKS 154

cnit

A service discipline may be preemptive, i.e., may admit theinterruption of the service over a single customer, e.g., in order to giveservice to a customer with higher priority, and, in this case, it mayallow the possibility to resume the work already performed over thefirst customer or not. If such a possibility of service interruption is notadmitted, the service discipline is said nonpreemptive.

The waiting lines of the customers waiting for service are in generalaccommodated in one or more buffers. Such buffers are obviouslyfinite, and then there is the problem of defining a flow control policy,to prevent buffer overflow. In some cases, it is more convenient todefine a discard policy, i. e. a policy which selects, among the waitingcustomers, some to drop, in order to obtain available room in thebuffer for new incoming customers.

1-INTRODUCTION (4)

Page 4: cnit - Unigereti.dist.unige.it/reti/Reti2/Scheduling.pdf · cnit CNIT-University of Genoa Research Unit D.I.S.T. Department of Communications, Computer and Systems Science University

4

AN INTRODUCTION TO SCHEDULING DISCIPLINES IN COMPUTER COMMUNICATION NETWORKS 155

cnit

This presentation will be focused on the analysis of the servicediscipline. In particular, the customers are assumed to be packetswaiting for transmission on a single link (the server), working on amultiplexing basis.

The service process for each class of packets is assumed to bedeterministic, i.e., the service time is known in advance for eachpacket, although it is not necessarily constant for each packet of thesame class. Besides, only nonpreemptive service disciplines will beconsidered.

In the following, no specification is made about the classes ofcustomers, i.e., the kinds of traffic to be considered. Only afundamental distinction will be taken, that between best-efforttraffic and guaranteed-service traffic.

1-INTRODUCTION (5)

AN INTRODUCTION TO SCHEDULING DISCIPLINES IN COMPUTER COMMUNICATION NETWORKS 156

cnit

Traffic flows belonging to the first category do not need to betransmitted within specific urgency. In other terms, the network (theserver) promises them only to attempt to deliver their packets as earlyas possible, without guaranteeing them any particular performancebound. Of course, however, the scheduling policy has to provide thebest possible service to all incoming flows.

Traffic flows which may be considered as belonging to this categoryare, for instance, most Internet traffic flows (for instance, e-mail).Using scheduling terminology, one can say that such a kind of traffic isnot affected by deadlines.

1-INTRODUCTION (6)

Page 5: cnit - Unigereti.dist.unige.it/reti/Reti2/Scheduling.pdf · cnit CNIT-University of Genoa Research Unit D.I.S.T. Department of Communications, Computer and Systems Science University

5

AN INTRODUCTION TO SCHEDULING DISCIPLINES IN COMPUTER COMMUNICATION NETWORKS 157

cnit

In contrast to best-effort traffic, guaranteed-service traffic needs abound on some performance index (e.g., the maximum delay). This isthe case, for instance, of voice bi-directional transmission, for which amaximum round-trip delay of 150 ms must be respected.

It is important to note that the performance of an end-to-endtransmission obviously depends on the service disciplines applied forany transmission over the various links which carry the packet fromsource to destination. Thus, the various service disciplines governingthe access to the various resources (links) in the network must becoordinated.

1-INTRODUCTION (7)

AN INTRODUCTION TO SCHEDULING DISCIPLINES IN COMPUTER COMMUNICATION NETWORKS 158

cnit

A scheduling discipline must satisfy several requirements,

among which are:

a) ease of implementation;

b) fairness and protection (for best effort traffic);

c) performance bounds (for guaranteed service traffic).

Such requirements are often contradictory, and some trade-off

must be sought to satisfy all of them.

2-OBJECTIVES AND REQUIREMENTS OF ASCHEDULING DISCIPLINE (1)

Page 6: cnit - Unigereti.dist.unige.it/reti/Reti2/Scheduling.pdf · cnit CNIT-University of Genoa Research Unit D.I.S.T. Department of Communications, Computer and Systems Science University

6

AN INTRODUCTION TO SCHEDULING DISCIPLINES IN COMPUTER COMMUNICATION NETWORKS 159

cnit

a. Ease of implementation

Consider that in a high-speed network, a server may need to pick thenext packet for transmission every few microseconds. Thus, there is avery little time to take a decision. That is why a scheduling disciplinefor servers in a high speed network has to be quite simple and mustnot require a great computational effort. That is the main differenceconcerning scheduling applications in telecommunication networks withrespect to other application fields, like manufacturing systems andlogistics, which are characterized by a much slower dynamics.

2-OBJECTIVES AND REQUIREMENTS OF ASCHEDULING DISCIPLINE (2)

AN INTRODUCTION TO SCHEDULING DISCIPLINES IN COMPUTER COMMUNICATION NETWORKS 160

cnit

Another important characteristics concerning the implementation of ascheduling policy is that concerning the dependence of thecomputational effort required on the number of connections (i. e., onthe number of traffic flows to transmit).

As a matter of fact, actually applied scheduling disciplines havecomputational requirements which do not heavily depend on thenumber of connections. However, a serious problem could be that ofstoring the system state, which may require a memory space which isconsiderably dependent on the number of connections.

2-OBJECTIVES AND REQUIREMENTS OF ASCHEDULING DISCIPLINE (3)

Page 7: cnit - Unigereti.dist.unige.it/reti/Reti2/Scheduling.pdf · cnit CNIT-University of Genoa Research Unit D.I.S.T. Department of Communications, Computer and Systems Science University

7

AN INTRODUCTION TO SCHEDULING DISCIPLINES IN COMPUTER COMMUNICATION NETWORKS 161

cnit

b. Fairness and protection

This is a highly important requirement for best effort traffic. A resourcesharing procedure is said fair if it satisfies the so-called max-minallocation criterion, that is, if the following conditions are satisfied:

° no source gets a resource share larger than its demand;

° sources with unsatisfied demands get an equal share of the resource.

2-OBJECTIVES AND REQUIREMENTS OF ASCHEDULING DISCIPLINE (4)

AN INTRODUCTION TO SCHEDULING DISCIPLINES IN COMPUTER COMMUNICATION NETWORKS 162

cnit

More specifically, a constructive procedure which fulfills such a criterionis the following.

Consider a set of traffic sources 1, …, n that have resource demandsx1, x2, ….,xn. Without loss of generality, suppose that x1 ≤x2 ≤ ….≤xn.Let the server have capacity C.

Then, begin with the first source, and assign (tentatively) to it acapacity C/n. As source 1 is that with the smallest demand, it mayhappen that C/n is greater that what source 1 wants, i.e., x1. Then, it isreasonable to remove the excess capacity C/n – x1 from the previousassignments, and to reassign it (always tentatively) to the remaining n-1 sources.

2-OBJECTIVES AND REQUIREMENTS OF ASCHEDULING DISCIPLINE (5)

Page 8: cnit - Unigereti.dist.unige.it/reti/Reti2/Scheduling.pdf · cnit CNIT-University of Genoa Research Unit D.I.S.T. Department of Communications, Computer and Systems Science University

8

AN INTRODUCTION TO SCHEDULING DISCIPLINES IN COMPUTER COMMUNICATION NETWORKS 163

cnit

Thus, each of such sources has a capacity corresponding to

C/n + (C/n –x1)/(n-1)

But this capacity may be still greater that x2, and thus the proceduremay go on in the same way as above, until each source gets no morethan what it asks for, and, if its demand was not satisfied, no less thanwhat any other source with a higher index got. This procedure is saidto perform a max-min fair allocation (or equivalently that it satisfiesthe max-min allocation criterion), as it maximizes the minimum shareof a source whose demand is not fully satisfied.

2-OBJECTIVES AND REQUIREMENTS OF ASCHEDULING DISCIPLINE (6)

AN INTRODUCTION TO SCHEDULING DISCIPLINES IN COMPUTER COMMUNICATION NETWORKS 164

cnit

A possible modification of the above criterion is the max-min weightedfair share allocation, in which each resource is assigned a weight. Sucha criterion is fulfilled if

° no source gets a resource share larger than its demand ;

° sources with unsatisfied demands get resource shares in proportionto their weights.

2-OBJECTIVES AND REQUIREMENTS OF ASCHEDULING DISCIPLINE (7)

Note that fairness is an intuitively desirable property for best-effort traffic. Forguaranteed service traffic, for which connections pay the network operator inproportion to their network usage, fairness is not a problem.

It is important to note that the fairness requirement should be attained also intime-varying traffic conditions, so that it is necessary to devise suitable self-adapting strategies of the scheduling disciplines in order to make them tuned tothe actual traffic conditions, also in a time-varying environment.

Page 9: cnit - Unigereti.dist.unige.it/reti/Reti2/Scheduling.pdf · cnit CNIT-University of Genoa Research Unit D.I.S.T. Department of Communications, Computer and Systems Science University

9

AN INTRODUCTION TO SCHEDULING DISCIPLINES IN COMPUTER COMMUNICATION NETWORKS 165

cnit

Protection means that the misbehavior by one source (by sendingpackets at a rate faster than its fair share) should not affect theperformance received by the other sources. For instance, a FCFSservice does not provide protection, as if a source sends packets toofast, there is no way of preventing the bandwidth reduction for theother sources. In contrast, a round-robin discipline provides protection,since it is based on individual buffers, and so the overflowing of asingle buffer does not have any influence on the performances obtainedby the other sources.

Note that a fair scheduler automatically provides protection, because it limits amisbehaving source to its fair share. However, the converse is not necessarilytrue.

2-OBJECTIVES AND REQUIREMENTS OF ASCHEDULING DISCIPLINE (8)

AN INTRODUCTION TO SCHEDULING DISCIPLINES IN COMPUTER COMMUNICATION NETWORKS 166

cnit

c. Performance bounds

An important requirement that has to be attained for guaranteed-service traffic is that concerning specific performance bounds to befulfilled.

Of course, to guarantee certain performances, the network operatorhas to reserve a certain amount of the resource to a specificconnection, under some contract clearly specifying the technical andeconomical conditions of the agreement. Actually such an issue shouldbe properly viewed within a network framework, i.e., considering amulti-hop transmission.

2-OBJECTIVES AND REQUIREMENTS OF ASCHEDULING DISCIPLINE (9)

Page 10: cnit - Unigereti.dist.unige.it/reti/Reti2/Scheduling.pdf · cnit CNIT-University of Genoa Research Unit D.I.S.T. Department of Communications, Computer and Systems Science University

10

AN INTRODUCTION TO SCHEDULING DISCIPLINES IN COMPUTER COMMUNICATION NETWORKS 167

cnit

Possible ways to specify performance bounds are:

deterministic: in this case, for every transmission, there is aspecific value, for instance, of the delay, which must not beovercome for each transmission;

statistical: in this case, the constraint is on the probability thata given parameter (say, again, the delay) is greater than a specificbound;

one-in-N: in this case, for every possible sequence of Npackets, the constraint is that the bound (again, on the delay) isnot overcome for more than a single packet.

2-OBJECTIVES AND REQUIREMENTS OF ASCHEDULING DISCIPLINE (10)

AN INTRODUCTION TO SCHEDULING DISCIPLINES IN COMPUTER COMMUNICATION NETWORKS 168

cnit

Possible performance parameters that can be affected by such boundsare:

bandwidth: a bandwidth bound requires that a connectionreceives at least a minimum bandwidth (measured over a pre-specified interval) by the network; this is generally the mostimportant bound for guaranteed-service connections;

fraction of packets lost on a connection (this may be of greaterimportance when studying admission control policies);

2-OBJECTIVES AND REQUIREMENTS OF ASCHEDULING DISCIPLINE (11)

Page 11: cnit - Unigereti.dist.unige.it/reti/Reti2/Scheduling.pdf · cnit CNIT-University of Genoa Research Unit D.I.S.T. Department of Communications, Computer and Systems Science University

11

AN INTRODUCTION TO SCHEDULING DISCIPLINES IN COMPUTER COMMUNICATION NETWORKS 169

cnit

delay: a delay bound is a deterministic bound or a statisticalbound concerning some parameter of the delay distribution, suchas the worst-case delay, the mean delay, or the α percentile delay;of course, the choice of one among such parameters can heavilydepend on the delay distribution function;

another important performance parameter concerning transmissiondelay is the delay-jitter, which is defined as the width of thesupport of the delay distribution function (i. e., the differencebetween the maximum and the minimum possible delay).

2-OBJECTIVES AND REQUIREMENTS OF ASCHEDULING DISCIPLINE (12)

AN INTRODUCTION TO SCHEDULING DISCIPLINES IN COMPUTER COMMUNICATION NETWORKS 170

cnit

There are several degrees of freedom in designing a schedulingdiscipline.

a. Definition of the priority levels

In general, in a set of N connections competing for a single resource, ndifferent priority levels are established. A higher-number level hashigher priority.

The number of the priority levels depends on the way that is chosen to clusterthe various traffic sources. For instance, in an integrated services network, atleast three levels are needed:

•a higher priority level for urgent messages, e. g., for network control;

•a medium level for guaranteed-service traffic;

•a lower level for best-effort traffic.

3-FUNDAMENTAL CHOICES IN DESIGNING ASCHEDULING DISCIPLINE (1)

Page 12: cnit - Unigereti.dist.unige.it/reti/Reti2/Scheduling.pdf · cnit CNIT-University of Genoa Research Unit D.I.S.T. Department of Communications, Computer and Systems Science University

12

AN INTRODUCTION TO SCHEDULING DISCIPLINES IN COMPUTER COMMUNICATION NETWORKS 171

cnit

The basic priority scheme imposes that no service is given to a packetcoming from a source with priority k if packets exist waiting for serviceand coming from sources having priority higher than k.

It is clear that a misbehaviour of sources with higher priority may haveheavy effects on the performances relevant to sources with lowerpriority. For this reason, proper definition of admission control policiesare in this case needed.

From the implementation point of view, it can be noted that the priorityscheduling disciplines are quite simple to implement, as they require only thatthe scheduler determines the higher order nonempty queue.

3-FUNDAMENTAL CHOICES IN DESIGNING ASCHEDULING DISCIPLINE (2)

AN INTRODUCTION TO SCHEDULING DISCIPLINES IN COMPUTER COMMUNICATION NETWORKS 172

cnit

b. Work-conserving versus non-work-conservingdisciplines

A work-conserving discipline is defined as a discipline where the serveris idle only when there is no packet (at any service level) awaiting forservice. A non-work-conserving discipline is a discipline where such aconstraint is not always fulfilled.

Intuitively, a non-work-conserving discipline seems to waste the transmissionresource. That is true. However, a non-work-conserving service discipline,through the introduction of idle times, makes the downstream traffic morepredictable, thus allowing the reduction of the delay-jitter relevant to a singleconnection.

3-FUNDAMENTAL CHOICES IN DESIGNING ASCHEDULING DISCIPLINE (3)

Page 13: cnit - Unigereti.dist.unige.it/reti/Reti2/Scheduling.pdf · cnit CNIT-University of Genoa Research Unit D.I.S.T. Department of Communications, Computer and Systems Science University

13

AN INTRODUCTION TO SCHEDULING DISCIPLINES IN COMPUTER COMMUNICATION NETWORKS 173

cnit

c. Defining eligibility times

The reduction of the delay jitter and the regularization of the traffic canbe achieved by defining a rule which makes a packet eligible for serviceonly from a certain time instant (eligibility time) onwards.

If a packet is not yet eligible, then, even if the service discipline should take itfor transmission, according to the priority levels defined, it is left in the waitingline, until it becomes eligible (provided that the server is available).

For instance, the eligibility rule may establish that the (k+1)-th packet comingfrom a certain connection becomes eligible only Δt seconds after the end of theservice of the k-th packet coming from the same connection. In this way, thedownstream server cannot receive packets at a rate faster than every Δtseconds.

3-FUNDAMENTAL CHOICES IN DESIGNING ASCHEDULING DISCIPLINE (4)

AN INTRODUCTION TO SCHEDULING DISCIPLINES IN COMPUTER COMMUNICATION NETWORKS 174

cnit

In this way, a scheduling rule that delays packets until they are eligiblefor transmission, although “wasting bandwidth”, makes the traffic inthe network more regular and easier to deal with.

The necessity of making the traffic regular can be easily understood, both interms of reduction in the buffer dimensions, and in the increase of the ease ofdetermining and guaranteeing performance bounds at the network level. Forinstance, as regards the delay jitter, its reduction on a single transmission isessential to have an acceptable delay jitter over an entire multi-hoptransmission.

3-FUNDAMENTAL CHOICES IN DESIGNING ASCHEDULING DISCIPLINE (5)

Page 14: cnit - Unigereti.dist.unige.it/reti/Reti2/Scheduling.pdf · cnit CNIT-University of Genoa Research Unit D.I.S.T. Department of Communications, Computer and Systems Science University

14

AN INTRODUCTION TO SCHEDULING DISCIPLINES IN COMPUTER COMMUNICATION NETWORKS 175

cnit

A first sensible way to define an eligibility rule is that of making thetraffic leaving the server conform to a given rate descriptor. Such adescriptor, for instance, may be the peak rate. Let us assume that thepackets have the same size, and that the scheduler wants to guaranteea particular peak rate. Then the eligibility time (i.e., the earliest timeinstant at which the service can start) E(k) for the k-th packet comingfrom a certain connection is defined as

E(1)=A(1)

E(k+1)=max(E(k)+Xmin, A(k+1)) k>1

where

A(k) is the arrival time (at the input buffer) of the k-th packet

Xmin is the inverse of the peak rate, i. e., the time to serve a packet atthe peak rate.

3-FUNDAMENTAL CHOICES IN DESIGNING ASCHEDULING DISCIPLINE (6)

AN INTRODUCTION TO SCHEDULING DISCIPLINES IN COMPUTER COMMUNICATION NETWORKS 176

cnit

A second possible way to define the eligibility rule is that ofintroducing a delay-jitter regulator. A scheduler implementing thisregulator guarantees that the sum of the queuing delay in the previousswitch and that the sum of the delay in the current switch is constant.This may be accomplished as follows. Let

E(i,k) be the eligibility time of the k-th packet at the i-th switch

Then,

E(0,k)=A(0,k)

E(i+1, k)=E(i,k) + Di + Li,i+1

where

Di is the delay bound at switch i

Li,i+1 is the largest possible delay in the transmission link betweenswitch i and switch i+1

A(0,k) is the arrival time of packet k at the first switch.

3-FUNDAMENTAL CHOICES IN DESIGNING ASCHEDULING DISCIPLINE (7)

Page 15: cnit - Unigereti.dist.unige.it/reti/Reti2/Scheduling.pdf · cnit CNIT-University of Genoa Research Unit D.I.S.T. Department of Communications, Computer and Systems Science University

15

AN INTRODUCTION TO SCHEDULING DISCIPLINES IN COMPUTER COMMUNICATION NETWORKS 177

cnit

Thus, whereas packet k is eligible for service in the same moment itarrives at the 0-th switch, at subsequent switches it becomes eligiblefor service, only after a fixed time delay of length Di + Li,i+1 , which isthe longest possible delay at the previous switch and in the previouslink.

Obviously, in this way the traffic leaving the (i+1)-th switch is characterized byexactly the same pattern as that leaving the i-th switch.

The implementation of a delay-jitter regulator poses some difficulties, as itrequires to know an upper bound to the propagation delay for every link, andalso that the network maintains a clock synchrony at adjacent switches at alltimes. Then, owing to the possibility of clock drift out of synchrony, there is thenecessity of a mechanism to maintain clock synchrony in the network.

3-FUNDAMENTAL CHOICES IN DESIGNING ASCHEDULING DISCIPLINE (8)

AN INTRODUCTION TO SCHEDULING DISCIPLINES IN COMPUTER COMMUNICATION NETWORKS 178

cnit

The implementation of non-work-conserving scheduling disciplines, likethat corresponding to the delay-jitter regulator, provides the advantageof regularizing the traffic. However, some arguments can be raisedagainst the application of such disciplines, that are actually not tooused in practice.

First, the use of non-work-conserving disciplines reduces the delay-jitter, at theexpense of increasing the mean-delay of a connection.

Second, non-work-conserving schedulers waste bandwidth.

3-FUNDAMENTAL CHOICES IN DESIGNING ASCHEDULING DISCIPLINE (9)

Page 16: cnit - Unigereti.dist.unige.it/reti/Reti2/Scheduling.pdf · cnit CNIT-University of Genoa Research Unit D.I.S.T. Department of Communications, Computer and Systems Science University

16

AN INTRODUCTION TO SCHEDULING DISCIPLINES IN COMPUTER COMMUNICATION NETWORKS 179

cnit

d. Degree of aggregation

A third basic choice in defining the scheduler is the degree at whichindividual connections are aggregated in deciding their service order.The scheduler treats all packets from connections in the same class inthe same way. Thus, there is the need of a single state variable perclass of connections.

Of course in defining the aggregation among the connections, asuitable trade-off is to be sought between the need of reducing theamount of state information to be stored and used by the scheduler,and the necessity of keeping a certain level of differentiation in theservice levels offered to the connections.

However, the main problem related to aggregation is that connections in thesame class are not protected from each other (in some sense, the degree ofaggregation is inversely proportional to the degree of protection).

3-FUNDAMENTAL CHOICES IN DESIGNING ASCHEDULING DISCIPLINE (10)

AN INTRODUCTION TO SCHEDULING DISCIPLINES IN COMPUTER COMMUNICATION NETWORKS 180

cnit

e. Service order within a priority level and aggregationclass

The final basic degree of freedom is that concerning the choice of theorder in which the scheduler serves packets from connections at thesame priority level. Two-fundamental choices are possible:

•serving packets in the order they arrive (FCFS discipline);

•serving packets out of order, according to a per-packet service tag.

Using service tags, it is possible to assign a packet a lower tag value than othersin the queue, if one wants that it has a low delay. Besides, FCFS service is notmax-min fair, whereas using service tags it is possible to define schedulingdisciplines which are close to max-min fairness.

3-FUNDAMENTAL CHOICES IN DESIGNING ASCHEDULING DISCIPLINE (11)

Page 17: cnit - Unigereti.dist.unige.it/reti/Reti2/Scheduling.pdf · cnit CNIT-University of Genoa Research Unit D.I.S.T. Department of Communications, Computer and Systems Science University

17

AN INTRODUCTION TO SCHEDULING DISCIPLINES IN COMPUTER COMMUNICATION NETWORKS 181

cnit

4-SCHEDULING BEST-EFFORT TRAFFIC (1)

a. First In First Out

The simplest possible scheduling algorithm is First In First Out(FIFO), or First Come First Served (FCFS). In this case, thescheduler transmits packets in the order they arrive (and dropspackets that arrive when the queue is full).

Thus, it cannot allocate some users lower mean delay thanothers. Besides, the delay-jitter tends to increase dramaticallywith the number of hops, since the queuing delays of the packetsrelevant to the different hops are uncorrelated.

AN INTRODUCTION TO SCHEDULING DISCIPLINES IN COMPUTER COMMUNICATION NETWORKS 182

cnit4-SCHEDULING BEST-EFFORT TRAFFIC (2)

There is a possible upgrade to the basic FIFO algorithm, which iscalled FIFO+. In this case, for each hop, the average delay seen bythe packets in each class at that node is measured. Then, for eachpacket, the difference is computed between its particular delay andthe class average. This difference is then added (subtracted) to(from) a field in the header of the packet, which thus accumulatesthe total offset of this packet from the average for its class.

This field allows each node to compute when the packet should havearrived if it had indeed been given average service.

The node then schedules the packet as it had arrived at the expectedaverage time.

Thus, the queue is ordered by these expected arrival times, ratherthan by the actual arrival times, as basic FIFO does.

Page 18: cnit - Unigereti.dist.unige.it/reti/Reti2/Scheduling.pdf · cnit CNIT-University of Genoa Research Unit D.I.S.T. Department of Communications, Computer and Systems Science University

18

AN INTRODUCTION TO SCHEDULING DISCIPLINES IN COMPUTER COMMUNICATION NETWORKS 183

cnit

4-SCHEDULING BEST-EFFORT TRAFFIC (3)

The Stop-and-go scheduler uses a framing strategy. By thisterm, a strategy is intended in which the time axis is dividedinto frames, which are periods of some constant length T.Stop-and-go defines departing and arriving frames for eachlink.

At each switch, the arriving frame of each incoming link ismapped to the departing frame of the output link.

The transmission of a packet that has arrived on any link lduring a frame f must always be postponed until the beginningof a new frame.

b. Stop-and-go

AN INTRODUCTION TO SCHEDULING DISCIPLINES IN COMPUTER COMMUNICATION NETWORKS 184

cnit

4-SCHEDULING BEST-EFFORT TRAFFIC (4)

Stop-and-go ensures that packets on the same frame at thesource stay in the same frame throughout the network. If thetraffic at the source is (r,T)-smooth (i.e., no more than rT bitsare transmitted during any frame of size T), it satisfies thesame characterization throughout the network.

By maintaining traffic characteristics throughout the network,end-to-end delay bounds can be guaranteed in a network ofarbitrary topology as long as each local server can ensure localdelay bounds for traffic characterized by the (r,T)-smoothspecification.

Page 19: cnit - Unigereti.dist.unige.it/reti/Reti2/Scheduling.pdf · cnit CNIT-University of Genoa Research Unit D.I.S.T. Department of Communications, Computer and Systems Science University

19

AN INTRODUCTION TO SCHEDULING DISCIPLINES IN COMPUTER COMMUNICATION NETWORKS 185

cnit4-SCHEDULING BEST-EFFORT TRAFFIC (5)

The framing strategy introduces the problem of jointly dealingwith delay bound and bandwidth allocation granularity. Namely,the delay of any packet at a single switch is bounded by twotime frames. Thus, to reduce the delay, a smaller T is desired.However, as T is also used to specify traffic, it is tied tobandwidth allocation granularity. That, is, to have moreflexibility in allocating bandwidth, a larger T is preferred.

To get around this trade-off problem, a generalized version ofstop-and-go, characterized by multiple frame sizes, can beused. In this scheme, the time axis is divided into a hierarchicalframing structure (larger frames, which include smaller ones).

Then, each connection is associated to a certain level offraming, or packets coming from the same connection can havedifferent frame levels.

AN INTRODUCTION TO SCHEDULING DISCIPLINES IN COMPUTER COMMUNICATION NETWORKS 186

cnit

c. Generalized processor sharing

Generalized Processor Sharing (GPS) is a basic ideal schedulingdiscipline (actually not practically implementable), which ensures amax-min fair allocation rate.

Intuitively, Generalized Processor Sharing (GPS) serves packets as ifthey were in separate logical queues, visiting each nonempty queue inturn (round-robin) and serving an infinitesimally small amount of datafrom each queue, so that, in any finite time interval, it can visit everylogical queue at least once.

Connections may be associated to service weights, so that the amountof service obtained, when they have packets awaiting for service, canbe determined on the basis of such weights. If a connection has noawaiting packets, then it is simply skipped, and the next non-emptyqueue is considered.

4-SCHEDULING BEST-EFFORT TRAFFIC (6)

Page 20: cnit - Unigereti.dist.unige.it/reti/Reti2/Scheduling.pdf · cnit CNIT-University of Genoa Research Unit D.I.S.T. Department of Communications, Computer and Systems Science University

20

AN INTRODUCTION TO SCHEDULING DISCIPLINES IN COMPUTER COMMUNICATION NETWORKS 187

cnit

The application of the GPS discipline ensures max-min fair share bandwidthallocation.

To justify this statement, suppose that N connections with equal weights senddata infinitely fast to a scheduler. Then, the server allocates each of them a 1/Nfraction of the bandwidth, which, of course, is a max-min fair share.

Now, suppose that one of the sources, say A, sends data more slowly than itsshare; thus, its queue is sometimes empty, and then the scheduler skips thisconnection. Because of the round-robin scheduler behaviour, the bandwidthunused by this source is then equally distributed to the other sources.

Now, suppose that another source, say B, has an incoming rate that is largerthan 1/N, but smaller than the new service rate it receives because source A hasa rate lower than 1/N. In this case, also the queue of B will be occasionallyempty, and thus there will be an excess bandwidth that is assigned to theremaining sources (different from A and B).

Continuing in this fashion, it is clear that every connection that has a demandsmaller than its fair share gets allocated its demand, whereas every connectionthat has a greater demand gets an equal share. Thus GPS achieves max-minfair-share. Besides, as max-min fair share implies protection, GPS also offersprotection.

4-SCHEDULING BEST-EFFORT TRAFFIC (7)

AN INTRODUCTION TO SCHEDULING DISCIPLINES IN COMPUTER COMMUNICATION NETWORKS 188

cnit

A more formal definition of the GPS discipline is the following. Let w1,w2,…,wN be the weights of the various connections to be served by aGPS server. Let us call backlogged a connection which has a nonemptyqueue. Then, in any interval (however small) [t1, t2] the server servesan amount of data S(i, t1, t2) of any connection i, which is backloggedin such a time interval, so that

(1)

for any other connection j (either backlogged or not). Thus a GPSscheduler ensures that non-backlogged connections receive as muchservice as they can use, whereas backlogged connections (i.e.,connections that receive less service than they could use, and thenhave a nonempty queue) share the remaining bandwidth in proportionto their weights. Thus, again, GPS ensures max-min fairness.

4-SCHEDULING BEST-EFFORT TRAFFIC (8)

Page 21: cnit - Unigereti.dist.unige.it/reti/Reti2/Scheduling.pdf · cnit CNIT-University of Genoa Research Unit D.I.S.T. Department of Communications, Computer and Systems Science University

21

AN INTRODUCTION TO SCHEDULING DISCIPLINES IN COMPUTER COMMUNICATION NETWORKS 189

cnit

Another point of view to understand the GPS scheduling rule is thefollowing. Consider a set of N connections, labeled 1,2, …, N, whichshare a common outgoing link of a GPS server. Let ri be the minimumallocated rate for connection i=1,…,N. The scheduling policy shouldguarantee that

(2)

where r is the capacity of the outgoing link. Then, let B(t) be the set ofbacklogged connections at time t. A generic backlogged connection iwill be allocated a service rate gi(t) at time t such that

(3)

4-SCHEDULING BEST-EFFORT TRAFFIC (9)

AN INTRODUCTION TO SCHEDULING DISCIPLINES IN COMPUTER COMMUNICATION NETWORKS 190

cnit4-SCHEDULING BEST-EFFORT TRAFFIC (10)

Example.

Consider a scheduler that has to serve 3 connections, labelled 1, 2, 3, forwhich

r1=1/6r2=1/3r3=1/2

and assume that the capacity of the server is r=1.Suppose moreover that each packet has a fixed length that needs exactlyone unit of time to transmit.

Then assume that at time t=0, packets begin to arrive at connection 1, at arate of one packet per unit time.At time t=1, packets start to arrive also at connection 2, at the same rate; attime t=3, packets starts to arrive also at connection 3, again at the rate ofone packet per unit time.

Page 22: cnit - Unigereti.dist.unige.it/reti/Reti2/Scheduling.pdf · cnit CNIT-University of Genoa Research Unit D.I.S.T. Department of Communications, Computer and Systems Science University

22

AN INTRODUCTION TO SCHEDULING DISCIPLINES IN COMPUTER COMMUNICATION NETWORKS 191

cnit

4-SCHEDULING BEST-EFFORT TRAFFIC (11)

Then, the GPS server will allocate a service rate to each connection asfollows:

g1 = 1, 0<t≤1g1 = 1/3, 1<t≤3g1 = 1/6, t>3

g2 = 0, 0<t≤1g2 = 2/3, 1<t≤3g2 = 1/3, t>3

g3 = 0, 0<t≤3g3 = 1/2, t>3

AN INTRODUCTION TO SCHEDULING DISCIPLINES IN COMPUTER COMMUNICATION NETWORKS 192

cnit

4-SCHEDULING BEST-EFFORT TRAFFIC (12)

Note again that it is assumed that a GPS scheduler is able toserve connections instantaneously and that the capacity ofthe outgoing link can be split infinitesimally and allocated tothe various connections.

However, in real systems only one connection can be servedat each time and packets cannot be split into smaller units.

Page 23: cnit - Unigereti.dist.unige.it/reti/Reti2/Scheduling.pdf · cnit CNIT-University of Genoa Research Unit D.I.S.T. Department of Communications, Computer and Systems Science University

23

AN INTRODUCTION TO SCHEDULING DISCIPLINES IN COMPUTER COMMUNICATION NETWORKS 193

cnit

d. Weighted round-robin

As the GPS discipline is an ideal one, it is necessary to introduce someimplementable policies, which can emulate the GPS discipline. Thesimplest one is the Weighted-Round-Robin (WRR) discipline.

A simple round-robin discipline, prescribing that the scheduler serves inturn a packet from each nonempty connection queue, approximatesGPS reasonably well when all connections have equal weights and allpackets have the same size.

In case the sources have different weights, the WRR discipline serves aconnection in proportion to its weight.

If packets from different connections have different sizes, the WRRdiscipline behaves as above, but dividing the weight of each connectionby its mean packet size to obtain a normalized set of weights.

4-SCHEDULING BEST-EFFORT TRAFFIC (13)

AN INTRODUCTION TO SCHEDULING DISCIPLINES IN COMPUTER COMMUNICATION NETWORKS 194

cnit

Note that the knowledge of the mean packet size may in general be a problem,especially in all cases in which the packet size of a source is a random variablewith an unknown distribution.

A second problem concerning the application of the WRR discipline is that it isfair only over time scales quite longer than a round time. This is related to thedifficulty of approximating, through a real scheduling discipline, which ischaracterized by an intrinsic granularity (as they serve packets and notinfinitesimal quantities), an ideal scheduling discipline like GPS. Thus, if aconnection has a small weight, or the number of connections is quite large, aconnection can suffer for long periods of unfairness.

Thus, more complex scheduling disciplines are needed in the case of variable-packet sizes, and/or slow speed networks. However, in high-speed ATMnetworks, with fixed packet sizes and short round times, GPS emulation usingWRR generally provides quite good results.

4-SCHEDULING BEST-EFFORT TRAFFIC (14)

Page 24: cnit - Unigereti.dist.unige.it/reti/Reti2/Scheduling.pdf · cnit CNIT-University of Genoa Research Unit D.I.S.T. Department of Communications, Computer and Systems Science University

24

AN INTRODUCTION TO SCHEDULING DISCIPLINES IN COMPUTER COMMUNICATION NETWORKS 195

cnit

There is also a hierarchical version of the basic round-robin scheme,which is named Hierarchical round-robin (HRR). Like the stop-and-goscheme, it uses a multilevel framing strategy.

A slot in one level can be allocated either to a connection or to a lowerlevel frame. The server cycles through the frames and serves packetsaccording to the assignment of slots.

If the server cycles though a slot assigned to a connection, one packetfrom that connection is transmitted; if it cycles through a slot assignedto a lower level frame, it serves one slot from the lower level frame inthe same way.

4-SCHEDULING BEST-EFFORT TRAFFIC (15)

AN INTRODUCTION TO SCHEDULING DISCIPLINES IN COMPUTER COMMUNICATION NETWORKS 196

cnit

e. Deficit round-robin

A modification of the WRR discipline allows to consider the case ofvariable (unpredictable) packet sizes without the necessity of knowingin advance the mean packet size of each connection.

Such a discipline is called Deficit Round-Robin (DRR). A DRR schedulerassociates each connection i with a deficit counter DCi initialized to 0.

The scheduler visits each connection in turn and tries to serve onequantum ΔQ of bits from each visited connection.

The packet at the head of the queue relevant to connection i is servedor not according to a comparison between its size Si and the sum of thedeficit counter plus the quantum ΔQ.

4-SCHEDULING BEST-EFFORT TRAFFIC (16)

Page 25: cnit - Unigereti.dist.unige.it/reti/Reti2/Scheduling.pdf · cnit CNIT-University of Genoa Research Unit D.I.S.T. Department of Communications, Computer and Systems Science University

25

AN INTRODUCTION TO SCHEDULING DISCIPLINES IN COMPUTER COMMUNICATION NETWORKS 197

cnit

Actually,

° if ΔQ + DCi ≥Si

then, the packet is served, and the deficit counter is updated as follows

DCi ←ΔQ + DCi - Si

° if ΔQ + DCi <Si

then, the packet is not served, and the deficit counter is updated asfollows

DCi ←ΔQ + DCi

° if there is no packet waiting for service in queue i, then DCi is simplyzeroed.

4-SCHEDULING BEST-EFFORT TRAFFIC (17)

AN INTRODUCTION TO SCHEDULING DISCIPLINES IN COMPUTER COMMUNICATION NETWORKS 198

cnit

EXAMPLE

Consider a scheduler which has to serve three connections A, B, C. Suppose the quantum ΔQ is fixedto 1000 bytes, and that the queues corresponding to the three connections contain only one packeteach, namely Sa=1500, Sb=500, Sc=1300. As required by the scheduling rule, the deficit counters areinitialized as DCa= DCb = DCc=0. For the sake of simplicity, assume that no new packet arrives at thethree queues, at least for the first rounds of the scheduling procedure.

Then, according to the above rule, at the first round,

• the packet in queue A is not transmitted, and DCa is set equal to 1000

• the packet in queue B is transmitted, and DCb is set equal to 500

• the packet in queue C is not transmitted, and DCc is set equal to 1000

whereas, at the second round,

• the packet in queue A is transmitted, and DCa is set equal to 500

• since there is no more packet in queue B, DCb is set to 0

• the packet in queue C is transmitted, and DCc is set equal to 700.

4-SCHEDULING BEST-EFFORT TRAFFIC (18)

Page 26: cnit - Unigereti.dist.unige.it/reti/Reti2/Scheduling.pdf · cnit CNIT-University of Genoa Research Unit D.I.S.T. Department of Communications, Computer and Systems Science University

26

AN INTRODUCTION TO SCHEDULING DISCIPLINES IN COMPUTER COMMUNICATION NETWORKS 199

cnit

A weighted version of the Deficit Round Robin (DRR) scheduling ruleprescribes that the quantum service to be considered, at each round,for connection i is wiΔQ, being wi the weight corresponding toconnection i.

If one wants to assure that the DRR scheduler sends at least onepacket per round, then it is necessary to fix the quantum size to be atleast equal to the maximum packet size.

The implementation of the DRR scheduler is quite easy, since amaximum amount of bits per connection has to be transmitted at eachround. Note, however, that also DRR is unfair at small time scales, orwhen the packet sizes are small.

4-SCHEDULING BEST-EFFORT TRAFFIC (19)

AN INTRODUCTION TO SCHEDULING DISCIPLINES IN COMPUTER COMMUNICATION NETWORKS 200

cnit

f. Weighted fair queuing

The Weighted fair queuing (WFQ) service discipline (also calledpacketized GPS) is an approximation of the GPS discipline which doesnot make any assumption on infinitesimal packet size (as GPS does),nor has the need to know in advance a connection’s mean packet size.

The basic idea of WFQ is to compute the time a packet would completeservice had we been serving packets with a GPS server, then servepackets in order of these finishing times.

In WFQ, the server assigns the departure time of a packet in thesimulated GPS server as the timestamp of the packet, and then theserver transmits packets in increasing order of these timestamps.

WFQ uses the concept of virtual time to track the progress of GPS thatwill lead to a practical implementation of the technique.

4-SCHEDULING BEST-EFFORT TRAFFIC (20)

Page 27: cnit - Unigereti.dist.unige.it/reti/Reti2/Scheduling.pdf · cnit CNIT-University of Genoa Research Unit D.I.S.T. Department of Communications, Computer and Systems Science University

27

AN INTRODUCTION TO SCHEDULING DISCIPLINES IN COMPUTER COMMUNICATION NETWORKS 201

cnit

Define an event as any arrival or departure of a packet (in a givenconnection) from the GPS server, and let tj be the time instant at whichthe j-th event occurs. Let t1=0 be the time instant corresponding to thefirst event. Now, observe that, for each j=1, 2, 3,…, the set ofconnections that are busy (i.e., whose queues are nonempty) in thetime interval (tj-1, tj) is fixed. Denote this set as Bj

The virtual time V(t) is defined so that it is zero in all time intervals inwhich the server is idle. Consider any time interval in which the serveris busy, and let it begin at time instant zero. Then, the definition of V(t)prescribes that it evolves according to the following rule:

(4)

for τ≤ tj-tj-1, j=2,3,…

4-SCHEDULING BEST-EFFORT TRAFFIC (21)

AN INTRODUCTION TO SCHEDULING DISCIPLINES IN COMPUTER COMMUNICATION NETWORKS 202

cnit4-SCHEDULING BEST-EFFORT TRAFFIC (22)

Where:

° r is the overall capacity of the outgoing link;

° ri is the minimum allocated rate (bandwidth) to connection i.

Note that the rate of change of V is

(5)

and that each backlogged connection i receives service at rate

(6)

Thus, it is possible to say that the rate of change (of increase) of V(t) is equal tothe marginal rate at which backlogged connections receive service.

Page 28: cnit - Unigereti.dist.unige.it/reti/Reti2/Scheduling.pdf · cnit CNIT-University of Genoa Research Unit D.I.S.T. Department of Communications, Computer and Systems Science University

28

AN INTRODUCTION TO SCHEDULING DISCIPLINES IN COMPUTER COMMUNICATION NETWORKS 203

cnit4-SCHEDULING BEST-EFFORT TRAFFIC (23)

Now, suppose that the k-th packet from source i arrives at time ai,k andhas length Li,k. Then, denote

° Si,k the virtual start time, i. e., the virtual time instant at which theservice of this packet begins;

° Fi,k the virtual finish time, i. e., the virtual time instant at which theservice of this packet ends.

Then, defining Fi,0=0 for all i, the following relations allow thecomputation of such quantities

(7)

(8)

where ai,k is the arrival time of the k-th packet coming from connectioni.

AN INTRODUCTION TO SCHEDULING DISCIPLINES IN COMPUTER COMMUNICATION NETWORKS 204

cnit

4-SCHEDULING BEST-EFFORT TRAFFIC (24)

Note that the function of V(ai,k) is that of resetting the value ofSi,k when queue i becomes active, i.e., receives a packet afterbeing empty for a while.

The server transmits the packets in the order given by thevirtual finish times Fi,k.

Page 29: cnit - Unigereti.dist.unige.it/reti/Reti2/Scheduling.pdf · cnit CNIT-University of Genoa Research Unit D.I.S.T. Department of Communications, Computer and Systems Science University

29

AN INTRODUCTION TO SCHEDULING DISCIPLINES IN COMPUTER COMMUNICATION NETWORKS 205

cnit

4-SCHEDULING BEST-EFFORT TRAFFIC (25)

A possible variant of the WFQ scheme is the Self-clocked fairqueuing (SCFQ) one. In this case, the scheduler updates itsvirtual time only when a packet departs, and the assignedvalue is equal to the timestamp of that packet.

In this way, the necessity is avoided of implementing thealgorithm to compute the virtual time as in the WFQ scheme.

AN INTRODUCTION TO SCHEDULING DISCIPLINES IN COMPUTER COMMUNICATION NETWORKS 206

cnit4-SCHEDULING BEST-EFFORT TRAFFIC (26)

Another possible variant of WFQ is the Worst-case fairweighted fair queuing (WF2Q) scheme. In the basic WFQscheme, when the server chooses the next packet fortransmission at time t, it selects, among all packets that arewaiting at time t, the first packet that would complete servicein the corresponding GPS scheme.

Instead, in a WF2Q, when the new packet is chosen for serviceat time t, rather than selecting it among all packets waiting,

the server only considers the set of packets that have started(and possibly finished) receiving service in the correspondingGPS system at time t,

and then selects the packet among them that would completeservice first in the corresponding GPS system.

Page 30: cnit - Unigereti.dist.unige.it/reti/Reti2/Scheduling.pdf · cnit CNIT-University of Genoa Research Unit D.I.S.T. Department of Communications, Computer and Systems Science University

30

AN INTRODUCTION TO SCHEDULING DISCIPLINES IN COMPUTER COMMUNICATION NETWORKS 207

cnit5-SCHEDULING GUARANTEED-SERVICE

CONNECTIONS (1)

a. Weighted fair queuing

The WFQ discipline can also be used to schedule guaranteed-servicetraffic. In fact, note that connection i is guaranteed to use a fraction

of the total available bandwidth.

A more interesting result is that due to Parekh and Gallager (1993,1994), which can be stated as follows.

AN INTRODUCTION TO SCHEDULING DISCIPLINES IN COMPUTER COMMUNICATION NETWORKS 208

cnit5-SCHEDULING GUARANTEED-SERVICE

CONNECTIONS (2)

Result 5.1. Let i be a leaky-bucket constrained source, i. e., a sourcecharacterized by two parameters σi and ρi such that in any interval oflength t, it can transmit at most σi+ρit bits. Let the traffic originatingfrom that source pass through K schedulers (each one corresponding toa link), where the k-th scheduler has a link rate r(k). Let g(i,k) be theservice rate assigned to the connection corresponding to traffic source iat the k-th scheduler, assuming that it behaves following the GPS rule,where

(9)Moreover let

g(i)=min (g(i,k), k=1,…,K)

Bk being the set of backlogged connections, as regards link k, and ri(k)the minimum guaranteed bandwidth for connection i over link k.

Page 31: cnit - Unigereti.dist.unige.it/reti/Reti2/Scheduling.pdf · cnit CNIT-University of Genoa Research Unit D.I.S.T. Department of Communications, Computer and Systems Science University

31

AN INTRODUCTION TO SCHEDULING DISCIPLINES IN COMPUTER COMMUNICATION NETWORKS 209

cnit5-SCHEDULING GUARANTEED-SERVICE

CONNECTIONS (3)

Assume that g(i) is greater than or equal to ρi (otherwise the queue atone of the schedulers will grow unbounded). Assume moreover that thelargest packet size originating from source i is Pmaxi and that thelargest packet size allowed in the network is Pmax.

Then, independently of the behaviour of other sources (even if they arenot leaky-bucket constrained), the worst-case end-to-end queuing andtransmission delay (provided that any switch implements a WFQscheduling rule) from source i to final destination, namely Di*, isbounded by

(10)

AN INTRODUCTION TO SCHEDULING DISCIPLINES IN COMPUTER COMMUNICATION NETWORKS 210

cnit5-SCHEDULING GUARANTEED-SERVICE

CONNECTIONS (4)

The above result shows that, with a suitable choice of parameters, anetwork governed at each server by a WFQ discipline can provideworst-case end-to-end guarantees. If a source needs a particularworst-case end-to-end delay bound, this can be achieved by properlyselecting the minimum guaranteed bandwidths ri(k) in order to havesuitable values of coefficients g(i,k), allowing the attainment of thedesired bound.

However, note that WFQ discipline does not provide a delay-jitterbound smaller than the delay bound itself. Moreover, to obtain a lowerdelay bound, a connection must have a larger reservation, even if itcannot use all the reserved bandwidth.

Page 32: cnit - Unigereti.dist.unige.it/reti/Reti2/Scheduling.pdf · cnit CNIT-University of Genoa Research Unit D.I.S.T. Department of Communications, Computer and Systems Science University

32

AN INTRODUCTION TO SCHEDULING DISCIPLINES IN COMPUTER COMMUNICATION NETWORKS 211

cnit5-SCHEDULING GUARANTEED-SERVICE

CONNECTIONS (5)

b. Virtual clock scheduling

A virtual clock (VC) scheduler stamps packets with a tag, and packetsare served in an order according to their tags, as in WFQ. However, tagvalues are not computed in order to emulate the GPS discipline.

Specifically, the finish number is computed as in the WFQ discipline,but with real time instead of virtual time

(11)

(12)

where ai,k is again the arrival time of the k-th packet coming fromconnection i.

AN INTRODUCTION TO SCHEDULING DISCIPLINES IN COMPUTER COMMUNICATION NETWORKS 212

cnit

5-SCHEDULING GUARANTEED-SERVICE CONNECTIONS (6)

From the implementation point of view, VC is easier than WFQ.Besides, it can be shown that when all connections arebacklogged, VC and WFQ provide identical service and identicalworst-case end-to-end delay bounds.

However, when used for best-effort connections, the relativefairness bound for VC is infinity. In other words, when twoconnections are backlogged, one of them may obtain a throughputinfinitely greater than another.

Page 33: cnit - Unigereti.dist.unige.it/reti/Reti2/Scheduling.pdf · cnit CNIT-University of Genoa Research Unit D.I.S.T. Department of Communications, Computer and Systems Science University

33

AN INTRODUCTION TO SCHEDULING DISCIPLINES IN COMPUTER COMMUNICATION NETWORKS 213

cnit5-SCHEDULING GUARANTEED-SERVICE

CONNECTIONS (7)

c. Delay-earliest-due-date and jitter-earliest-due-date

Classical EDD (earliest due date) scheduling assigns each packet adeadline, and then the service order of packets is that of increasingdeadlines. If the scheduler is overcommited, then some packets misstheir deadlines and are said tardy.

Of course, to ensure a lower delay to an incoming packet, it isnecessary to assign it a due date close to its arrival time.

In delay-EDD, the process by which the scheduler assigns deadlines topackets may be explained as follows. Each source negotiates a servicecontract with the scheduler. The contract states that if a source obeysa peak-rate descriptor, then every packet on that connection receives aworst-case delay smaller than some bound.

AN INTRODUCTION TO SCHEDULING DISCIPLINES IN COMPUTER COMMUNICATION NETWORKS 214

cnit5-SCHEDULING GUARANTEED-SERVICE

CONNECTIONS (8)

Then, the scheduler assigns to a packet a deadline which is equal tothe time at which it should be sent had it been received according tothe connection’s contract, that is, slower than its peak rate.

By reserving bandwidth at a connection’s peak rate, a delay-EDDscheduler can ensure that it has served the previous packet from thatconnection before the next packet arrives, so that every packet fromthat connection obeying the peak rate constraint receives a hard delaybound.

Note that the delay bound for a connection is independent of itsbandwidth reservation, in that a connection reserving a smallbandwidth can still obtain a small delay bound. Actually, theindependence of the end-to-end delay bound from the bandwidthreserved to a connection is the main advantage of a delay-EDDscheduler with respect to a WFQ scheduler.

Page 34: cnit - Unigereti.dist.unige.it/reti/Reti2/Scheduling.pdf · cnit CNIT-University of Genoa Research Unit D.I.S.T. Department of Communications, Computer and Systems Science University

34

AN INTRODUCTION TO SCHEDULING DISCIPLINES IN COMPUTER COMMUNICATION NETWORKS 215

cnit5-SCHEDULING GUARANTEED-SERVICE

CONNECTIONS (9)

Since a delay-EDD scheduler serves packets in order of theirdeadlines, it needs to place them in a priority queue like in WFQdiscipline. Thus, it is necessary to store per-connection finishnumber as in WFQ. Thus, the implementation of such a scheduleris as complex as WFQ.

In a jitter-EDD (J-EDD) scheduler, a delay-jitter regulatorprecedes the EDD scheduler. With a delay-jitter regulator, allpackets receive the same delay at every hop (except the lastone). Thus, a network of J-EDD schedulers can give bounds onend-to-end bandwidth, delay, and delay-jitter. The J-EDDscheduler incorporates a delay-EDD scheduler; so to obtain aworst-case delay bound, a connection must reserve bandwidth atits peak rate.

AN INTRODUCTION TO SCHEDULING DISCIPLINES IN COMPUTER COMMUNICATION NETWORKS 216

cnit5-SCHEDULING GUARANTEED-SERVICE

CONNECTIONS (10)

d. Rate-controlled scheduling

Rate-controlled scheduling disciplines are a class of schedulingdisciplines that can give connections bandwidth, delay, and delay-jitterbounds. A rate-controlled scheduler has two components, namely aregulator and a scheduler.

Incoming packets are placed in the regulator, which uses one of manyalgorithms to determine the packet’s eligibility time. When a packetbecomes eligible, it is placed in the scheduler, which arbitrates amongeligible packets. By delaying packets in the regulator, we can shape theflow of incoming packets to obey any constraint (for instance, packetsshould arrive to the scheduler at a rate less than the peak-rate, orpackets should arrive at the scheduler with a constant delay afterleaving the scheduler at the previous switch (delay-jitter regulator).

Page 35: cnit - Unigereti.dist.unige.it/reti/Reti2/Scheduling.pdf · cnit CNIT-University of Genoa Research Unit D.I.S.T. Department of Communications, Computer and Systems Science University

35

AN INTRODUCTION TO SCHEDULING DISCIPLINES IN COMPUTER COMMUNICATION NETWORKS 217

cnit5-SCHEDULING GUARANTEED-SERVICE

CONNECTIONS (11)

The scheduler can serve packets in a FCFS discipline, place them in amultilevel priority queue, or serve them using WFQ. The serviceproperties of a rate-controlled scheduler thus depend on the choices ofthe regulator and the scheduler.

It can be shown that a rate-controlled scheduler can emulate a widerange of work-conserving and non-work-conserving disciplines, whichare reported in the literature.

AN INTRODUCTION TO SCHEDULING DISCIPLINES IN COMPUTER COMMUNICATION NETWORKS 218

cnit6-CONCLUSIONS

The basic issues concerning packet scheduling in computercommunication networks have been briefly reviewed. The objectivesand requirements concerning such kind of scheduling problems areintrinsically different from those concerning processor scheduling ormanufacturing scheduling.

Essential requirements in this case are the ease of implementation anda very low computational time.

Most of the existing schemes derive from simple heuristics or fromapproximations to an idealized algorithm that works only in theassumption of fluidized traffic.

A number of important results are reported in the literature concerningthe performance bounds offered by such schemes.

Further research is needed in order to develop definitely satisfactoryapproaches for scheduling in computer networks.

Page 36: cnit - Unigereti.dist.unige.it/reti/Reti2/Scheduling.pdf · cnit CNIT-University of Genoa Research Unit D.I.S.T. Department of Communications, Computer and Systems Science University

36

AN INTRODUCTION TO SCHEDULING DISCIPLINES IN COMPUTER COMMUNICATION NETWORKS 219

cnitREFERENCES

J. C. R. Bennet and H. Zhang, “WF2Q: worst-case fair weighted fair queueing”, Proc.IEEE INFOCOM, San Francisco, CA, March 1996, pp. 120-128.

H. J. Chao, X. Guo, Quality of service control in high-speed networks, J. Wiley, NewYork, NY, 2002.

D. Ferrari and D. Verma, “A scheme for real-time channel establishment in wide-areanetworks”, IEEE J. Select. Areas Commun., pp. 368-379, April 1990.

S. J. Golestani, “A framing strategy for congestion management”, IEEE J. Select. AreasCommun., vol. 9, no.7, pp. 1064-1077, September 1991.

AN INTRODUCTION TO SCHEDULING DISCIPLINES IN COMPUTER COMMUNICATION NETWORKS 220

cnit

S. J. Golestani, “A self-clocked fair queuing scheme for broadband applications”, Proc.IEEE INFOCOM, Toronto, ON, Canada, June 1994, pp. 636 - 646.

C. Kalmanek, H. Kanakia, and S. Keshav, “Rate controlled servers for very high-speednetworks”, Proc. IEEE GLOBECOM, San Diego, CA, December 1990, pp. 12-20.

S. Keshav, An Engineering Approach to Computer Networking: ATM Networks, theInternet, and the Telephone Network, Addison-Wesley, 1997.

A. K. Parekh and R. G. Gallager, “A generalized processor sharing approach to flowcontrol in integrated services networks: the single node case”, IEEE/ACM Trans.Networking., vol. 1, no. 3, pp. 344-357, June 1993.

Page 37: cnit - Unigereti.dist.unige.it/reti/Reti2/Scheduling.pdf · cnit CNIT-University of Genoa Research Unit D.I.S.T. Department of Communications, Computer and Systems Science University

37

AN INTRODUCTION TO SCHEDULING DISCIPLINES IN COMPUTER COMMUNICATION NETWORKS 221

cnitA. K. Parekh and R. G. Gallager, “A generalized processor sharing approach to flowcontrol in integrated services networks: the multiple node case”, IEEE/ACM Trans.Networking, vol. 2, no.2, pp. 137-150, April 1994.

S. Shenker, C. Partridge, and R. Guerin, “Specification of Guaranteed Quality of Service”,RFC 2212, Internet Engineering Task Force (IETF), September 1997.

M. Shreedhar and G. Varghese, “Efficient fair queueing using deficit round-robin”,IEEE/ACM Trans. Networking, vol. 4, no.3, pp. 375-385, June 1996.

D. Verma, H. Zhang, and D. Ferrari, “Delay-jitter control for real-time communication ina packet switching network”, Proc. IEEE TRICOMM, Chapel Hill, NC, pp. 35-43, April1991.

L. Zhang, “Virtual clock: a new traffic control algorithm for packet switching networks”,ACM Trans. Computer Syst., vol. 9, Issue 2, pp. 101-124, 1991.