Sharp utilization thresholds for some real-time scheduling problems

12/19/2009 ∙ by Sathish Gopalakrishnan, et al. ∙ 0

Scheduling policies for real-time systems exhibit threshold behavior that is related to the utilization of the task set they schedule, and in some cases this threshold is sharp. For the rate monotonic scheduling policy, we show that periodic workload with utilization less than a threshold U_RM^* can be scheduled almost surely and that all workload with utilization greater than U_RM^* is almost surely not schedulable. We study such sharp threshold behavior in the context of processor scheduling using static task priorities, not only for periodic real-time tasks but for aperiodic real-time tasks as well. The notion of a utilization threshold provides a simple schedulability test for most real-time applications. These results improve our understanding of scheduling policies and provide an interesting characterization of the typical behavior of policies. The threshold is sharp (small deviations around the threshold cause schedulability, as a property, to appear or disappear) for most policies; this is a happy consequence that can be used to address the limitations of existing utilization-based tests for schedulability. We demonstrate the use of such an approach for balancing power consumption with the need to meet deadlines in web servers.

READ FULL TEXT VIEW PDF
POST COMMENT

Comments

There are no comments yet.

Authors

page 1

page 2

page 3

page 4

This week in AI

Get the week's most popular data science and artificial intelligence research sent straight to your inbox every Saturday.

1 Introduction

Computing systems have become larger in scale and more pervasive in their applications. The constant interaction between embedded computing systems and the physical world requires a notion of predictable behavior from the deployed computing systems. Even in large-scale computing clusters and server farms there is a growing emphasis on providing service guarantees. This need for predictable operation can often be characterized by a need for timely completion of activities. Tasks can usually be associated with deadlines; systems need to ensure that the tasks meet their deadlines.

In a sense, the convergence of computation, communication and control, which is often seen in distributed embedded systems, has led to a renewed interest in understanding the conditions for a system to meet deadlines. Additionally, most tasks are recurring: they need to be performed repeatedly because of the constant interaction with the physical environment (or because of user demand). Such problems have been at the heart of real-time scheduling since the seminal work by Liu and Layland [23] on utilization bounds for schedulability using static and dynamic priority scheduling policies.

Liu and Layland considered a set of periodic tasks with known execution times and periods that need to be scheduled on a uniprocessor system. Each task was characterized by its execution time and its period . In the periodic task model, if an instance of task is eligible for execution at time , the next instance of the same task is eligible for execution at time . Each instance of a task is called a job. Liu and Layland restricted their analysis to task sets where each job needs to complete before the next job belonging to the same task is ready for execution. For task , each job needs to complete execution within time units after its release. Hence is known as the relative deadline for the task. It is easy to see that each task will use the processor for a fraction of time. This fraction is the utilization of task and can be denoted . The utilization of a task set, therefore, is where is the number of tasks.

The fundamental contribution that Liu and Layland made was to show that for a specific scheduling policy – they studied the Rate Monotone policy and the Earliest Deadline First policy – there exists a utilization bound such that any task set with utilization is definitely schedulable (all deadlines will be met). This has formed the basis for much work in real-time systems.

There are, however, some obvious limitations to Liu and Layland’s result. The first drawback is that the utilization bound test is pessimistic: there are many task sets that may exceed the bound but are still schedulable. Second, for models when the relative deadline does not equal the period, additional tests are needed. Lastly, obtaining the utilization bound is difficult for many policies because such derivations involve identifying the worst-case task set (the task set with low utilization that is not schedulable) and this is non-trivial for certain policies.

In contrast with prior work on schedulability and predictability, we show that the rate monotonic scheduling policy has a utilization threshold such that any task set with utilization less than is almost surely schedulable and a task set with utilization greater than is almost surely not schedulable. Similarly, we show that such a threshold exists for deadline monotonic scheduling of aperiodic real-time tasks. Establishing the sharpness of utilization thresholds provides a better understanding of scheduling policies and removes most of the pessimism that is associated with traditional utilization bounds because of the implication that task sets with utilization greater than are unlikely to be schedulable. These results are independent of the relationship between task periods and task deadlines. On the other hand, it is prudent to note that these results indicate that schedulability appears and disappears almost surely

. For hard real-time systems, which cannot afford to miss any deadlines, this suggests that the threshold can be used as an initial estimate and schedulability needs to be verified by an exact test at some step. For soft real-time systems, which can tolerate some deadline misses, our results provide a simple test and a tight performance guarantee.

As an example, consider rate monotonic scheduling with the Liu and Layland task model. We would like to show that when , the number of tasks to schedule, is large, almost surely task sets of utilization less than about utilization are schedulable and almost surely task sets with greater utilization are unschedulable. This shows that the average performance of the rate monotonic policy is much better than the Liu and Layland worst-case utilization of  [23]. It is exactly for the case of large task sets that other analysis techniques become computationally expensive. The fundamental contribution we make is a framework for answering questions about average or typical case schedulability. To date there has been no unified methodology that can deal with all scheduling policies.

In this article, our emphasis is on rate monotonic scheduling for periodic tasks and deadline monotonic scheduling for aperiodic tasks on a uniprocessor although some preliminary experiments lead us to believe that these results should hold for multiprocessor and distributed (multistage) systems as well.

Motivation. The main reason for studying sharp thresholds is to ease resource provisioning for soft real-time systems, and, in some cases, simplify the offline optimization of hard real-time systems. The existence of sharp thresholds allows us to make efficient use of computing resources. Many mainstream operating systems (especially Linux) support simple fixed-priority scheduling and being able to identify a workload limit for such systems allows for simple admission control and resource management. Many applications have tasks with deadlines but are built to tolerate a few deadline misses. Multimedia applications have been traditional examples, but many emerging pervasive computing applications are of a similar nature. Timely response leads to high quality of service but occasional delays are not catastrophic. For these systems, being able to utilize resources better can lead to substantial cost savings that will allow these applications to achieve greater market penetration. It can be argued that feedback control [25] can keep soft real-time systems in an acceptable operation regime but such techniques may require substantial modifications to operating systems and/or middleware platforms. Additionally, our findings may allow feedback control schemes to pick better set points.

