<?xml-model href='http://www.tei-c.org/release/xml/tei/custom/schema/relaxng/tei_all.rng' schematypens='http://relaxng.org/ns/structure/1.0'?><TEI xmlns="http://www.tei-c.org/ns/1.0">
	<teiHeader>
		<fileDesc>
			<titleStmt><title level='a'>Elastic Scheduling for Fixed-Priority Constrained-Deadline Tasks</title></titleStmt>
			<publicationStmt>
				<publisher>IEEE</publisher>
				<date>05/01/2023</date>
			</publicationStmt>
			<sourceDesc>
				<bibl> 
					<idno type="par_id">10475001</idno>
					<idno type="doi">10.1109/ISORC58943.2023.00014</idno>
					<title level='j'>Proc. of 26th IEEE International Symposium on Real-Time Distributed Computing</title>
<idno></idno>
<biblScope unit="volume"></biblScope>
<biblScope unit="issue"></biblScope>					

					<author>Marion Sudvarg</author><author>Sanjoy Baruah</author><author>Chris Gill</author>
				</bibl>
			</sourceDesc>
		</fileDesc>
		<profileDesc>
			<abstract><ab><![CDATA[Elastic scheduling provides a model for systems in which individual task utilizations can adapt to guarantee schedulability despite limited resources. Each task is characterized by a range of acceptable utilizations and an "elastic constant" representing its flexibility to reduce or "compress" its utilization from the desired maximum. Utilization compression is realized by either extending task periods or reducing workloads. This paper extends the model to address period compression for fixed-priority constrained-deadline task systems scheduled on a uniprocessor. We propose two approximate algorithms and one optimal algorithm for determining compression under the model. We then compare the execution times and accuracies of all three, demonstrating that even for large task sets, online compression can be performed feasibly on low-powered embedded systems.]]></ab></abstract>
		</profileDesc>
	</teiHeader>
	<text><body xmlns="http://www.tei-c.org/ns/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xlink="http://www.w3.org/1999/xlink">
