<?xml version="1.0" encoding="UTF-8"?>
<TEI xml:space="preserve" xmlns="http://www.tei-c.org/ns/1.0" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xsi:schemaLocation="http://www.tei-c.org/ns/1.0 https://raw.githubusercontent.com/kermitt2/grobid/master/grobid-home/schemas/xsd/Grobid.xsd"
 xmlns:xlink="http://www.w3.org/1999/xlink">
	<teiHeader xml:lang="en">
		<fileDesc>
			<titleStmt>
				<title level="a" type="main">Optimal Priority and Threshold Assignment for Fixed-priority Preemption Threshold Scheduling *</title>
			</titleStmt>
			<publicationStmt>
				<publisher/>
				<availability status="unknown"><licence/></availability>
			</publicationStmt>
			<sourceDesc>
				<biblStruct>
					<analytic>
						<author>
							<persName><forename type="first">Leo</forename><surname>Hatvani</surname></persName>
							<email>l.hatvani@tue.nl</email>
						</author>
						<author>
							<persName><forename type="first">Sara</forename><surname>Afshar</surname></persName>
							<email>sara.afshar@mdh.se</email>
						</author>
						<author>
							<persName><forename type="first">Reinder</forename><forename type="middle">J</forename><surname>Bril</surname></persName>
							<email>r.j.bril@tue.nl</email>
						</author>
						<author>
							<affiliation key="aff0">
								<orgName type="institution">Technische Universiteit Eindhoven (TU</orgName>
								<address>
									<country key="NL">The Netherlands</country>
								</address>
							</affiliation>
						</author>
						<author>
							<affiliation key="aff1">
								<orgName type="institution">Mälardalen University (MDH)</orgName>
								<address>
									<settlement>Västerås</settlement>
									<country key="SE">Sweden</country>
								</address>
							</affiliation>
						</author>
						<author>
							<affiliation key="aff2">
								<orgName type="institution">Technische Universiteit Eindhoven (TU</orgName>
							</affiliation>
						</author>
						<author>
							<affiliation key="aff3">
								<orgName type="institution">The</orgName>
								<address>
									<country key="NL">Netherlands</country>
								</address>
							</affiliation>
						</author>
						<author>
							<affiliation key="aff4">
								<orgName type="institution">Mälardalen University (MDH)</orgName>
								<address>
									<settlement>Västerås</settlement>
									<country key="SE">Sweden</country>
								</address>
							</affiliation>
						</author>
						<title level="a" type="main">Optimal Priority and Threshold Assignment for Fixed-priority Preemption Threshold Scheduling *</title>
					</analytic>
					<monogr>
						<imprint>
							<date/>
						</imprint>
					</monogr>
					<idno type="MD5">EE0C8C487385081B76BCFFE679DB4181</idno>
				</biblStruct>
			</sourceDesc>
		</fileDesc>
		<encodingDesc>
			<appInfo>
				<application version="0.7.2" ident="GROBID" when="2023-03-24T09:13+0000">
					<desc>GROBID - A machine learning software for extracting information from scholarly documents</desc>
					<ref target="https://github.com/kermitt2/grobid"/>
				</application>
			</appInfo>
		</encodingDesc>
		<profileDesc>
			<abstract>
<div xmlns="http://www.tei-c.org/ns/1.0"><p>Fixed-priority preemption-threshold scheduling (FPTS) is a generalization of fixed-priority preemptive scheduling (FPPS) and fixed-priority non-preemptive scheduling (FPNS). Since FPPS and FPNS are incomparable in terms of potential schedulability, FPTS has the advantage that it can schedule any task set schedulable by FPPS or FPNS and some that are not schedulable by either. FPTS is based on the idea that each task is assigned a priority and a preemption threshold. While tasks are admitted into the system according to their priorities, they can only be preempted by tasks that have priority higher than the preemption threshold.</p><p>This paper presents a new optimal priority and preemption threshold assignment (OPTA) algorithm for FPTS which in general outperforms the existing algorithms in terms of the size of the explored state-space and the total number of worst case response time calculations performed. The algorithm is based on back-tracking, i.e. it traverses the space of potential priorities and preemption thresholds, while pruning infeasible paths, and returns the first assignment deemed schedulable.</p><p>We present the evaluation results where we compare the complexity of the new algorithm with the existing one. We show that the new algorithm significantly reduces the time needed to find a solution. Through a comparative evaluation, we show the improvements that can be achieved in terms of schedulability ratio by our OPTA compared to a deadline monotonic priority assignment.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>CCS Concepts</head><p>•Computer systems organization → Embedded software; •Software and its engineering → Real-time schedulability;</p></div>
			</abstract>
		</profileDesc>
	</teiHeader>
	<text xml:lang="en">
		<body>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="1.">INTRODUCTION</head><p>Scheduling theory has been widely studied over the years to provide effective scheduling solutions for real-time embedded systems. Scheduling algorithms can be divided into fixed-priority and dynamic-priority, where the priorities of tasks stay the same throughout the execution of the system for the former ones and change depending on some parameter for the latter ones. Even though it can be said that they lack * This work is supported by the ARTEMIS Joint Undertaking project EMC 2 (grant agreement 621429). EWiLi'16, October 6th, 2016, Pittsburgh, USA.</p><p>Copyright retained by the authors.</p><p>the flexibility of dynamic-priority algorithms, fixed-priority scheduling algorithms are a de facto standard in industry due to their lower implementation and execution overhead compared to dynamic-priority algorithms.</p><p>Another way of classifying scheduling algorithms is whether they allow a task that is currently executing to be preempted or not, these are preemptive and non-preemptive scheduling algorithms. Recently, new scheduling approaches have been proposed as an alternative to the extremes of fully preemptive and non-preemptive scheduling. One such scheduling approach is called fixed-priority preemption threshold scheduling (FPTS) <ref type="bibr" target="#b11">[12,</ref><ref type="bibr" target="#b10">11]</ref> where each task τi is annotated by a preemption threshold θi besides its priority πi. Preemption threshold for a task specifies which tasks can preempt it and is always greater than or equal to the priority of that task. If a task's priority is higher than the preemption threshold of the currently executing task, it is allowed to preempt the executing task. This means that as soon as the task starts executing, its effective priority is increased to its preemption threshold.</p><p>There are two special cases of the FPTS scheduling algorithm. First, when the preemption threshold of every task is equal to the task's priority, FPTS becomes equivalent to the FPPS scheduling algorithm. Second, when all preemption thresholds are equal to the highest priority in the system, FPTS becomes equivalent to FPNS, as no task can preempt any other task.</p><p>FPTS improves the schedulability compared to both approaches by leveraging the preemption of higher priority tasks under FPPS and the blocking incurred by non-preemptive execution of lower priority tasks under FPNS. An optimal priority and threshold assignment (OPTA) algorithm for FPTS is any algorithm that for a given set of tasks determines if it can be scheduled by means of FPTS and when it can be scheduled provides task priorities and thresholds. The original OPTA for FPTS has been introduced by Wang and Saksena <ref type="bibr" target="#b11">[12]</ref>. However, the high computation time required to find a feasible solution using this algorithm, if such exists, warrants research into more efficient approaches <ref type="bibr" target="#b5">[6]</ref>. In this paper, we introduce a new OPTA algorithm for FPTS which effectively can decrease the computation time of finding a feasible solution. Our algorithm is based on (i) backtracking, (ii) pruning to reduce the search space, and (iii) a heuristic to traverse the search space.</p><p>Contributions: In this paper we propose an algorithm for optimal priority and threshold assignment. Moreover, we show by means of experimental results that the computation time for finding a priority and threshold assignment for a set of tasks that can make them schedulable, if such a combination exists, is growing considerably slower compared to the existing solution when the number of tasks increases. Further, we present the schedulability results of comparing our proposed algorithm with FPPS and FPTS under a deadline monotonic assignment. Finally, we present a comparative evaluation of FPTS with a deadline monotonic priority assignment and optimal preemption thresholds and our OPTA, which clearly illustrates the advantage of our OPTA.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2.">MOTIVATION EXAMPLE</head><p>In this section we show by means of an example that the deadline monotonic priority assignment is not optimal for FPTS. Let us consider a task set TI which consists of 4 tasks as presented in Table <ref type="table" target="#tab_0">1</ref>. The tasks are characterized by their worst-case computation time Ci, minimum inter-arrival time Ti, deadline Di, preemption thresholds θi, and priority πi. The smaller numbers denote higher priorities. All tasks have implicit deadlines, i.e. Ti = Di, and the priorities π DM i are assigned based on deadline monotonic priority assignment, i.e. the task with the smallest deadline has the highest priority. At utilization U T I ≈ 0.982, TI is not schedulable under FPTS. If the priorities of τ3 and τ4 are exchanged (as in πi) TI becomes schedulable under FPTS with preemption thresholds θi and worst-case response times Ri.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3.">RELATED WORK</head><p>Preemption Threshold Scheduling (PTS) has been proposed by Wang and Saksena in <ref type="bibr" target="#b11">[12]</ref>. Under this approach, besides a regular priority, each task is assigned a preemption threshold up to where it can prevent preemptions. The preemption is allowed only when the priority of a ready task is higher than the threshold of the running task.</p><p>Deferred Preemptions Scheduling (DPS) has first been introduced by <ref type="bibr">Baruah [1]</ref> under Earliest Deadline First (EDF). Under this approach, for each task the longest interval that can be executed non-preemptively is specified. Two types of implementation exist for this approach based on how the non-preemptive regions are implemented: Floating model and Activation-triggered model implementation. Under the former model, non-preemptive regions are specified in the code by inserting specific primitives that disable and enable preemption. Under the later model, non-preemptive regions are specified by setting a timer at the arrival of a higher priority task which lasts for the specified non-preemptive interval.</p><p>Fixed Preemption Points (FPP) has been proposed by Burns <ref type="bibr" target="#b3">[4]</ref>. Under FPP, preemption is allowed only at predefined points during a task's execution. As a results, a task is divided into a number of non-preemptive execution chunks.</p><p>The preemption of a higher priority task is postponed until the next preemption point of a running task. This approach is also referred to as cooperative scheduling.</p><p>Worst-case response time analysis for FPTS as well as an optimal priority and preemption threshold assignment algorithm was first presented in <ref type="bibr" target="#b11">[12]</ref>. Later, in <ref type="bibr" target="#b9">[10]</ref>, it has been shown that the analysis in <ref type="bibr" target="#b11">[12]</ref> was optimistic, and a revised analysis was presented.</p><p>Worst-case response time analysis of periodic real-time tasks under fixed-priority scheduling with deferred preemption (FPDS)has been studied in <ref type="bibr" target="#b3">[4,</ref><ref type="bibr" target="#b4">5,</ref><ref type="bibr" target="#b7">8]</ref>. In <ref type="bibr" target="#b2">[3]</ref>, Bril et. al have shown that the analysis presented in <ref type="bibr" target="#b3">[4,</ref><ref type="bibr" target="#b4">5]</ref> is both pessimistic and optimistic where they have revised the analysis.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4.">SYSTEM MODEL 4.1 Task Specification</head><p>The system consist of a single processor including a set of n independent sporadic tasks. Each task τi is denoted by &lt; Ci, Di, Ti &gt;, where Ci ∈ R + denotes the worst-case execution time, Di ∈ R + denotes the relative deadline and Ti ∈ R + is the minimum inter-arrival time. We assume a constrained-deadline task model, i.e., Di ≤ Ti (even though we use a generalized analysis).</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4.2">FPTS Scheduling</head><p>Tasks are further annotated by unique priorities πi ∈ N and preemption thresholds θi ∈ N. For both, smaller values denote higher priorities. Whenever we compare priorities or thresholds, we compare their numerical values, i.e. πi &lt; πj means that task πi has a higher priority than πj. Preemption thresholds are always greater than or equal to the corresponding priorities θi ≤ πi.</p><p>Given these priorities and thresholds, the tasks are scheduled as follows. If there are no running tasks, the task τi with the highest priority among the simultaneously released tasks starts executing. As soon as it starts executing it can be preempted only by tasks τj that have priority greater than its preemption threshold πj &lt; θi. In the situation when the executing task has a higher priority than the preempted task τi and waiting task τj where θi ≤ πj, τi will always start executing before τj.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="5.">RESPONSE TIME ANALYSIS</head></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="5.1">Analysis</head><p>While worst-case response time analysis for FPTS policy has been published several times <ref type="bibr" target="#b11">[12,</ref><ref type="bibr" target="#b9">10]</ref>, in this paper we employ the exact analysis presented by Keskin et al. <ref type="bibr" target="#b6">[7]</ref> with the added assumption that there is no jitter.</p><p>A task τi releases an infinite series of jobs τ ik . Each of these jobs faces two kinds of delays to its execution: blocking and interference. Blocking (1) comes from the lower priority tasks that have a preemption threshold equal to or higher than the priority of the current task. Bi = max(0, max</p><formula xml:id="formula_0">∀j:θ j ≤π i &lt;π j Cj) ( 1 )</formula><p>Since the sequence of jobs released by the task τi is infinite, we need to determine how many jobs should be analyzed to determine whether the entire task is schedulable or not. This calculation is based on the worst-case level-i active period <ref type="bibr" target="#b2">[3]</ref> and is given as the smallest positive Li that satisfies <ref type="bibr" target="#b1">(2)</ref>.</p><formula xml:id="formula_1">Li = Bi + ∀j:π j ≤π i Li Tj Cj (2)</formula><p>The maximum number li of jobs of τi that can be executed in this level-i active period is given by <ref type="bibr" target="#b2">(3)</ref>.</p><formula xml:id="formula_2">li = Li Ti (3)</formula><p>Given the knowledge of how many jobs need to be analyzed, we can compute their worst-case start time S ik for 0 ≤ k &lt; li as the smallest positive value S ik that satisfies <ref type="bibr" target="#b3">(4)</ref>.</p><formula xml:id="formula_3">S ik = ⎧ ⎪ ⎪ ⎨ ⎪ ⎪ ⎩ Bi + kCi + ∀j:π j &lt;π i S ik T j Cj if Bi &gt; 0 kCi + ∀j:π j &lt;π i 1 + S ik T j Cj if Bi = 0</formula><p>(4) Likewise, other tasks may preempt the observed job, thus causing interference. This quantity is encompassed by calculating each job's worst-case finalization time F ik . It can be found as the smallest positive F ik that satisfies <ref type="bibr" target="#b4">(5)</ref>.</p><formula xml:id="formula_4">F ik = ⎧ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎨ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎩ S ik + Ci+ ∀j:π j &lt;θ i F ik T j − S ik T j Cj if Bi &gt; 0 S ik + Ci+ ∀j:π j &lt;θ i F ik T j − 1 + S ik T j Cj if Bi = 0</formula><p>(5) Finally, according to (6), we compute the worst-case response time as the maximum of response times of all jobs within the worst-case level-i active period.</p><formula xml:id="formula_5">Ri = max ∀k:0≤k&lt;l i (F ik − kTi) ( 6 )</formula></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="5.2">Definition and Observations</head><p>First, let us define the key concept that is the basis of our algorithm. Blocking tolerance for tasks with non-preemptive regions was introduced by Lortz and Shin <ref type="bibr" target="#b8">[9]</ref> and later exploited by Yao et al. <ref type="bibr" target="#b12">[13]</ref>. The same concept is utilized in this work with the specialization that the entire task is considered either preemptive or non-preemptive depending on the relevant priorities and thresholds.</p><p>Definition 1 (Blocking tolerance). Given a schedulable task τi in the context of a set of tasks T , its blocking tolerance βi is the maximum amount of blocking that it can experience from a lower priority task while staying schedulable.</p><p>In other words, blocking tolerance is the maximum computation time that can be assigned to a task of a lower priority that blocks the observed task without compromising the observed task's schedulability. Next, let us derive two observations that will be utilized in our algorithm.</p><p>Corollary 1. Given two tasks τi and τj with Cj &gt; βi, task τi will be rendered unschedulable if task τj blocks it (πj &gt; πi ∧ θj ≤ πi) or is assigned a priority greater than πi.</p><p>Based on Definition 1, the first part of Lemma 1 is immediately true. To observe that the second part is also true, we can inspect that while blocking value Bi in (4) influences only the start time of the task, if the same computation time is allocated to a higher priority, it is introduced into the computation of starting time (4) and optionally finishing time <ref type="bibr" target="#b4">(5)</ref> as Cj.</p><p>Lemma 1. Let τi be a task and T be a set of schedulable tasks with assigned priorities and thresholds. If task τi is not schedulable in the context of T with the lowest priority ∀πj ∈ T : πi &gt; πj and any preemption threshold, it will not be schedulable if additional tasks are added to T .</p><p>From the worst case response time equations, it is trivial to deduce that adding more interference will never reduce the response time.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="6.">OPTIMAL PRIORITY AND THRESHOLD ASSIGNMENT</head><p>In this section, we present an OPTA algorithm for FPTS. The algorithm is optimal in the sense that it will find a feasible priority and thresholds assignment that makes a task set schedulable if such solution exists. Similar to the OPTA in the work by Wang and Saksena <ref type="bibr" target="#b11">[12]</ref> (including the correction discussed in Section 7), the algorithm proposed in this paper is based on (i) backtracking, (ii) pruning the search space, and (iii) a heuristic for traversing the search space. However, unlike the Wang-Saksena OPTA, our algorithm (1) assigns priorities in a descending order, i.e. from the highest to the lowest priority, rather than in ascending order, (2) determines preemption thresholds of tasks while the priority ordering is determined, rather than determining preemption thresholds after the priority ordering is completed and (3) uses the notion of blocking tolerance rather than lateness in the heuristic.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="6.1">State-space Pruning</head><p>FPTS-OPT algorithm uses three types of pruning for infeasible priority orderings to reduce the searched state-space. All three types of pruning utilize the same information about blocking tolerance computed once per recursive call for every unassigned task.</p><p>First, any partial priority ordering that results in a blocking tolerance less than 0, for a yet unassigned task, is immediately rejected (lines 6-8 of Algorithm 1).</p><p>Second, if there are two tasks that have computation times greater then the blocking tolerance of the other task, there is no sequence of priority orderings that can make both tasks schedulable. Therefore we reject the current partial priority ordering (lines 9-11). This is the immediate consequence of Lemma 1. Even if these two tasks do not experience blocking from each other, the one at a higher priority will be introducing interference.</p><p>And third, let there be two unassigned tasks τi, and τj where the blocking tolerance βi of τi is smaller than the computation time Cj of the other task τj (βi &lt; Cj) and blocking tolerance of τj is larger than the computation time of the task τi (βj ≥ Ci). Then there is only one sequence of priorities under which these tasks can be made schedulable: τi at a higher priority than τj. Therefore, it is safe to remove the task τj from the current priority (lines 12-19). The idea behind assigning priorities in a descending order is that, if a task is at a lower priority, it will experience a higher amount of interference which in turn leads to a smaller tolerance for blocking.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="6.2">State-space Traversal Heuristic</head><p>On the other hand, smaller blocking tolerance reduces the opportunity for lower priority tasks (which are not schedulable by their current priority level) to increase their preemption threshold for a try to become schedulable. To exploit these properties, we employ a heuristic for traversal of the potential priority assignment state-space. We first allocate those tasks to the highest priorities that have the lowest blocking tolerance.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="6.3">FPTS-OPT Algorithm</head><p>The algorithm divides the task set into two groups: (i) a set of higher priority tasks H which have their priorities and thresholds assigned (ii), and a set of lower priority tasks L with unassigned priorities and thresholds.</p><p>The algorithm starts with an empty set H, and all tasks to be processed in L. Additionally, a parameter of which priority should be processed is passed to the algorithm, which is initially the highest available priority in the system.</p><p>The algorithm finds a solution if no task remains in L (lines 2-4 in the algorithm). In each iteration of the algorithm, first the blocking tolerance and preemption thresholds of all tasks in L are calculated (line 5 in the algorithm). The preemption threshold θ i is the highest one with which all tasks in H can be scheduled if the task were added to the set at the priority Prio. This preemption threshold is subsequently used to calculate blocking tolerance βi of the same task.</p><p>There are two pruning conditions to determine if the task set is unschedulable: In a given priority level, if (i) the blocking tolerance of any task is a negative value (lines 6-8 in the algorithm), and (ii) there exist two tasks where blocking tolerance of each is lower than the execution time of the other, i.e., (∃τi, τj ∈ L : i = j ∧ βi &lt; Cj ∧ βj &lt; Ci) (lines 9-11 in the algorithm).</p><p>Another condition for pruning the tasks from a specific priority level is that, the execution time of those tasks cannot satisfy the blocking tolerance of some tasks at that priority level, i.e., (∃τi, τj ∈ L : i = j ∧βi &lt; Cj ∧βj ≥ Ci) (lines 12-19 in the algorithm) which means that τi is not schedulable at a lower priority level, thus τj is pruned from the current priority level. The tasks that should be explored at the current priority level are added to list L . Tasks in L are then sorted in ascending order of their blocking tolerances by SortβInc function (line 20 in the algorithm).</p><p>The task τi at the head of L , i.e., the task with minimum blocking tolerance, is selected to be assigned to the current priority level, removed from L, and added to H (lines 22 to 25 in the algorithm).</p><p>The algorithm subsequently goes one step deeper in the recursion for the next (lower) priority level (line 26 in the algorithm). If the recursion returns a schedulable value, the value is returned, otherwise the algorithm proceeds to try to schedule the next task from the list L .</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="7.">FIXING WANG-SAKSENA ALGORITHM</head><p>A prerequisite for a comparative evaluation of our algorithm and the algorithm presented by Wang and Saksena <ref type="bibr" target="#b11">[12]</ref> was to implement both algorithms. During the implementation of the algorithm of Wang and Saksena, we noticed that it does not explore the entire state-space.</p><p>After inspecting the pseudo-code in Figure <ref type="figure" target="#fig_2">3</ref> of <ref type="bibr" target="#b11">[12]</ref>, we have determined that the most probable original intention for the algorithm was to continue the state space exploration if an unschedulable configuration was found. A simple removal of line 4 from the pseudo-code results in an algorithm that completely explores the state-space of the potential priority orderings. Further, this closely reflects the approach use in the same algorithm on lines 22-24.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="8.">EVALUATION</head><p>In this section we present the results of our experiments. As the first set of experiments, we have measured the complexity of our proposed algorithm compared to Wang and Saksena's algorithm<ref type="foot" target="#foot_0">1</ref>  <ref type="bibr" target="#b11">[12]</ref>. Since both algorithms execute in exponential time, we chose two different measures to compare them, the number of recursive calls to the main function, and the number of worst-case response time (WCRT) computation calls. While Wang-Saksena algorithm uses WCRT computation, our algorithm is based on blocking tolerance computation. To achieve a common ground between the algorithms, we have implemented blocking tolerance and maximum preemption threshold computation using WCRT calls.</p><p>As a second set of experiments, we compared the schedulability ratios of task sets under FPTS with deadline monotonic priority assignments and optimal preemption thresholds and under FPTS with our OPTA.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="8.1">Experimental Setup</head><p>For both sets of experiments, 5000 task sets are randomly generated using UUnifast algorithm <ref type="bibr" target="#b1">[2]</ref> for every x-axis point. Task's inter-arrival times were randomly chosen from the range <ref type="bibr" target="#b9">[10,</ref><ref type="bibr">1000]</ref>. Task's deadlines were uniformly selected from the range [Ci + α(Ti − Ci), Ti], where α is the deadline scaling factor. At α = 1, the deadlines are equal to periods, and at α = 0, the deadlines are equal to computation times. In all the experiments the following system parameters were used as defaults (except in the experiment that the specified parameter is varying): α = 1, the task set utilization is fixed to 0.9, and the task set cardinality is set to 8.</p><p>In the first set of experiments, the recursion depth and number of calls to WCRT function were measured when the task set cardinality is varied from 3 to 8. In the second set of experiments, the schedulability ratio is calculated when (i) the task set cardinality was varied from 3 to 9, (ii) the task set utilization was varied in the range [0.6, 0.95] with granularity of 0.05 and (iii) α is varied in the range [0.1, 1] with granularity of 0.1.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="8.2">Results</head><p>The results in the first set of experiments are shown by means of box plots (a.k.a. box and whisker diagram) in Figures <ref type="figure" target="#fig_1">1 and 2</ref>. Each graph represents the data using five values: (1) minimum value which is the lower point in the graph, (2) first quartile value which is the lower edge of the square, (3) median value which is the line in the middle of the rectangle, (4) third quartile value which is the upper edge of the rectangle, and (5) maximum value which is the top line.</p><p>As it can be observed from Figures <ref type="figure" target="#fig_1">1 and 2</ref>, the number of WCRT calls as well as recursion depths are lower under our optimal algorithm compared to Wang-Saksena algorithm. This implies that the time needed to find a solution is in general lower under our algorithm. Further, it can be seen that the growth of the measured values in the graphs is steeper under Wang-Saksena algorithm compared to FPTS-OPT algorithm. It is interesting to observe that, in general, the maximum number of WCRT calls and recursion depths under the FPTS-OPT algorithm are smaller than the 25% of the WCRT calls and recursion depths under Wang-Saksena algorithm. However, the results show that the FPTS-OPT algorithm does not completely outperform the Wang-Saksena algorithm. In those cases, Wang-Saksena algorithm can find the solution faster, e.g., for 5 and 7 tasks in Figures <ref type="figure" target="#fig_1">1 and 2</ref>.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="8.3">Schedulability Ratio</head><p>In the second set of experiments we compared schedulability of different priority and threshold assignments while varying experiment parameters. The results in Figures <ref type="figure" target="#fig_3">3, 4</ref> and 5 show that FPTS-OPT clearly outperforms both FPPS and FPTS with deadline monotonic priority assignment. Our  proposed algorithm can improve the schedulability up to 15%.</p><p>It can be observed from Figures <ref type="figure" target="#fig_3">3 and 4</ref> that system schedulability decreases by both increasing the number of the tasks in the task set as well as increasing the task set utilization. Moreover, Figure <ref type="figure">5</ref> shows that increasing α, i.e., larger deadlines, the system schedulability is increased, which are not surprising results.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="9.">CONCLUSION</head><p>In this paper we proposed a new optimal priority and preemption threshold assignment algorithm for FPTS.</p><p>The algorithm is based on backtracking, pruning the search space and a heuristic for traversing the search space. By generating a large number of synthetic task sets, we have compared our algorithm with the original algorithm by Wang and Saksena. The results show that our algorithm clearly outperforms the Wang-Saksena algorithm in general in terms of number of recursive calls and number of worst-case response time calculations, although special cases exist for which Wang-Saksena performs better than our algorithm.</p><p>Further, we have used our algorithm to evaluate the relevance of using a complex algorithm to determine the priority assignment compared to simple deadline monotonic assignment. With up to 15% observed increase in schedulability, we can conclude that it is worth having the option of opti-  mal priority assignment for cases that cannot be scheduled by means of deadline monotonic priorities and optimal preemption thresholds. However, since the algorithm still functions in exponential time, it may be impractical to execute it on very large task sets.</p><p>The problem itself of whether it is possible to construct an efficient algorithm for FPTS OPTA still remains open.</p></div><figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_0"><head>Figure 1 :</head><label>1</label><figDesc>Figure 1: Number of recursions versus task set cardinality.</figDesc></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_1"><head>Figure 2 :</head><label>2</label><figDesc>Figure 2: Number of WCRT calls versus task set cardinality.</figDesc></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_2"><head>Figure 3 :</head><label>3</label><figDesc>Figure 3: Task set schedulability ratio in comparison with task set cardinality.</figDesc></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_3"><head>Figure 4 :</head><label>4</label><figDesc>Figure 4: Task set schedulability ratio in comparison with task set utilization.</figDesc></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" type="table" xml:id="tab_0"><head>Table 1 :</head><label>1</label><figDesc>Specifications of TI task set. task Ci Ti = Di π DM</figDesc><table><row><cell></cell><cell></cell><cell></cell><cell>i</cell><cell cols="3">πi θi Ri</cell></row><row><cell>τ1</cell><cell>1</cell><cell>7</cell><cell>1</cell><cell>1</cell><cell>1</cell><cell>1</cell></row><row><cell>τ2</cell><cell>8</cell><cell>23</cell><cell>2</cell><cell>2</cell><cell cols="2">2 21</cell></row><row><cell>τ3</cell><cell>10</cell><cell>25</cell><cell>3</cell><cell>4</cell><cell cols="2">2 25</cell></row><row><cell>τ4</cell><cell>3</cell><cell>33</cell><cell>4</cell><cell>3</cell><cell cols="2">2 25</cell></row></table></figure>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="1" xml:id="foot_0">After applying the corrections outlined in Section 7.</note>
		</body>
		<back>
			<div type="references">

				<listBibl>

<biblStruct xml:id="b0">
	<analytic>
		<title level="a" type="main">The limited-preemption uniprocessor scheduling of sporadic task systems</title>
		<author>
			<persName><forename type="first">S</forename><surname>Baruah</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="m">17 th Euromicro Conference on Real-Time Systems (ECRTS)</title>
				<imprint>
			<date type="published" when="2005-07">July 2005</date>
			<biblScope unit="page" from="137" to="144" />
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b1">
	<analytic>
		<title level="a" type="main">Measuring the performance of schedulability tests</title>
		<author>
			<persName><forename type="first">E</forename><surname>Bini</surname></persName>
		</author>
		<author>
			<persName><forename type="first">G</forename><surname>Buttazzo</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="j">Real-Time Systems</title>
		<imprint>
			<biblScope unit="volume">30</biblScope>
			<biblScope unit="issue">1-2</biblScope>
			<biblScope unit="page" from="129" to="154" />
			<date type="published" when="2005">2005</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b2">
	<analytic>
		<title level="a" type="main">Worst-case response time analysis of real-time tasks under fixed-priority scheduling with deferred preemption revisited</title>
		<author>
			<persName><forename type="first">R</forename><surname>Bril</surname></persName>
		</author>
		<author>
			<persName><forename type="first">J</forename><surname>Lukkien</surname></persName>
		</author>
		<author>
			<persName><forename type="first">W</forename><surname>Verhaegh</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="m">19 th Euromicro Conference on Real-Time Systems (ECRTS)</title>
				<imprint>
			<date type="published" when="2007-07">July 2007</date>
			<biblScope unit="page" from="269" to="279" />
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b3">
	<analytic>
		<title level="a" type="main">Preemptive priority-based scheduling: An appropriate engineering approach</title>
		<author>
			<persName><forename type="first">A</forename><surname>Burns</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="m">Figure 5: Task set schedulability ratio compared to different values of α</title>
				<imprint>
			<publisher>Prentice Hall</publisher>
			<date type="published" when="1994">1994</date>
			<biblScope unit="page" from="225" to="248" />
		</imprint>
	</monogr>
	<note>Advances in Real-Time Systems, chapter 10</note>
</biblStruct>

<biblStruct xml:id="b4">
	<analytic>
		<title level="a" type="main">Restricted tasking models</title>
		<author>
			<persName><forename type="first">A</forename><surname>Burns</surname></persName>
		</author>
		<author>
			<persName><forename type="first">A</forename><forename type="middle">J</forename><surname>Wellings</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="m">Proc. 8 th International Workshop on Real-Time Ada, IRTAW</title>
				<meeting>8 th International Workshop on Real-Time Ada, IRTAW<address><addrLine>New York, NY, USA</addrLine></address></meeting>
		<imprint>
			<publisher>ACM</publisher>
			<date type="published" when="1997">1997</date>
			<biblScope unit="page" from="27" to="32" />
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b5">
	<analytic>
		<title level="a" type="main">A review of priority assignment in real-time systems</title>
		<author>
			<persName><forename type="first">R</forename><forename type="middle">I</forename><surname>Davis</surname></persName>
		</author>
		<author>
			<persName><forename type="first">L</forename><surname>Cucu-Grosjean</surname></persName>
		</author>
		<author>
			<persName><forename type="first">M</forename><surname>Bertogna</surname></persName>
		</author>
		<author>
			<persName><forename type="first">A</forename><surname>Burns</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="j">Journal of Systems Architecture</title>
		<imprint>
			<biblScope unit="volume">65</biblScope>
			<biblScope unit="page" from="64" to="82" />
			<date type="published" when="2016">2016</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b6">
	<analytic>
		<title level="a" type="main">Exact response-time analysis for fixed-priority preemption-threshold scheduling</title>
		<author>
			<persName><forename type="first">U</forename><surname>Keskin</surname></persName>
		</author>
		<author>
			<persName><forename type="first">R</forename><forename type="middle">J</forename><surname>Bril</surname></persName>
		</author>
		<author>
			<persName><forename type="first">J</forename><forename type="middle">J</forename><surname>Lukkien</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="m">15 th IEEE Conf. on Emerging Technologies and Factory Automation (ETFA)</title>
				<imprint>
			<date type="published" when="2010-09">Sept. 2010</date>
			<biblScope unit="page" from="1" to="4" />
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b7">
	<analytic>
		<title level="a" type="main">Limited preemptible scheduling to embrace cache memory in real-time systems</title>
		<author>
			<persName><forename type="first">S</forename><surname>Lee</surname></persName>
		</author>
		<author>
			<persName><forename type="first">C.-G</forename><surname>Lee</surname></persName>
		</author>
		<author>
			<persName><forename type="first">M</forename><surname>Lee</surname></persName>
		</author>
		<author>
			<persName><forename type="first">S</forename><surname>Min</surname></persName>
		</author>
		<author>
			<persName><forename type="first">C</forename><surname>Kim</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="m">Languages, Compilers, and Tools for Embedded Systems</title>
		<title level="s">Lecture Notes in Computer Science</title>
		<editor>
			<persName><forename type="first">F</forename><surname>Mueller</surname></persName>
		</editor>
		<editor>
			<persName><forename type="first">A</forename><surname>Bestavros</surname></persName>
		</editor>
		<meeting><address><addrLine>Berlin Heidelberg</addrLine></address></meeting>
		<imprint>
			<publisher>Springer</publisher>
			<date type="published" when="1998">1998</date>
			<biblScope unit="volume">1474</biblScope>
			<biblScope unit="page" from="51" to="64" />
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b8">
	<analytic>
		<title level="a" type="main">Semaphore queue priority assignment for real-time multiprocessor synchronization</title>
		<author>
			<persName><forename type="first">V</forename><surname>Lortz</surname></persName>
		</author>
		<author>
			<persName><forename type="first">K</forename><surname>Shin</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="j">IEEE Transactions on Software Engineering</title>
		<imprint>
			<biblScope unit="volume">21</biblScope>
			<biblScope unit="issue">10</biblScope>
			<biblScope unit="page" from="834" to="844" />
			<date type="published" when="1995-10">Oct. 1995</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b9">
	<analytic>
		<title level="a" type="main">Scheduling tasks with mixed preemption relations for robustness to timing faults</title>
		<author>
			<persName><forename type="first">J</forename><surname>Regehr</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="m">23 rd IEEE Real-Time Systems Symposium (RTSS)</title>
				<imprint>
			<date type="published" when="2002">2002</date>
			<biblScope unit="page" from="315" to="326" />
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b10">
	<analytic>
		<title level="a" type="main">Scalable real-time system design using preemption thresholds</title>
		<author>
			<persName><forename type="first">M</forename><surname>Saksena</surname></persName>
		</author>
		<author>
			<persName><forename type="first">Y</forename><surname>Wang</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="m">21 st IEEE Real-Time Systems Symposium (RTSS)</title>
				<imprint>
			<date type="published" when="2000">2000</date>
			<biblScope unit="page" from="25" to="34" />
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b11">
	<analytic>
		<title level="a" type="main">Scheduling fixed-priority tasks with preemption threshold</title>
		<author>
			<persName><forename type="first">Y</forename><surname>Wang</surname></persName>
		</author>
		<author>
			<persName><forename type="first">M</forename><surname>Saksena</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="m">6 th International Conference on Real-Time Computing Systems and Applications (RTCSA)</title>
				<imprint>
			<date type="published" when="1999">1999</date>
			<biblScope unit="page" from="328" to="335" />
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b12">
	<analytic>
		<title level="a" type="main">Bounding the maximum length of non-preemptive regions under fixed priority scheduling</title>
		<author>
			<persName><forename type="first">G</forename><surname>Yao</surname></persName>
		</author>
		<author>
			<persName><forename type="first">G</forename><surname>Buttazzo</surname></persName>
		</author>
		<author>
			<persName><forename type="first">M</forename><surname>Bertogna</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="m">15th IEEE International Conference on Embedded and Real-Time Computing Systems and Applications</title>
				<imprint>
			<date type="published" when="2009-08">Aug 2009</date>
			<biblScope unit="page" from="351" to="360" />
		</imprint>
	</monogr>
</biblStruct>

				</listBibl>
			</div>
		</back>
	</text>
</TEI>