In the next section (Section 2), we elaborate on the model for periodic real-time tasks that we consider and the notation we will follow. Then, in Sections 3, 4 and 5, we will develop the framework for reasoning about average-case behavior and present proofs of our key results. We will then followup with experimental evidence and discussion of the results (Section 6). We then extend these results to the aperiodic task model and demonstrate the use of sharp threshold behavior in power control for web servers (Section 7). Finally, we place our work in context with related work (Section 8) and conclude the article (Section 9).

2 System and task models

We consider a general and well-understood model for uniprocessor scheduling.

Platform model. We consider a uniprocessor system that can schedule tasks using static priorities and preempt (suspend execution of) tasks to schedule tasks with higher priority.

Task model. Each task is periodic with period . Each instance of the task has an execution time requirement on the processor and a relative deadline . If a job of is released (ready for execution) at at time then it is expected to finish execution by time . Tasks are independent of each other.

The typical assumption is that the first instance of all periodic tasks release at the same instant in time. A reason for making this assumption is that this represents the worst-case situation for static priority policies. We will also make this assumption although it is not strictly necessary.

The utilization of a periodic task set is

Monotone scheduling policies. In this article, we will mostly be concerned with the rate monotonic and deadline monotonic scheduling policies, which are work-conserving (non-idling) policies. It is also useful to keep in mind a more general classification of policies: the class of monotone policies. Let us suppose that a scheduling policy successfully schedules a set of tasks . We will call the policy a monotone scheduling policy111Note that there is a distinction between this notion of monotonicity and the use of the term “monotone” in the context of rate/deadline monotone priority policy. However, by this definition, the rate monotonic scheduling policy and the deadline monotonic scheduling policy are monotone scheduling policies. if and only if:

  • It can schedule any set successfully;

  • For any task , the policy can schedule all tasks successfully if were to be reduced;

  • For any task , the policy can schedule all jobs successfully if were increased.

3 Utilization thresholds

Let be some task set. We define

as the probability of selecting task set

from all possible task sets of utilization . Let represent the set of all schedulable task sets with tasks. Then represents the probability that a task set with utilization is schedulable using the rate monotonic policy. This can also be stated in the following manner. Suppose , a task set with tasks, is drawn at uniformly at random from the space of all possible task sets of utilization . Then, is the probability of the event “.”

Definition 1 (Threshold)

is said to be a threshold for if for any

(1)

Note that means .

The definition of threshold may appear trivial in the case of scheduling policies (clearly utilization of is schedulable, and utilization is unschedulable) and hence we require a stronger criterion for a useful threshold.

Definition 2 (Sharp threshold)

A threshold is said to be sharp if there exists a such that for every and any

(2)

The interval of width over which the probability of finding a valid schedule drops from to is called the threshold interval. As , the threshold interval becomes arbitrarily small and we have a sharp threshold.

A threshold that is not sharp is a coarse threshold. Sharp thresholds represent phase transition phenomena because we can divide the task set space into two phases: one in which the property holds almost always and one in which it almost always does not hold.

We emphasize once more that, although the results are asymptotic, in practice a reasonable number of tasks suffices for observing sharp thresholds. When we think of , we do not conjure up task sets with s of tasks; we are usually dealing with many s of tasks.

The main result of our work is that schedulability, with the rate monotonic scheduling policy, of periodic tasks has a sharp threshold.

By proving such a result we provide a platform for the average-case analysis of real-time scheduling problems and highlight the validity of using empirical utilization thresholds for managing resource allocation.

4 Schedulability as a graph property

To show that scheduling problems of the type that we are interested in have a sharp threshold we will gain leverage from work carried out in the context of random graphs. The study of phase transitions can be traced back to the work of Erdös and Rényi on random graphs [9, 10]. A random graph is a graph with a fixed set of vertices and edges between two given nodes occur with some probability, . Erdös and Rényi showed that as the parameter controlling the edge probability varies, the random graph system experiences a swift qualitative change. This transition is similar to observations in the physical world. Akin to water freezing abruptly as its temperature drops below zero, the random graph changes rapidly from having many small components to a graph with a giant component that contains a constant proportion of vertices.

We will use results that have been obtained by Friedgut and Bourgain [11] to prove the existence of a sharp utilization threshold for schedulability. The first step is, of course, to connect the scheduling problem to a problem on graphs.

To consider scheduling as a graph problem, we will first deal with utilization in a quantized fashion. Let be the smallest quantum of utilization that can be allocated to a task. Each task can have a utilization of at most therefore there are at most quanta, and is assumed to be sufficiently large. More specifically, given tasks, without loss of generality, can be of the form for some constant . If is the utilization of task and is the period of the task, then . We can thus represent each periodic task by the tuple .222The use of quantized utilization does not limit our analysis in any way; can be made sufficiently large to approximate real allocations.

Consider a bipartite graph with the two vertex partitions being and . The vertices in represent tasks and each vertex can be labeled by its period. (The periods, as can be expected, are assumed to be chosen uniformly at random from the space of all possible periods.) The set contains vertices, each corresponding to one quantum of utilization. The complete bipartite graph with and as the two partitions represents a task set with each task having utilization . This is clearly unschedulable for task sets with more than one task. If edges are present with probability then we have random task sets with an expected utilization of where is the number of tasks. By choosing the value of appropriately, we can generate random task sets with varying utilization levels. There is a graph corresponding to each task set and we will call these graphs task set graphs. In turn, for each utilization level, there is a corresponding edge probability (The complete bipartite graph representation is illustrated in Figure 1.). The set of periods is a set of integers. For tasks, there may be at most periods chosen from a range of integers. When is large, we can represent all possible periods using such a graph.

Figure 1: Task set graph