<div xmlns="http://www.tei-c.org/ns/1.0"><head>I. INTRODUCTION</head><p>Elastic real-time scheduling models provide a framework to reduce the utilizations of individual tasks in response to system overload. The original model proposed by Buttazzo et al. <ref type="bibr">[1]</ref>, <ref type="bibr">[2]</ref> considers uniprocessor scheduling of implicitdeadline tasks. Using a physical analogy, it represents each task's utilization as a spring; the task's "elasticity" reflects its ability to adapt its utilization to a lower quality of service. The total length of the springs, placed end-to-end, represents system utilization. If this exceeds the schedulable bound, a compressive force is applied to the system. Each spring (and corresponding utilization) is compressed proportionally to its elasticity until the total utilization no longer exceeds the bound or until the task reaches its minimum serviceable utilization; task periods are adjusted accordingly.</p><p>Chantem et al. <ref type="bibr">[3]</ref>, <ref type="bibr">[4]</ref> demonstrated the equivalence of elastic scheduling to the problem of minimizing a weighted sum of squared deviations of each task's compressed utilization from its nominal value, constrained by each task's minimum utilization and the total utilization bound of the system. The model was extended to constrained-deadline tasks, for which utilization compression extends periods while holding the relative deadlines constant. The constraint on total utilization was replaced by a tractable approximation of the processordemand analysis (PDA) <ref type="bibr">[5]</ref> test for earliest-deadline first (EDF) schedulability. Recently, Baruah <ref type="bibr">[6]</ref> demonstrated that these approximations result in a high degree of pessimism for certain task sets. An alternative was presented in <ref type="bibr">[6]</ref> that uses an iterative approach, increasing the total compression according to a tunable step size until the system is schedulable according to PDA. The algorithm is tuned by selecting the amount to increase compression at each step; a smaller step increases the running time of the algorithm but allows for a more precise result.</p><p>In this work, we extend this approach to deadline-monotonic (DM) uniprocessor scheduling of systems of constraineddeadline elastic tasks. We first present an iterative algorithm that similarly increases compression until schedulability is achieved according to the response time analysis (RTA) test <ref type="bibr">[7]</ref>. We then present two refinements to this algorithm, both leveraging the observation that once a task has been compressed to schedulability according to RTA, it remains schedulable when more compression is applied to the system. The first refinement iterates over tasks in order of decreasing priority, increasing total compression until that task is schedulable under RTA before considering the next task. The second performs binary search over the range of allowed compression, skipping RTA for tasks that are already known to be schedulable at lower levels of compression.</p><p>Next, we formulate the problem of finding the optimal amount of compression to guarantee schedulability for a single task as a mixed integer quadratic program (MIQP). This allows us to present an alternative algorithm that considers each task in turn; if a task is not RTA schedulable for the current level of system compression, the MIQP is solved to find the exact amount of compression necessary to schedule the task. By iterating over each task, we can determine the minimum sufficient compression that must be applied to the task system.</p><p>We implement the latter three approaches, using SCIP <ref type="bibr">[8]</ref> to solve the MIQP. By evaluating each algorithm for randomlygenerated synthetic task sets, we demonstrate that the approximate procedures are both highly efficient and typically give a result close enough to optimal to be useful for online scheduling decisions in low-powered embedded devices. We also show that, when an optimal solution is desired, the MIQP may be solved feasibly offline to compress task periods.</p><p>The remainder of this paper is organized as follows:</p><p>Section II, we provide the necessary background on system models used in this paper. Section III presents a basic iterative algorithm to compress tasks until RTA guarantees schedulability. Sections I V and V refine the algorithm to a more efficient iterative approach and a binary search, respectively. Section V I formulates an MIQP representation of the problem of finding the optimal amount of compression to schedule a single task, then applies this to a complete task system. In Section VII, we show results of our evaluation of those approaches. Finally, Section VIII concludes the paper and discusses the contexts under which each approach may be relevant.</p><p>The elastic model for recurrent, implicit-deadline tasks on a uniprocessor <ref type="bibr">[1]</ref>, <ref type="bibr">[2]</ref> characterizes each task &#964;i =(Ci , U mi n , U max , Ui , Ei ) by five non-negative parameters:</p><p>&#8226; Ci : The task's worst-case execution time.</p><p>&#8226; U max : The task's maximum utilization, i.e., its nominal value when executing at the desired service level in an uncompressed state.</p><p>&#8226; U min : Its minimum utilization, i.e., a bound on the amount its service can degrade.</p><p>&#8226; Ui: The task's assigned utilization, constrained to U min &#8804; Ui &#8804; U max (the value of this parameter needs to be assigned prior to run-time).</p><p>&#8226; E i : An elastic constant, representing "the flexibility of the task to vary its utilization" <ref type="bibr">[1]</ref>.</p><p>A task system &#915; = {&#964;1, . . . , &#964;n} has a total uncompressed utilization U max expressed as</p><p>and a desired utilization U D representing the utilization bound given by the scheduling algorithm in use. In the event of system overload, i.e., if U max &gt; UD , the elastic model assigns a utilization Ui to each task &#964;i according to these conditions:</p><p>&#8226; U n = UD , i.e., total utilization is set to the schedulable bound.</p><p>&#8226; Any task for which E i = 0 is considered inelastic; we consider this equivalent to the case that U min = U max .</p><p>&#8226; For all other tasks &#964;i and &#964;j , if Ui &gt; U min and Uj &gt; U min , then Ui and Uj must satisfy the relationship U max -Ui U max -Uj E i E j Put simply, the model compresses each task's utilization such that it is reduced from its desired maximum proportionally to the task's elasticity parameter, subject to the constraint that it remains no less than the specified minimum. <ref type="foot">1</ref> Compression is then realized by adjusting each task's period Ti according to its new utilization, i.e., Ti = Ci /Ui . The original algorithm presented in <ref type="bibr">[1]</ref>, <ref type="bibr">[2]</ref> for assigning utilizations under this model executed in time quadratic in the number of elastic tasks. A recent improvement <ref type="bibr">[9]</ref> yielded a more efficient algorithm that runs in quasilinear time (or linear time for admission of a new task).</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>B. Constrained-Deadline Tasks</head><p>In <ref type="bibr">[3]</ref>, <ref type="bibr">[4]</ref>, Chantem et al. showed that utilizations selected by the elastic model also solve the following quadratic programming problem:</p><p>This allowed for an extension of the model to constraineddeadline tasks. A task &#964;i = (Ci , Di , U min , U max , Ui , Ei ) is now characterized with an additional parameter, D i , representing a relative deadline that remains fixed even if the task's period is extended in response to reduced utilization. Under the constrained deadline model, only tasks for which D i &#8804; Ti (i.e., D i &#8804; Ci /U ma x ) are considered. The schedulability constraint (Eqn. 2b) is replaced by a representation of the PDA <ref type="bibr">[5]</ref> schedulability test. PDA is an optimal technique for schedulability analysis of constraineddeadline sporadic task systems under preemptive EDF scheduling on a uniprocessor. It considers the demand bound function D B F i (t) for each task &#964;i, which denotes the maximum possible cumulative execution required by jobs of the task that arrive and have their deadlines within any contiguous interval of duration t &#8805; 0. This can be computed as:</p><p>i For t &#8805; 0 and D i &#8804; Ti, this can be expressed more simply as:</p><p>A constrained-deadline task system &#915; = {&#964;1, . . . , &#964;n} is schedulable under preemptive EDF on a uniprocessor if and only if for all t &gt; 0,</p><p>In <ref type="bibr">[5]</ref>, it was shown that it is sufficient to check this condition for values of t within the first hyperperiod that take the form ( k T i + D i ) for non-negative integers k. This set of values constitute the PDA testing set. For elastic scheduling, Chantem et al. <ref type="bibr">[3]</ref>, <ref type="bibr">[4]</ref> add a constraint in the form of Eqn. 5 for each element of the testing set to the optimization problem represented by Eqn. 2.</p><p>However, the resulting problem may not be tractable. The size of the testing set may be exponential in general, and</p><p>pseudo-polynomial for bounded-utilization tasks, and may result in an optimization problem with too many constraints to be efficiently solvable. Also, due to its use of the floor function, D B F i (t) is not a linear expression, and so the optimization problem does not remain a quadratic program. Chantem et al. <ref type="bibr">[3]</ref>, <ref type="bibr">[4]</ref> over-approximate the demand-bound function by removing the floor. Nonetheless, because the test set itself depends on the task periods, the times defining the RHS of the constraints formed by Eqn. 5 are variables in the optimization problem, and the problem remains non-linear. Chantem et al. <ref type="bibr">[3]</ref>, <ref type="bibr">[4]</ref> introduced an approximate form of the problem, and a heuristic approach to solving it, that were proved correct in the sense that the resulting compressed system would be guaranteed schedulable.</p><p>In recent work <ref type="bibr">[6]</ref>, Baruah showed that these approximations are highly conservative and may result in significant overcompression for certain task sets. Two alternative approaches were presented; in this paper, we extend these to fixed-priority DM scheduling. Baruah introduces a term &#955; representing the degree by which compression is applied to the task system. Recall that in the original model <ref type="bibr">[1]</ref>, <ref type="bibr">[2]</ref>, each task &#964;i is compressed proportionally to its elasticity E i , but not beyond its minimum utilization U min . This allows us to express the utilization Ui of each task as:</p><p>Since Ti = Ci /Ui , we define T min = C i /U m a x and T max = Ci /U min . Then for &#955; &lt; Ci /(Ei T m i n ):</p><p>In an uncompressed state, &#955; = 0 and for each task, Ui = U max (equivalently, Ti = T min ). The values U min also imply a value &#955; max beyond which the utilization of task &#964;i cannot be compressed further:</p><p>Baruah also defines a value &#955;max beyond which the system cannot be further compressed <ref type="bibr">[6]</ref>; we express it as:</p><p>which implies an alternative expression for Ti as follows:</p><p>Baruah <ref type="bibr">[6]</ref> also introduces the notation &#915;(&#955;), representing the task system obtained from &#915; by applying compression &#955;, i.e., with each task &#964;i having a period Ti according to Eqn. 7. An optimal algorithm, then, for elastic scheduling of constrained-deadline task systems under EDF finds the value &#955; representing the minimum value &#955; for which &#915; ( &#955; ) is schedulable. In <ref type="bibr">[6]</ref>, Baruah presents two algorithms that, while not optimal, are nonetheless tunable by a parameter &#1013;; both algorithms are guaranteed to find a value &#955; &lt; &#955; + &#1013; for which &#915; ( &#955; ) is schedulable. We summarize both:</p><p>1) E L A S T I C : This algorithm iterates over values of &#955; [0, &#955;max] with granularity &#1013;. For each value of &#955; tested, it performs PDA over the task set &#915;(&#955;). Once PDA indicates schedulability, the search stops, and compression is applied. For efficiency, binary search is proposed as an alternative. For a considered value of &#955;, if PDA indicates schedulability, a smaller value of &#955; is subsequently tested; if not, a larger value is checked. The binary search limits the number of times PDA is performed to log &#955; m a x ; PDA is itself pseudopolynomial for bounded-utilization task systems.</p><p>2) E L A S T I C -E FFI C I E N T : A more efficient algorithm is supported by two observations in <ref type="bibr">[6]</ref>, repeated here: Observation 1. If a given sporadic task system &#915; satisfies Expression 5 for a given value of t (say, to), then any task system &#915; &#8242; obtained from &#915; by increasing the period parameters of one or more tasks also satisfies Expression 5 for to. Observation 2. Let &#915; denote some constrained-deadline elastic sporadic task system, and &#955;, &#1013;, and ts denote positive numbers. If all elements in the testing set of &#915; ( &#955; ) that are &#8804; ts satisfy Condition 5, then all elements in the testing set of &#915; ( &#955; + &#1013;) that are &#8804; ts also satisfy Condition 5</p><p>The algorithm proceeds by iterating over values of &#955;, beginning with &#955; = 0. It considers elements of the PDA testing set in increasing order. Baruah observes that the testing set need not be enumerated in its entirety a priori <ref type="bibr">[6]</ref>; instead, the current element being tested, to, can be updated to the smallest value from amongst the next deadlines of each task. When an element is reached for which PDA fails at the current test set element to, &#955; is incremented by &#1013;. Observation 2 implies that once PDA succeeds at to, only larger values need to be tested. Once the test set is exhausted, the current value &#955; is returned. However, if &#955; reaches &#955;max, the algorithm terminates, as the task system remains unschedulable even under compression.</p><p>Because the algorithm essentially performs a single PDA (the testing set is only traversed once), while additionally recomputing the periods of each task &#964;i in &#915; ( &#955; ) for each value of &#955;, the worst-case running time of the algorithm is:</p><p>where n denotes the number of tasks in &#915;. For constant &#1013;, this is dominated by the running time of PDA.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>I I I . E X T E N S I O N T O F I X E D -P R I O R I T Y S C H E D U L I N G</head><p>In this section, we present a simple extension of Baruah's algorithm E L A S T I C <ref type="bibr">[6]</ref> (summarized in Section II-B2) to fixed-priority deadline-monotonic (DM) scheduling, which maintains the priority order of tasks as their periods are extended. The procedure is outlined in Algorithm 1. Given a system &#915; of elastic constrained-deadline tasks (characterized as described in Section II), it seeks to determine the smallest value of &#955; for which &#915; ( &#955; ) is schedulable. Like the E L A S T I C algorithm, its precision is tunable by a parameter &#1013;; the value &#955; found is guaranteed to be less than &#955; +&#1013;.  The algorithm initializes &#955;, the amount of compression to be applied, to 0. It then increases &#955; in steps of size &#1013;, performing RTA for the complete task set &#915; ( &#955; ) for each value of &#955;. Once &#955; is found for which schedulability is achieved, the algorithm terminates and the value is returned. However, if &#955; exceeds &#955;max, the utilization constraints on each task prevent the system from being scheduled under the elastic model. Running Time: Since at most &#955; max /&#1013; calls are made to RTA by the algorithm E L A S T I C -F P , its worst-case running time is &#955; m a x &#215; the worst-case running time of RTA (which is pseudo-polynomial in the representation of the task system).</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>I V. A N E F F I C I E N T I T E R AT I V E A P P RO AC H</head><p>In this section, we present the first of two refinements to Algorithm 1 (E L A S T I C -F P). We begin with a brief summary of Audsley et al.'s response time analysis (RTA) <ref type="bibr">[7]</ref>, which will provide a key observation leveraged by both refinements.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>A. Response-Time Analysis</head><p>A task set &#915; is schedulable if and only if the response time of each task does not exceed its deadline. Under fixed-priority preemptive scheduling, the response time R i of a task &#964;i is characterized as the sum of its execution time C i and the interference I i of the higher priority tasks; the interference is, itself, a function of the response time. Assuming without loss of generality that tasks are indexed by decreasing priority, the following expression describes the response time:</p><p>Audsley et al. <ref type="bibr">[7]</ref> describe a recursive process by which to determine the response time; the system is schedulable if and only if R i does not exceed the deadline D i for each task &#964;i. If used in the context of RTA, our algorithm requires up to &#955; max /&#1013; calls to RTA in the worst case. However, the following observation provides a slight improvement to execution time: Observation 3. If the condition R i &#8804; D i holds for a task &#964;i in &#915;(&#955;), then the condition also holds for the same task &#964;i in &#915; ( &#955; + &#948;) for any &#948; &gt; 0.</p><p>Proof. Since the period Ti only appears in the denominator in the expression for computing response time (Eqn. 11), and the period does not decrease as &#955; increases (from Eqn. 10), it follows that R i does not increase when increasing &#955;. Therefore, if R i &#8804; D i for some &#955;, the inequality still holds as &#955; increases.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>B. The Algorithm</head><p>This observation implies that Algorithm 1 can be improved by considering only a single task at a time. RTA requires checking every task in a task system, but once a task is shown to be schedulable for a given value of &#955;, it need not be rechecked for larger values. The resulting improvement is outlined in Algorithm 2.</p><p>Algorithm 2: Elastic-FP-Efficient(&#915;)</p><p>1 Input: Elastic constrained-deadline task system &#915; 2 Output: Smallest &#955; such that &#915; ( &#955; ) is DM-schedulable 3 &#955; &#8592; 0 4 &#955;max computed according to Eqn. 9 As in Algorithm 1 (E L A S T I C -F P), E L A S T I C -F P -E FFI C I E N T begins by initializing &#955; to 0. It considers tasks in turn, beginning with &#964;1, the highest-priority task. The algorithm introduces the notation &#964; i (&#955;) to refer to task &#964;i &#915;(&#955;), i.e., task &#964;i having a period Ti according to Eqn. 10 for the given value of &#955;. When RTA determines that the current task under consideration, &#964;i, is unschedulable for the current value of &#955;, the algorithm increases &#955; in steps of &#1013; until the task is schedulable. At this point, it considers the next task in the system. If there are no tasks remaining to be checked (line 9), the algorithm terminates and returns the current value of &#955;. However, if the value of &#955; exceeds &#955; max , the algorithm fails.</p><p>Running Time: As before, at most &#955; max /&#1013; values of &#955; are checked by the algorithm E L A S T I C -F P -E FFI C I E N T . However, RTA is only performed for a single task at a time. For a single value of &#955;, no more than a single failing check can be made. Additionally, each task need only have a single successful Observation 3 implies that, when testing using RTA to test &#915; ( &#955; ) for schedulability, any tasks already known to be schedulable for smaller values of &#955; do not need to be rechecked. The complete procedure is outlined in Algorithm 3. The algorithm first performs RTA for &#915;(&#955;ma x ); if it is not schedulable, the algorithm fails. Otherwise, it performs binary search over values of &#955; in the range [0, &#955;max]: &#955;hi (initialized to &#955;max) tracks the smallest value of &#955; tested for which &#915; ( &#955; ) is schedulable, while &#955;lo (initialized to 0) tracks the largest tested value for which &#915; ( &#955; ) is not schedulable. A variable S tracks the indices of tasks in &#915;(&#955;lo ) that are schedulable. <ref type="foot">2</ref> At each step, the algorithm performs RTA for those tasks &#964;i &#915; ( &#955; ) that are not in S . If all tasks are schedulable, &#955;hi is decreased to the tested value of &#955;; otherwise, &#955;lo is increased to the tested value of &#955; and S is updated to include those tasks for which RTA nonetheless succeeded. The algorithm terminates when the difference between &#955;hi and &#955;lo does not exceed &#1013;, at which point it is guaranteed that &#955;hi &lt; &#955; + &#1013; for optimal &#955; , since &#955; &gt; &#955;lo.</p><p>Running Time: Since algorithm E L A S T I C -F P -B S requires RTA to be performed for all tasks in &#915;(&#955;max ) prior to the binary search, in the worst case log (&#955;max /&#1013;) + 1 total calls are made to RTA. The use of the variable S to track tasks already known to be schedulable for smaller values of &#955; may improve the execution time for some task sets; indeed, if &#955; &gt; &#955;max -&#1013;, and if RTA determines schedulability for all but one task at &#955; = &#955;max /2, then binary search will only proceed upward, and RTA will only need to be performed for a single task at each checked value of &#955; thereafter. In this case, RTA for a single task is performed only</p><p>times. This is more efficient than Algorithm 2 (E L A S T I C -F P -</p><p>For &#1013; chosen such that &#955;max /&#1013; = 1000, this is more efficient for systems of fewer than 990 tasks. On the other hand, if &#955; &lt; &#1013;, binary search will only proceed downward, so S remains empty, and so RTA must be performed for all tasks in &#915; for each tested value of &#955;. In this case, RTA must be performed (i.e., RTA will succeed for each value of &#955; checked), in which case the analysis must be performed for each elastic task &#964;i &#915; . In this case, RTA for a single task is performed log 2 max + 1 &#215; n times. This is more efficient than Algorithm 2 (E L A S T I C -F P -</p><p>For &#1013; chosen such that &#955;max /&#1013; = 1000, this is more efficient only if the system has fewer than 100 tasks. In Section VII, we evaluate both algorithms to compare their performance in the context of randomly-generated synthetic task sets.</p><p>V I . A N MIQP R E P R E S E N TAT I O N In this section we describe how the problem of finding the value &#955; representing the minimum amount of compression to apply to a fixed-priority, preemptive task system &#915; to guarantee</p><p>schedulability of a single task &#964;i can be formulated as a mixed integer quadratic program (MIQP). We then use this result to present an algorithm that finds the optimal compression value &#955; for the complete task system.</p><p>A. Formulating the MIQP We build upon the mixed integer linear programming representation of RTA given in <ref type="bibr">[10]</ref>. In <ref type="bibr">[11]</ref>, it is shown that for a fixed-priority, preemptive task system &#915; to be schedulable, it is necessary and sufficient that for each &#964;i &#915; , there exists some value of t &#8804; D i for which:</p><p>The minimum value of t satisfying this condition for &#964;i is the response time of the task. However, unlike in <ref type="bibr">[10]</ref>, we do not seek to find the minimum value of t for each task. Instead, for a single task &#964;i, we seek to find the minimum value of &#955; i for which there exists a t &lt; D i satisfying Eqn. 15 for &#915;(&#955;). In other words, it must satisfy:</p><p>for Tj (&#955; i ) as defined in Eqn. 10. The MIQP problem is formulated as follows:</p><p>1) For task &#964;i, we define a real-valued variable ti representing some value of t for which Eqn. 15 holds. Unlike in <ref type="bibr">[10]</ref>, where the corresponding R i is non-negative, we restrict ti to be positive: if ti = 0 satisfies Eqn. 15, then C i = 0, in which case the task can be ignored. This becomes an important distinction in a later step.</p><p>2) We specify the constraint:</p><p>3) As in <ref type="bibr">[10]</ref>, for each j {1, . . . , i -i}, we define a nonnegative integer variable Z i j that represents the term ti /Tj (&#955;i ) . 4) As in <ref type="bibr">[10]</ref>, to enforce this intended interpretation on the Z i j variables, we must add constraints of the form Z i j &#8805; ti /Tj (&#955;i ) for each j {1, . . . , i -i}. Since Z i j is specified to be an integer variable, this will respect the ceiling operator that appears in Eqn. 15.</p><p>From the formulation of Tj (&#955;i ) in Eqn. 10, we can express the term ti /Tj (&#955; i ) as:</p><p>This requires two linear constraints for each Z i j : j {1, . . . , i -1}, Z i j &#8805; T max (18) 3 Without loss of generality, we again assume tasks are indexed in decreasing order of priority. j {1, . . . , i -1}, Z i j &#8805;</p><p>Because ti is itself a variable, and &#955; i is the value we want to minimize ultimately, we rewrite this expression: ! 0 &#8804; Z i j -</p><p>This is a quadratic constraint, as it contains the term ti &#955;i . 5) As in <ref type="bibr">[10]</ref>, we add a final constraint for Eqn. 16:</p><p>6) To find the minimum value of &#955; i for which the problem can be satisfied, we add the following objective function:</p><p>Recall that in Step 1 of the MIQP, t i is restricted to the positive reals; this implies that if a solution exists, &#955; i is welldefined for any value of ti.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>B. The Resulting Algorithm</head><p>By solving an MIQP, we can find the exact value of &#955; i by which to compress a task system &#915; to guarantee schedulability for an individual task according to RTA. We now present an algorithm that extends this approach to finding the optimal value, &#955; , representing the minimum amount of compression to guarantee schedulability of all tasks. The procedure is outlined in Algorithm 4. The algorithm initializes &#955; to 0. Each task in the system is checked for schedulability under the current compression level using RTA. Once a task &#964;i is found that cannot be scheduled, the MIQP described in Section VI-A is constructed and solved for that task. If no solution is found, the minimum utilization constraints of its constituent tasks prevent the system from compressing to schedulability. Otherwise, &#955; is updated to &#955; , and the remaining tasks are checked in the same manner.</p><p>Running Time: For a task system &#915; of n tasks, algorithm E L A S T I C -F P -M I Q P must perform RTA for each task (the equivalent of performing RTA once over the complete task system). It must also solve, in the worst-case, n instances of the MIQP problem. Even the decision version of the problem (showing the existence of a &#955; that satisfies schedulability) is N P -complete. Nonetheless, as we demonstrate in Section VII, this procedure can often efficiently find the optimal amount of compression using off-the-shelf solvers.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>V I I . E VA L U AT I O N</head><p>To evaluate the effectiveness and efficiency of the E L A S T I C -F P -E FFI C I E N T (Alg. 2), E L A S T I C -F P -B S (Alg. 3), and E L A S T I C -F P -M I Q P (Alg. 4) procedures, we run them over a large collection of randomly-generated constrained-deadline task sets. We track their execution, both in time and calls to RTA. We also analyze the overhead incurred by using these algorithms for online admission control in an embedded system running an ARM Cortex-A53 processor. Finally, we compare the compression values &#955; produced by each algorithm.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>A. Generating Task Sets</head><p>To evaluate elastic scheduling for constrained-deadline tasks, we consider tasks that begin with a relative deadline D i equal to their period Ti. Tasks individually have a utilization not exceeding 1, but the task systems as a whole are not schedulable due to their joint utilizations exceeding the utilization bound of the system. To accommodate such a task system, each task has its period extended while its deadline remains the same. We generate task sets of size  in steps of 10. For each size, we consider total utilizations in the range [1.0-2.0] in steps of 0.1. For each combination of size/utilization we generate 100 sets of tasks (for a total of 11 000) according to the following methodology:</p><p>1) Uncompressed task periods T min are generated using a loguniform distribution (per <ref type="bibr">[12]</ref>) in .</p><p>2) Task deadlines D i are set equal to T min .</p><p>3) Tasks are sorted according to increasing deadline (decreasing priority under DM scheduling). 4) The total utilization of the task system is partitioned among tasks using the UUniSort technique (a more elegant version of UUniFast) <ref type="bibr">[13]</ref>, such that each task is assigned a utilization U max .</p><p>5) Execution time is assigned according to Ci =U m a x &#215;T m i n . 6) A minimum utilization U min is assigned to each task so that the total utilization cannot exceed 0.69, the Liu and Layland schedulability bound of a rate-monotonic implicitdeadline task system <ref type="bibr">[14]</ref>. To do so, we define a constant s = 0.69/USUM, where USUM is the total utilization of the task set. We then obtain U min by multiplying each task's U max by a random value uniformly selected from the range [0-s]. On average, the total minimum utilization is expected to be 0.345, with a narrower distribution for larger task sets. This is illustrated in Fig. <ref type="figure">1</ref>. 7) The maximum period is derived as T max = U min /Ci . 8) Elasticity E i is uniformly selected in [0-1].</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>B. Execution Efficiency</head><p>We implement the recursive RTA of Audsley et al. <ref type="bibr">[7]</ref> and the three algorithms we consider in C++, into which we link version 8 <ref type="bibr">[15]</ref> of the SCIP constraint integer program solver <ref type="bibr">[8]</ref> to execute the MIQP. Offline Elastic Scheduling: Elastic scheduling can be leveraged in situations where a task set is compressed online for scheduling on an overutilized target system. To consider this case, we evaluate the execution of our algorithms on a server with two Intel Xeon Gold 6130 (Skylake) processors running at 2.1 GHz, and with 32GB of memory.</p><p>We begin by executing both E L A S T I C -F P -E FFI C I E N T and E L A S T I C -F P -B S sequentially in a single-threaded environment over all 11 000 task sets. For each task set, we consider values of &#1013; that divide the compression limit &#955; max respectively 100, 1000, and 10 000 times. Mean execution times are illustrated in Fig. <ref type="figure">2</ref>. Both algorithms are quite efficient, with mean execution times not exceeding 4 milliseconds for the task sets tested. For larger values of &#1013;, iteration is more efficient on average than binary search; but as &#1013; gets smaller, E L A S T I C -F P -B S becomes faster. Worst observed execution times (WOET) and maximum total calls to RTA 4 are listed in Table <ref type="table">I</ref>. As expected, algorithm running times are closely related to the number of calls to RTA. We then run E L A S T I C -F P -M I Q P over a subset of our generated task systems, limited to those with no more than 50 4 Performing response time analysis for a single task counts 1 call to RTA.  tasks. The solver is configured to execute in a single thread, which allows us to run separate instances of the algorithm sequentially on each of the unused logical cores on our server, splitting up the work of compressing the 5500 considered task systems. Execution time distributions are illustrated in Fig. <ref type="figure">3</ref>. For task sets with 20 or fewer tasks, the algorithm consistently completes in under 10 seconds. Even with up to 40 tasks, the algorithm finds an optimal value of &#955; in under 3 minutes (and often under 10 seconds). However, for systems of 50 tasks, the solver may be slow to produce the optimal solution. For 95% of task sets with 50 tasks, an optimal solution is returned in under 80 seconds. However, three of the task sets take over 2 hours to complete, with the longest taking 5.1 hours.</p><p>Online Elastic Scheduling: Elastic scheduling can also be used for online adaption of task rates, e.g., when admitting new tasks on a fully-utilized system, or when task execution times change in response to dynamic exogenous factors. Despite its precision, the uncertain execution time to solve the MIQP make the E L A S T I C -F P -M I Q P algorithm unsuitable for online scheduling decisions in real-time systems. We consider instead the worst observed execution times of the E L A S T I C -F P -E FF I C I E N T and E L A S T I C -F P -B S algorithms when running on an embedded system. We apply both algorithms to each of the 11 000 randomly-generated task sets, again using values of &#955; max /&#1013; in {100, 1000, 10 000}. We measure their execution times on a single core of a Raspberry Pi 3 Model B+, which has a Broadcom BCM2837B0 system-on-chip with an ARM Cortex-A53 running at 1.4GHz. For each combination of size/utilization, we take the maximum execution time among the 100 task sets tested; these are plotted in Fig. time and accuracy. We first compare the relative compression achieved by the three algorithms to illustrate when approximation may be sufficient. We define the metric &#955; -&#955; &#955; max representing the difference between the compression value &#955; returned by an approximate algorithm and the optimal &#955; returned by E L A S T I C -F P -M IQ P, normalized by &#955; max . We compare values of &#948; between E L A S T I C -F P -E F F I C I E N T and E L A S T I C -F P -B S for each of the three values of &#1013;/&#955; max considered. The relative distributions are plotted in Fig. <ref type="figure">5</ref>. To achieve the same range of values in the horizontal axes of each plot, we multiply by &#1013;/&#955; max , with values closer to 0 representing better agreement with &#955; . We observe that, while similar, E L A S T I C -F P -B S tends to do better than E L A S T I C -F P -E FFI C I E N T . Since it is also more efficient for finer granularity of &#1013;, this likely makes it the preferred choice among the two approximate algorithms.</p><p>To quantify the effect of using an approximate algorithm to enact period compression over an elastic task set, we next compare the relative periods achieved by each algorithm. We define the metric &#952;i = T i (&#955;)/Ti (&#955; ) representing the ratio of a task's period when compressed by an approximate algorithm to the period under optimal compression. We compare values of &#952;i between E L A S T I C -F P -E FFI C I E N T and E L A S T I C -F P -B S for each of the three values of &#1013;/&#955; max considered. Results for the 162 420 total tasks for which compression was achieved are summarized in Table <ref type="table">II</ref>. In this work, we have extended uniprocessor elastic scheduling to fixed-priority, constrained-deadline tasks. We have presented three algorithms: E L A S T I C -F P -E FFI C I E N T , which applies compression iteratively using step sizes of a tunable value &#1013;; E L A S T I C -F P -B S, which performs a binary search over the range of possible compression values, also using a precision of &#1013;; and E L A S T I C -F P -M I QP, which formulates the problem of finding the exact amount of compression to apply as a mixed integer quadratic program.</p><p>We have demonstrated that both approximate algorithms are highly efficient. Even for systems of 100 tasks and small values of &#1013;, E L A S T I C -F P -B S enables compression on the order of tens of milliseconds on a Raspberry Pi 3 Model B+. We also observed that, when compared to the optimal compression achieved by the MIQP approach, the approximate algorithms overcompress periods by less than 10% for 99.5% of tasks tested. However, in very rare corner cases ( &lt; 0.006% of tested tasks), the iterative algorithms overcompress periods by more than 10&#215; the optimal compression. Therefore, for offline scheduling decisions, E L A S T I C -F P -M I Q P may still remain a better choice. Even for task sets of size 50, the on Real Time Programm ng, Atlanta, GA, USA, 15-17 May 1991. algorithm completed in under 1.5 minutes 95% of the time, though we did observe 3 task sets for which the MIQP took over 2 hours to finish.</p><p>As future work, we intend to extend constrained-deadline elastic scheduling (including the PDA-based approach in <ref type="bibr">[6]</ref> for EDF scheduling) to consider multiprocessor and distributed systems and computationally elastic tasks for which workloads, instead of periods, are compressed. We also plan to investigate whether an MIQP can be formulated to find optimal compression for dynamic-priority algorithms (e.g., EDF). Extensions to the MIQP may prove useful for handling additional constraints imposed under different system models.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>R E F E R E N C E S</head></div><note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="1" xml:id="foot_0"><p>This statement holds true for inelastic tasks, as E = 0 implies U m i n = U m a x , and therefore the utilization is not reduced.</p></note>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="2" xml:id="foot_1"><p>S can be implemented as a bitmask or an array, allowing O ( 1) checking and insertion for a given task index.</p></note>
		</body>
		</text>
</TEI>