Certain combinations of periods and execution times lead to unschedulable task sets under the rate monotonic scheduling policy (Figure 2 depicts a task set of utilization that cannot be scheduled using the rate monotonic policy. This task set has two tasks: one with period and utilization and another with period and utilization .). This phenomenon is well understood from the initial study by Liu and Layland [23]. These unschedulable task sets are subgraphs of the complete bipartite task set graph. Increasing from to leads to unschedulable task sets. There is, in fact, a critical edge probability, , which in turn corresponds to a critical utilization for (un)schedulability. For , the expected task set is asymptotically almost surely schedulable; for , the expected task set is asymptotically almost surely not schedulable. The next section details the proof of this sharp threshold behavior.

Remark. In our description of the graph model, we assumed that edges in the task set graph exist with probability , which would imply that only the average utilization is fixed. We can invert the model by fixing the number of edges. This does not alter the probability of an edge existing between two vertices but ensures that the utilization (and not just the average utilization) is fixed.

Figure 2: Unschedulable task set graph

5 Sharpness of utilization thresholds

The scheduling graph provides a structure to study the typical (or average) case behavior of scheduling problems. Given a utilization level, each edge in the graph appears with a certain probability that captures typical scheduling problems.

Scheduling problems do exhibit threshold behavior and that this behavior is controlled by the utilization of the set of tasks to be scheduled. To be convinced, it should suffice to remark that when utilization is all task sets are schedulable, and for utilizations above no task set is schedulable. The primary question then becomes: “Is the threshold sharp or is it coarse?” To answer this question we will need further results.

5.1 Preliminaries

We will apply a theorem obtained by Bourgain that appeared as an appendix to Friedgut’s article [11]. Recall that is the set of all

-bit vectors and that any

is an -bit vector. We can use these vectors to indicate the presence of edges in a graph with at most edges. The size of such a vector , denoted , is the number of 1s it contains.

Let and let be some subset of that represents a graph property. In our discussion, it will be useful to consider to be the collection of all possible task set graphs and to be the collection of unschedulable task set graphs. When the vertex partitions and are known, then the task set graph is defined by its edges. If is the maximum possible number of edges, then every element of , i.e., an -bit vector, represents a task set graph.

The general definition of a monotone property follows, where and are elements of and can also be treated as vectors; is the element of the vector .

Definition 3 (Monotone property)

is said to be monotone if and only if

In the context of graphs, a monotone property is one that cannot be destroyed by the addition of edges.

If a task set is unschedulable using the rate monotonic policy, then increasing the utilization of any of the tasks, which adds edges to the corresponding task set graph, will also result in an unschedulable task set. The monotone graph property of interest to us is that collection of edges that makes a task set unschedulable. (Adding edges to a graph representing an unschedulable task set will result in another unschedulable task set graph.)

In the theorem that follows, the term is the probability that a graph property is present if each of the edges is chosen with probability . If represents a graph, and if is when edge is present in and is otherwise, then

Theorem 1 (Bourgain [11])

Let be a monotone property and assume say

(3)
(4)
(5)

Then there is a for some function such that at least one of the following two conditions must be true:

  1. (6)
  2. There exists of size such that the conditional probability

    (7)

is equivalent to stating that . The edge probabilities are functions of , the maximum size of the graph, and are expected to diminish as increases. This is captured as , to indicate that .

Some comments about Bourgain’s theorem are now in order. Bourgain’s theorem, in essence, states that if a monotone property is such that then that monotone property is approximated by a “local property.”333Friedgut proved a similar result except that Friedgut’s approach required that the random structure under investigation exhibit some symmetry [11]. In a graph, a local property is a property that depends on a small number of vertices and edges. Bourgain proved that if is bounded by some constant, then there must exist some small graphs (whose sizes are bounded by a constant) that are capable of boosting the probability of the desired property appearing. is such a booster. Inequality (6) suggests that most graphs that possess the monotone property in fact contain a subgraph that satisfies the property. Inequality (7) is equivalent to saying that for some graph , the probability that is in is at least .

We shall explain this result using the Erdös and Rényi model for random graphs. In this model, each of the possible edges in a graph with vertices is added with probability . The property that the random graph is connected is not a local property because it involves all the vertices in the graph. On the other hand, the property that the random graph contains a triangle is local because a triangle has only vertices. It is for this reason that connectivity has a sharp threshold [9] but the existence of a triangle has a coarse threshold [11]. A sharp threshold is associated with a rapid change in the appearance or disappearance of a property, which means that when . When a threshold is coarse, this derivative (or slope) is finite. A vital point to note is that is definitely true for all coarse thresholds and may be true for some sharp thresholds. On the other hand, holds only for sharp thresholds and is a stronger characterization of certain sharp thresholds. For schedulability, we will show that this stronger result holds. To do so, we will show that schedulability depends on a non-local property of the schedulability graph. We also add that is continuous and its derivative exists: every

Lemma 1

For a set of periodic tasks with periods , the minimum utilization for a task set that is barely schedulable using the rate monotonic policy is achieved only when all tasks have specific execution times. As a result, any task set that is unschedulable will have at least edges.

Proof.    From Liu and Layland’s proof [23], the task set with minimum utilization that is barely schedulable444A barely schedulable task set is one that fully utilizes the processor for an interval of time that begins with the arrival of an instance of some task and extends at least up to the deadline of that task instance. is such that , , and . Because utilization of the barely schedulable task set is minimized only when all tasks have non-zero execution times, the task set graph has at least edges for the barely schedulable task set. A task set that is unschedulable has to have a higher utilization and hence the corresponding task set graph will also have at least edges.

5.2 Main result

Theorem 2

The schedulability of a task set with periodic tasks, where each task is characterized by execution time , period , and relative deadline equal to its period, has a sharp utilization threshold. The utilization of the set of tasks is .

Proof.    Consider the task set graph that represents the (un)schedulability of a task set with tasks when each edge occurs with probability and the corresponding utilization level is . A task set is unschedulable if and only if the corresponding task set graph includes an assignment of utilizations to periods that causes deadline misses. We need to show that there is some , and hence some , that is a sharp threshold.

Let represent the property of a task set graph containing an unschedulable assignment of utilizations to periods. Choose a such that We can always find such a because we know that all task sets are schedulable when utilization is and no task set is schedulable if its utilization exceeds .

is a polynomial in and is differentiable with respect to . Let us suppose that . It is also the case that and hence .

We will assume that the set of possible edges is . From Bourgain’s theorem (Theorem 1) we know that if all the conditions are true (especially the constraint on ) then there must exist some such that

(8)

or there exists of size such that the conditional probability

(9)

for some .

From Lemma 1 we realize that at least edges are required in the task set graph to make a task set unschedulable. Task sets that are unschedulable at higher utilization levels (higher than the unschedulable task set with minimum utilization) will have more edges in the task set graph. This observation helps us eliminate the possibility of an of constant size because the size of the minimal unschedulable task graph increases as we increase the number of tasks. In other words, inequality (8) does not hold.

Inequality (9) cannot be true because that would imply that even assigning a very small utilization to certain tasks is bound to increase the probability of unschedulability by an additive constant. Let us assume that edges exist a priori in a task set graph. By Lemma 1, we know that at least edges are needed for an unschedulable task graph, and each task (period) should receive at least one edge. The conditional probability that each task (period) gets at least one edge given that edges exist a priori and have been assigned in the best possible way (an edge each to periods) is still dependent on the total number of edges, , which is greater than . Thus the influence of a constant number of edges in the task set graph can not increase the probability of inducing unschedulability by a constant .

When both inequalities (8) and (9) do not hold, by a contrapositive argument, we cannot have . (The other two prerequisites for Bourgain’s theorem are definitely true.) Since is not bounded, we conclude that schedulability has a sharp threshold.

The structure of the proof above is that, for task set graphs, premises (A1) and (A3) from Bourgain’s theorem (Theorem 1) hold and conditions (C1) and (C2) are false therefore (A2) must be false and indicates a sharp threshold.

With edge probabilities being related to the utilization , we can also use the term to represent the probability that a task set with utilization is schedulable.

Remark 1 (Width of the threshold interval)

As , the sharp threshold theorems indicate that the transition will be swift and going past the threshold will cause an immediate change in the ability to find the property of interest. For moderate values of , it is possible to obtain some understanding of the swiftness of the transition. The width of the threshold interval is the smallest difference such that and for a fixed . The width appears to be related to the number of permutations that are possible on the random structure. For the scheduling graph, the valid permutations correspond to permutations of the task set, i.e., among the tasks. Based on the work by Friedgut and Kalai (see Section 5 of their article [12]), we conjecture that for a task set with tasks, the width of the threshold interval is .

Remark 2 (Location of the threshold)

Given a finite (but large) number of options for task periods, we have shown that there exists a sharp threshold for rate monotonic scheduling. The location of the threshold does depend on the number of tasks and the task periods. When the number of task periods are large, and not chosen pathologically, the location of the sharp threshold indicates good processor utilization.

6 Empirical results and discussion

6.1 Threshold behavior

(a) Task sets generated using the UUniSort method [6]
(b) Task sets where each task had the same utilization
Figure 3: Thresholds for rate monotonic scheduling

Having established that rate monotonic scheduling has a sharp threshold, we use experiments to locate the threshold and to observe the swiftness of the transition from schedulability to unschedulability. A closed-form solution for the threshold has been elusive, and empirical evidence is our resort.

When examining experimental data, it behooves us to recall that sharp threshold behavior is a property of large task sets. For moderate size task sets, one can observe a threshold but it may not be as sharp as one would expect. (We present only a limited number of graphs for space considerations. Given the immense number of graphs that can be obtained, those shown here are intended as a visual cue to the theoretical machinery we have used. The results presented here suggest that task sets of nominal sizes have a usable threshold.)

Bini and Buttazzo [6] have studied different approaches to generating random task sets and have suggested methods with (almost) no bias. The goal of Bini and Buttazzo’s work was to generate task sets uniformly at random from the space of all possible task sets that achieve utilization . We employed the UUniSort procedure from the article by Bini and Buttazzo [6]. Periods were then drawn uniformly at random from . Task set utilization was varied in steps of and at each level we tested task sets. The different numbers of tasks in a task set for the experiments were and . Notice (in Figure 3(a)) that schedulability drops rapidly when utilization is in the range . The width of the threshold interval is smaller for larger task sets. Within a rather short interval, we go from almost all task sets being schedulable to almost no task set being schedulable. This transition allows us to approximate the schedulbility test by using a utilization threshold near .

We also conducted another experiment where we generated task sets that had the same utilization for each task: in other words, the total utilization was divided equally among all tasks. This experiment is informative because critically schedulable task sets for rate monotonic scheduling have this property [23, 6]. The results of this experiment reveal (Figure 3(b)) that when period values are arbitrary the achievable utilization is significantly higher than tight utilization bounds and that the threshold between schedulability and unschedulability is sharper.

The sharp utilization threshold result appears remarkable because it makes no assumptions about task periods and yet provides quite a precise estimate of schedulability. The general methodology for deriving utilization bounds for any scheduling policy involves identifying a task set that achieves low utilization and is yet unschedulable. It is not always easy to isolate the worst-case task set and determine its utilization. A major payoff from Theorem 2 is the ability to obtain thresholds empirically. When the worst case is rare (a low probability event) we are not burdened with a low utilization bound.

A possible concern is the asymptotic nature of the result. Sharp threshold behavior occurs when the number of tasks is large. We contend that this is exactly the case for which existing real-time scheduling results are often inefficient (high complexity for analysis). As experiments reveal, a moderate number of tasks is sufficient for observing sharp thresholds. For small task sets, even exact tests may be performed very quickly. There is a dependency between the threshold and the number of tasks. It is easily possible to compute – offline – the threshold for different numbers of tasks and utilize the appropriate threshold.

The use of thresholds becomes extremely useful in the case of soft real-time systems and for performing fast exploration of design space in developing (near-)optimal systems. An example is radar dwell scheduling [13, 15, 14]. There are many task parameters that need to be tuned in a radar system to minimize tracking error subject to schedulability but the scheduling algorithms are hard to analyze; using thresholds for these problems simplifies the online optimization. Because performance is controlled at run-time, optimization routines cannot invoke exact tests that have high time complexity. Apart from online optimization, thresholds can be used as offline guidance measures to improve system designs.

6.2 Some comparisons

In our work, we make no assumptions about the task periods and execution times: they can be arbitrary. There has been work by Park, Natarajan and Kanevsky [28] and Lee, Sha and Peddi [19] obtained good utilization bounds by using task periods alone; execution times of tasks were unknowns in their approach. To determine if there is an improvement in coverage due to sharp threshold behavior, we assumed that tasks are restricted to periods in the set ; this set of periods has a utilization upper bound of using the technique of Lee et al. [19]. Generating tasks as we did earlier (using the UUniSort approach), we found that the sharp threshold is about , which is a improvement in utilization compared to the utilization upper bound obtained (Figure 4). Techniques that use period information to obtain utilization bounds are effective but sharp threshold behavior allows us to be more aggressive even when period information is available. These results also indicate that sharp thresholds do exist even if periods are drawn from a restricted set.

Figure 4: Thresholds with known periods

7 Aperiodic workload and web server QoS

So far we have discussed rate monotonic scheduling of periodic tasks. In this section we extend the sharp threshold result to the aperiodic task model and highlight an application of this idea to the improved power management in delay-sensitive web services.

7.1 Threshold for static-priority scheduling of aperiodic tasks

We can look beyond periodic tasks and consider tasks that do not have a strictly periodic arrival pattern. Such a model has been investigated by Abdelzaher, Sharma and Lu [1] who derived synthetic utilization bounds for task sets where the execution times and relative deadlines for tasks are known. We can extend the theory of sharp thresholds to the case of aperiodic tasks easily. In this section we will establish that the schedulability of aperiodic tasks using the deadline monotonic priority policy has a sharp threshold and we will use this fact to improve on a power management scheme for web servers that was suggested by Sharma et al. [30].

A job in an aperiodic task model has an arrival time , an execution time and a relative deadline (the absolute deadline is ). Abdelzaher, Sharma and Lu define the synthetic utilization [1] of the set of active tasks at time as

where the set of active tasks at time is the set of tasks that were released at or before time instant and whose absolute deadlines are not earlier than , i.e., and . If the synthetic utilization never exceeds a synthetic utilization bound, , then all jobs are guaranteed to meet their deadlines [1, 3]. If is the maximum number of instances that can be active at any given time instant, we can show that there must exist a threshold such that task invocation patterns with are schedulable almost surely and task invocation patterns with are not schedulable almost surely as for any .

It is useful to maintain a notion of job streams, which we will now define.

Definition 4

An aperiodic job stream is a set of jobs where each job has the same execution time and relative deadline and job precedes job in the job stream iff .

Essentially, only one instance of each job stream is active at a given time instant .

Theorem 3

The schedulability of aperiodic task streams, where each task stream is characterized by jobs with execution time and relative deadline , has a sharp synthetic utilization threshold. The synthetic utilization at any time is .

The proof for the existence of a sharp threshold for deadline monotonic scheduling of aperiodic jobs does not require much deviation from the proof of the existence of a sharp threshold for rate monotonic scheduling of periodic tasks. The only modification that is required is to replace the vertex partition with vertices that abstract most characteristics of an aperiodic job stream. Let each vertex in this partition represent a stream with relative deadline and a sequence of arrival times for that stream of jobs. In our analysis of periodic tasks, the period of a task was sufficient information to associate with each vertex. If we limit the arrival times to be integers in the interval for some integer , we have a finite number of such vertices in . As , the number of vertices in , .

is the number of job streams and hence is the maximum number of active jobs at any time instant. We can then use the same mechanism as before, with the task set graph, to show that a sharp threshold must exist for deadline monotonic scheduling because deadline monotonic scheduling satisfies the monotonicity property. To further confirm this knowledge, we generated many random instances of the aperiodic task scheduling problem and determined if jobs missed their deadlines. For these experiments, we had a varying number of job streams with the inter-arrival time for each job stream being drawn from an exponential distribution. The maximum synthetic utilization contribution of any one job stream (the maximum value of

) was kept at to allow for a sufficient number of streams. This is a modest assumption given that we would like to demonstrate the use of sharp thresholds to control the power consumption of a web server dealing with many (100s to 1000s) small jobs.

Figure 5: Threshold for deadline monotonic scheduling of aperiodic tasks

The graph illustrating sharp threshold behavior for aperiodic task scheduling (Figure 5) indicates that the threshold for deadline monotonic scheduling may be close to , which is substantially higher than a synthetic utilization bound of that can be obtained using worst-case analysis [3, 1]. By exploiting this difference between the average case and the worst case behavior of the deadline monotonic scheduling policy for aperiodic tasks, we can reduce power consumption for web servers without significant loss in temporal guarantees.

7.2 Power control for web servers

Many web services offer some delay bounds to clients as a part of the service level agreements; this is particularly true for services that require user fees. Moreover, web services offer multiple levels of service with better guarantees for premium customers. Synthetic utilization bounds are an effective mechanism to ensure that delay guarantees are met. Servers can use an admission control mechanism to ensure that they can limit the delay experienced by different clients. Alternatively, these bounds can be used to provision a web farm to ensure that all customer requirements can be met at low cost.

Another application of such bounds is in operating power control. Most processors being manufactured today can operate at multiple clock speeds, with lower speeds consuming less power. Thus, utilization bounds can help in determining the ideal speed settings for processors such that delay bounds are not violated and power consumption is reduced. This approach was adopted by Sharma et al. [30], and is illustrative of the use of synthetic utilization bounds. We will not stress the need for power control in server farms. The case has been made by many researchers including Sharma et al. [30]. The only goal of this section of our article is to suggest that using synthetic utilization thresholds will improve power savings at the cost of a small fraction of deadline violations. Sharma et al. used a synthetic utilization bound of for the web server, while we allow the web server to operate up to a synthetic utilization of .

Tasks are scheduled using the deadline monotonic priority assignment, therefore different relative deadlines correspond to different service levels. We do not rewrite a web server like Apache to support multiple levels but, instead, run multiple instances of the Apache web server at different priority levels in the operating system555Most operating systems including Linux allow users to set static priorities for tasks. Within each priority level, tasks are scheduled FIFO by default., to provide service class differentiation. Our implementation is for the Linux operating system (Fedora Core 3; Linux kernel 2.6.9) and makes use of the TUX in-kernel web server [29] to integrate admission control, power control and scheduling.

Figure 6: A system architecture for web services

All new HTTP session requests arrive and are processed by the TUX server. Based on the source of the request (or other meta information), a service level – a delay guarantee, – is assigned for the request. The service time, , associated with a request is inferred from the content that is requested. If the new connection will not violate the synthetic utilization limit for the system (we chose ), the request is admitted. The service time for a request depends on the processor speed. If, at the current speed, the utilization limit is exceeded then the power control module uses dynamic voltage scaling to increase the processor speed and keep the synthetic utilization under the limit. When the processor is operating at the maximum speed, new HTTP connections may be rejected to keep the system operating under the set limit. Admitted sessions are handed off to the appropriate Apache server.

When a session terminates, it may be possible to reduce processor speed. We do not reduce the processor speed at once but wait for a predefined duration before making changes. This is to minimize overhead from rapid voltage changes. To keep track of the synthetic utilization after connections have been admitted, we make use of the Netfilter framework and some extra modules that we implemented to track packets and identify HTTP traffic. The overall architecture of the web server platform (Figure 6) is the same as the one used by Sharma et al. [30] and they have provided several implementation details that we do not discuss in this article but can be obtained from their report. The alterations we needed to make were only due to changes in the underlying platform.

We used an Intel Pentium M processor with enhanced SpeedStep capability and a maximum processing speed of 1.7 GHz. The cpufreq driver for enhanced SpeedStep allows us to control the operating speed. The TUX in-kernel web server is part of the Linux Fedora Core 3 distribution. In contrast, Sharma et al. [30] used an AMD Athlon processor with PowerNow DVS support. They also used Linux kernel 2.5, for which they needed to port khttpd, the in-kernel web server from Linux kernel 2.4.666There was a decision to remove the in-kernel web server between versions 2.4 and 2.5 of the Linux kernel, but the web server was brought back in to the 2.6 kernel by some distributions including Fedora. The processor frequency and voltage settings for the processor we used are shown in Table 1.

Frequency Voltage
MHz Volts
600 0.956
800 1.004
1000 1.116
1200 1.228
1400 1.308
1700 1.484
Table 1: Frequency and voltage settings/Intel Pentium M 1.7GHz with enhanced SpeedStep
Figure 7: Impact of processor speed on execution times

The workload requested by different clients was composed of a set of CGI scripts that would be executed at the web server. We used 10 CGI scripts with varying degrees of computation. The execution time requirements of these scripts was determined by setting the processor speed at different levels and determining the maximum rate at which the processor could serve each CGI request. If, for example, at 1.7GHz, the server could handle 800 requests per second of script 1 alone, then the mean execution time of script 1 at this speed is . We profiled the scripts at each of the six possible speed settings to determine the change in execution times with slowdown. This type of profiling helps us account for other execution sources of overhead including data I/O. The throughput slowdown (and hence the execution time increase) for each of the 10 scripts is illustrated (Figure 7; the throughput at the highest speed is assumed to be and the throughput decrease at slower speeds is shown.) The scripts to the right of the graph are computationally more demanding and we use the slowdown/speedup factors that correspond to these scripts when adjusting voltage levels.

To determine power savings, we used logs of session-oriented connections that were fed to httperf [27] to generate workload for the web server from multiple clients. The workload we used contained 1000 persistent HTTP connections with random connection lengths chosen in the interval . The requests could be for any of the profiled scripts and the inter-arrival time was drawn from an exponential distribution with different means. We created six Apache servers at different priority levels thus limiting the number of possible relative deadlines to six.

There are two quantities of interest: the average power consumption and the fraction of deadlines missed. The average power consumption was obtained using a separate data acquisition system that measured the voltage drop across a sense resistor. For the same workload, we determined the average power consumption when the synthetic utilization set point was (the synthetic utilization bound) and (near the sharp threshold). It is clear that we can obtain power savings, and these savings are shown in Figure 8. The load (along the -axis) is a fraction of the processor capacity based on the execution time profiling carried out earlier and the known inter-arrival times between HTTP requests. Increasing the load increases the maximum synthetic utilization. We varied the load from to and observed that we can save an additional 10-11% energy by using a higher synthetic utilization set point. Using a set point of , we noted slightly less than deadline misses and by raising the set point to we recorded deadline misses. Some deadline misses are inevitable, irrespective of the set point chosen unless we are overly conservative, because of variations in execution times and also depend on when exactly speed changes are performed. The encouraging result, however, is that we see greater power savings with a small penalty.

Figure 8: Energy savings: sharp threshold vs. tight bound

By changing the synthetic utilization set-point from to , a change of about , we would expect to see power savings of that magnitude at moderate and high workload conditions. This does not happen because of the discrete frequency-voltage settings, which often forces the processor to operate at higher speeds. Yet another question involves the selection of the synthetic utilization set point. From earlier experiments (Figure 5), we could have picked a higher set point, say . Even in the earlier experiments, the probability of missing a deadline is higher for a synthetic utilization of , and if we do use this for the web server system the percentage of jobs missing their deadlines increased to , which is significantly high.

The essential takeaway from this section is that the existence of sharp thresholds allows us to improve the management of computer systems. With web servers, we can either reduce the energy costs or (quite naturally) deal with additional workload with existing infrastructure.

8 Related work

In our work, we explore some interesting aspects surrounding task set utilization and schedulability for real-time systems. There has been extensive work on deriving utilization bounds for periodic task systems starting with the work of Liu and Layland [23]. Kuo and Mok [18] made significant improvements on Liu and Layland’s bound for rate monotonic scheduling by showing that schedulability is a function, not of the number of individual tasks but, of the number of harmonic chains. Bini, Buttazzo and Buttazzo [5] have shown, using the hyperbolic bound, that the feasible region for schedulability using the rate monotonic scheduling policy can be larger if the product of individual task utilizations (and not their sum) is bounded. Wu, Liu and Zhao used techniques inspired by network calculus to derive schedulability bounds [31] for static priority scheduling. Their contribution is an alternative framework for deriving utilization bounds.

Our work presents a fresh perspective on scheduling for real-time systems. Only Lehoczky, Sha and Ding [22] have attempted to obtain average-case results. For rate monotonic scheduling, they characterized the breakdown utilization of the rate monotonic policy for the Liu and Layland model of real-time tasks as . Breakdown utilization, however, is not the same as a utilization threshold, and the connection between the two needs to be examined more closely. The methodology we employ in obtaining our results is new and extremely general. It was not possible to reason in a rather abstract sense about the average-case behavior of scheduling policies with the more traditional analysis techniques of time demand and resource supply. Furthermore, our abstraction allows for reasoning about multi-stage and multiprocessor systems. Dutertre [8] identified phase transitions in a non-preemptive recurring task scheduling problem. While Dutertre’s work emphasized the empirical evidence for sharp thresholds, we have provided the mathematical basis for the existence of sharp thresholds.

Lehoczky pioneered the use of real-time queueing theory to predict the behavior of real-time scheduling policies – specifically the earliest deadline first policy – under heavy traffic conditions with stochastic workload [20, 21]. RTQT uses powerful tools to determine deadline miss percentages in end-to-end tasks executing on a resource pipeline. We may be able to use RTQT to predict the extent to which deadlines can be missed when a task set has utilization close to the threshold, but that requires extensive study, especially to extend RTQT to static priority policies.

In the realm of aperiodic task sets, great progress has been made recently, by Abdelzaher et al., with the identification of aperiodic schedulability bounds for static priority scheduling [1]. The initial result obtained by Abdelzaher and Lu [3] was a constant time utilization-based test for a set of aperiodic tasks. The original analysis has been extended to deal with end-to-end schedulability for multi-stage resource pipelines [2]. It has also been shown that such analysis can be used to obtain non-utilization bounds for schedulability with static priority policies [24]. In this article, we have studied single-node thresholds for the aperiodic task model. In the future, we will further the ideas described in this article to include resource pipelines and non-utilization metrics.

For the specific application of power control in web servers and web server clusters, there has been recent work by Bertini, Leite and Mossé [4], and Horvath, Abdelzaher and Skadron [16]; we believe that the ideas proposed here can easily be integrated into these resource management solutions.

Sharp thresholds are indicators of phase transitions. Phase transitions are common in physical systems. Freezing of ice and superconductivity are phenomena that have temperature as the critical parameter. Phase transitions have been identified in many combinatorial optimization problems, especially constraint satisfaction problems 

[7, 26, 17]. Phase transitions provide very interesting insight into the behavior of combinatorial optimization problems, of which scheduling is an instance, and mayhold the key to faster, near-optimal solutions. Sharp thresholds for properties of random graphs were identified initially by Erdös and Rényi [10] and these results have been generalized by many mathematicians including Friedgut and Kalai [12, 11].

9 Conclusions

The search for efficient tests for schedulability has been at the center of real-time systems research. We have generalized the use of utilization as a schedulability metric. By identifying the sharp threshold behavior of scheduling policies with respect to utilization, we provide a new test for schedulability. Schedulability tests using utilization thresholds are well-suited for soft real-time systems. For hard real-time systems these tests can be backed up by exact tests; thresholds can be used to perform initial filtering before using exact tests.

Most scheduling policies can be shown to have sharp thresholds. We have introduced the task set graph abstraction that can be used to argue about the average case behavior of policies irrespective of whether the workload is periodic or aperiodic. This abstraction is powerful enough to reason about uniprocessor scheduling, and we expect to apply the same ideas to multiprocessor and multistage scheduling problems, and a variety of policies although we considered only the rate and deadline monotonic priority policies in this paper. Interestingly, we have been able to use these thresholds to improve the energy efficiency of delay-sensitive web servers.

Our approach to dealing with average or typical case behavior of scheduling policies makes interesting connections with results from percolation theory and random graphs. We hope to explore these links further to fully characterize the performance of scheduling policies. So far, we have been able to make some qualitative statements about scheduling policies but the ability to compare policies, which we have not explored with this framework, will enrich the graph-theoretic approach.

There are several related open problems. The first of these is the determination of the threshold for a policy without having to resort to experiments. Related to this is the secondary issue of determining the width of the threshold interval. The analysis is complex because of the time demand function that is needed to evaluate the completion time of a task. In a strictly periodic setting with rate monotonic scheduling, the completion time of a task , , is obtaining by fixed point iteration.

where the summation is taken over all tasks with priorities greater than or equal to the task . is necessary and sufficient for to meet its deadline. We believe that developing some normal approximations will provide a better understanding of the threshold for the rate monotonic policy, as well as other policies. Another useful result would be a measure of the worst-case tardiness over all possible task sets when the utilization is known. When the utilization is less than the Liu and Layland bound [23], the tardiness is always zero but little is known about the worst possible tardiness for arbitrary utilization factors.

References

  • [1] Abdelzaher, T., Sharma, V., and Lu, C. A utilization bound for aperiodic tasks and priority-driven scheduling. IEEE Transactions on Computers 53, 3 (Mar. 2004), 334–350.
  • [2] Abdelzaher, T., Thaker, G., and Lardieri, P. A feasible region for meeting aperiodic end-to-end deadlines in resource pipelines. In Proceedings of the IEEE International Conference on Distributed Computing Systems (Mar. 2004).
  • [3] Abdelzaher, T. F., and Lu, C. Schedulability analysis and utilization bounds for highly scalable real-time service. In Proceedings of the IEEE Real-Time Technology and Application Symposium (2001), pp. 15–25.
  • [4] Bertini, L., Leite, J., and Mossé, D. Statistical QoS guarantee and energy-efficiency in web server clusters. In Proceedings of the Euromicro Conference on Real-Time Systems (Jul. 2007).
  • [5] Bini, E., Buttazzo, G., and Buttazzo, G. Rate monotonic analysis: the hyperbolic bound. IEEE Transactions on Computers 52 (July 2003), 933–942.
  • [6] Bini, E., and Buttazzo, G. C. Measuring the performance of schedulability tests. Real-Time Systems 30, 1-2 (May 2005), 129–154.
  • [7] Cheeseman, P., Kanefsky, B., and Taylor, W. M. Where the really hard problems are. In

    Proceedings of the International Joint Conference on Artificial Intelligence

    (1991), pp. 331–337.
  • [8] Dutertre, B. Dynamic scan scheduling. In Proceedings of the IEEE Real-Time Systems Symposium (Dec. 2002), pp. 327–336.
  • [9] Erdös, P., and Rényi, A. On random graphs I. Publicationes Mathematicae Debrecen 6 (1959), 290–297.
  • [10] Erdös, P., and Rényi, A. On the evolution of random graphs. Publ. Math. Inst. Hungar. Acad. Sci. 5 (1960), 17–61.
  • [11] Friedgut, E. Sharp thresholds for graph properties, and the -SAT problem; with an appendix by Jean Bourgain. Journal of the American Mathematical Society 12, 4 (1999), 1017–1054.
  • [12] Friedgut, E., and Kalai, G. Every monotone graph property has a sharp threshold. Proceedings of the American Mathematical Society 124 (1996), 2993–3002.
  • [13] Ghosh, S., Rajkumar, R., Hansen, J., and Lehoczky, J. P. Integrated resource management and scheduling with multi-resource constraints. In Proceedings of the IEEE Real-Time Systems Symposium (Dec. 2004), pp. 12–22.
  • [14] Gopalakrishnan, S., Caccamo, M., and Sha, L. Sharp thresholds for scheduling recurring tasks with distance constraints. IEEE Transactions on Computers 57, 3 (March 2008), 344–358.
  • [15] Gopalakrishnan, S., Caccamo, M., Shih, C.-S., Lee, C.-G., and Sha, L. Finite horizon scheduling of radar dwells with online template construction. In Proceedings of the IEEE Real-Time Systems Symposium (Dec. 2004), pp. 23–33.
  • [16] Horvath, T., Abdelzaher, T., and Skadron., K. Dynamic voltage scaling in multi-tier web servers with end-to-end delay control. IEEE Transactions on Computers 56, 4 (Apr. 2007), 444–458.
  • [17] Kirkpatrick, S., and Selman, B. Critical behavior in the satisfiability of random boolean expressions. Science 264 (1994), 1297–1301.
  • [18] Kuo, T.-W., and Mok, A. K. Load adjustment in adaptive real-time systems. In Proceedings of the IEEE Real-Time Systems Symposium (1991), pp. 160–171.
  • [19] Lee, C.-G., Sha, L., and Peddi, A. Enhanced utilization bounds for QoS management. IEEE Transactions on Computers 53, 2 (Feb. 2004), 187–200.
  • [20] Lehoczky, J. P. Real-time queuing theory. In Proceedings of the IEEE Real-Time Systems Symposium (Dec. 1996), pp. 186 – 195.
  • [21] Lehoczky, J. P. Real-time queuing network theory. In Proceedings of the IEEE Real-Time Systems Symposium (Dec. 1997), pp. 58–67.
  • [22] Lehoczky, J. P., Sha, L., and Ding, Y. The rate-monotonic scheduling algorithm: Exact characterization and average case behavior. In Proceedings of the IEEE Real-Time Systems Symposium (1989), pp. 166–171.
  • [23] Liu, C. L., and Layland, J. W. Scheduling algorithms for multiprogramming in a hard real-time environment. Journal of the ACM 20, 1 (Jan. 1973), 46–61.
  • [24] Liu, X., and Abdelzaher, T. On non-utilization bounds for arbitrary fixed priority policies. In Proceedings of the IEEE Real-Time and Embedded Technology and Applications Symposium (Apr. 2006), pp. 167–178.
  • [25] Lu, C., Stankovic, J. A., Tao, G., and Son, S. H. Feedback control real-time scheduling: Framework, modeling and algorithms. Real-Time Systems 23, 1/2 (Jul./Sept. 2002), 85–126.
  • [26] Mitchell, D., Selman, B., and Levesque, H. Hard and easy distributions of SAT problems. In Proceedings of the National Conference on Artificial Intelligence (AAAI92) (1992), pp. 459–465.
  • [27] Mosberger, D., and Jin, T. httperf: A tool for measuring web server performance. In Proceedings of the Workshop on Internet Server Performance (June 1998).
  • [28] Park, D.-W., Natarajan, S., and Kanevsky, A. Fixed-priority scheduling of real-time systems using utilization bounds. Journal of Systems and Software 33, 1 (Apr. 1996), 57–63.
  • [29] Red Hat Inc. Red Hat content accelerator manuals. http://www.redhat.com/docs/manuals/tux/.
  • [30] Sharma, V., Thomas, A., Abdelzaher, T., Skadron, K., and Lu, Z. Power-aware QoS management in web servers. In Proceedings of the IEEE Real-Time Systems Symposium (December 2003).
  • [31] Wu, J., Liu, J.-C., and Zhao, W. On schedulability bounds of static priority schedulers. In Proceedings of the IEEE Real-Time and Embedded Technology and Applications Symposium (Mar. 2005), pp. 529–540.