<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Optimal Priority and Threshold Assignment for Fixed-priority Preemption Threshold Scheduling∗</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Leo Hatvani</string-name>
          <email>l.hatvani@tue.nl</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Sara Afshar</string-name>
          <email>sara.afshar@mdh.se</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Reinder J. Bril</string-name>
          <email>r.j.bril@tue.nl</email>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Mälardalen University (MDH)</institution>
          ,
          <addr-line>Västerås</addr-line>
          ,
          <country country="SE">Sweden</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Technische Universiteit, Eindhoven (TU/e)</institution>
          ,
          <country country="NL">The Netherlands</country>
        </aff>
        <aff id="aff2">
          <label>2</label>
          <institution>Technische Universiteit, Eindhoven (TU/e), The Netherlands, Mälardalen University (MDH)</institution>
          ,
          <addr-line>Västerås</addr-line>
          ,
          <country country="SE">Sweden</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>the flexibility of dynamic-priority algorithms, fixed-priority Fixed-priority preemption-threshold scheduling (FPTS) is a scheduling algorithms are a de facto standard in industry generalization of fixed-priority preemptive scheduling (FPPS) due to their lower implementation and execution overhead and fixed-priority non-preemptive scheduling (FPNS). Since compared to dynamic-priority algorithms. FPPS and FPNS are incomparable in terms of potential Another way of classifying scheduling algorithms is whether schedulability, FPTS has the advantage that it can schedule they allow a task that is currently executing to be preempted any task set schedulable by FPPS or FPNS and some that or not, these are preemptive and non-preemptive schedulare not schedulable by either. FPTS is based on the idea that ing algorithms. Recently, new scheduling approaches have each task is assigned a priority and a preemption threshold. been proposed as an alternative to the extremes of fully preWhile tasks are admitted into the system according to their emptive and non-preemptive scheduling. One such scheduling priorities, they can only be preempted by tasks that have approach is called fixed-priority preemption threshold schedulpriority higher than the preemption threshold. ing (FPTS) [12, 11] where each task τi is annotated by a This paper presents a new optimal priority and preemption preemption threshold θi besides its priority πi. Preemption threshold assignment (OPTA) algorithm for FPTS which in threshold for a task specifies which tasks can preempt it and general outperforms the existing algorithms in terms of the is always greater than or equal to the priority of that task. size of the explored state-space and the total number of worst If a task's priority is higher than the preemption threshold case response time calculations performed. The algorithm is of the currently executing task, it is allowed to preempt the based on back-tracking, i.e. it traverses the space of potential executing task. This means that as soon as the task starts priorities and preemption thresholds, while pruning infeasible executing, its effective priority is increased to its preemption paths, and returns the first assignment deemed schedulable. threshold. We present the evaluation results where we compare the There are two special cases of the FPTS scheduling algocomplexity of the new algorithm with the existing one. We rithm. First, when the preemption threshold of every task is show that the new algorithm significantly reduces the time equal to the task's priority, FPTS becomes equivalent to the needed to find a solution. Through a comparative evaluation, FPPS scheduling algorithm. Second, when all preemption we show the improvements that can be achieved in terms of thresholds are equal to the highest priority in the system, schedulability ratio by our OPTA compared to a deadline FPTS becomes equivalent to FPNS, as no task can preempt monotonic priority assignment. any other task. FPTS improves the schedulability compared to both approaches by leveraging the preemption of higher priority tasks CCS Concepts under FPPS and the blocking incurred by non-preemptive •Computer systems organization → Embedded soft- execution of lower priority tasks under FPNS. An optimal priware; •Software and its engineering → Real-time schedu- ority and threshold assignment (OPTA) algorithm for FPTS lability; is any algorithm that for a given set of tasks determines if it can be scheduled by means of FPTS and when it can 1. INTRODUCTION be scheduled provides task priorities and thresholds. The original OPTA for FPTS has been introduced by Wang and Scheduling theory has been widely studied over the years Saksena [12]. However, the high computation time required to provide effective scheduling solutions for real-time em- to find a feasible solution using this algorithm, if such exists, bedded systems. Scheduling algorithms can be divided into warrants research into more efficient approaches [6]. In this fixed-priority and dynamic-priority, where the priorities of paper, we introduce a new OPTA algorithm for FPTS which tasks stay the same throughout the execution of the system effectively can decrease the computation time of finding a for the former ones and change depending on some parameter feasible solution. Our algorithm is based on (i) backtracking, for the latter ones. Even though it can be said that they lack (ii) pruning to reduce the search space, and (iii) a heuristic to traverse the search space. Contributions: In this paper we propose an algorithm for optimal priority and threshold assignment. Moreover, we</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>∗This work is supported by the ARTEMIS Joint Undertaking
project EMC2 (grant agreement 621429).</p>
      <p>EWiLi’16, October 6th, 2016, Pittsburgh, USA.
Copyright retained by the authors.
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>
    </sec>
    <sec id="sec-2">
      <title>MOTIVATION EXAMPLE</title>
      <p>In this section we show by means of an example that the
deadline monotonic priority assignment is not optimal for
FPTS.</p>
      <p>Let us consider a task set TI which consists of 4 tasks as
presented in Table 1. 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 πiDM are
assigned based on deadline monotonic priority assignment,
i.e. the task with the smallest deadline has the highest
priority. At utilization U TI ≈ 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>
    </sec>
    <sec id="sec-3">
      <title>RELATED WORK</title>
      <p>
        Preemption Threshold Scheduling (PTS) has been
proposed by Wang and Saksena in [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ]. 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 Baruah [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] 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 [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ]. 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.
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 [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ]. Later, in [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ], it has
been shown that the analysis in [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ] 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 [
        <xref ref-type="bibr" rid="ref4 ref5 ref8">4, 5, 8</xref>
        ]. In [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ], Bril et. al have
shown that the analysis presented in [
        <xref ref-type="bibr" rid="ref4 ref5">4, 5</xref>
        ] is both pessimistic
and optimistic where they have revised the analysis.
      </p>
    </sec>
    <sec id="sec-4">
      <title>4. SYSTEM MODEL 4.1</title>
    </sec>
    <sec id="sec-5">
      <title>Task Specification</title>
      <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).
4.2</p>
    </sec>
    <sec id="sec-6">
      <title>FPTS Scheduling</title>
      <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.
5.
5.1</p>
    </sec>
    <sec id="sec-7">
      <title>RESPONSE TIME ANALYSIS</title>
    </sec>
    <sec id="sec-8">
      <title>Analysis</title>
      <p>
        While worst-case response time analysis for FPTS policy
has been published several times [
        <xref ref-type="bibr" rid="ref10 ref12">12, 10</xref>
        ], in this paper we
employ the exact analysis presented by Keskin et al. [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ] 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.</p>
      <p>Bi = max(0,</p>
      <p>max
∀j:θj≤πi&lt;πj</p>
      <p>Cj)
(1)</p>
      <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
[
        <xref ref-type="bibr" rid="ref3">3</xref>
        ] and is given as the smallest positive Li that satisfies (2).
      </p>
      <p>Li = Bi +</p>
      <p>Li
Tj</p>
      <p>Cj
∀j:πj≤πi
li =</p>
      <p>Li</p>
      <p>Ti</p>
      <p>The maximum number li of jobs of τi that can be executed
in this level-i active period is given by (3).
(2)
(3)</p>
      <p>Given the knowledge of how many jobs need to be analyzed,
we can compute their worst-case start time Sik for 0 ≤ k &lt; li
as the smallest positive value Sik that satisfies (4).</p>
      <p>⎧
Sik = ⎪⎪⎨
⎪⎩⎪</p>
      <p>Bi + kCi +
kCi +</p>
      <p>Sik Cj
∀j:πj&lt;πi Tj</p>
      <p>if Bi &gt; 0
∀j:πj&lt;πi
1 +</p>
      <p>Sik
Tj</p>
      <p>Cj if Bi = 0
(4)</p>
      <p>Likewise, other tasks may preempt the observed job, thus
causing interference. This quantity is encompassed by
calculating each job’s worst-case finalization time Fik. It can be
found as the smallest positive Fik that satisfies (5).</p>
      <p>⎧
Fik = ⎪⎪⎪⎪⎪⎪⎨
⎪⎪⎪⎪⎪⎪⎩</p>
      <p>Sik + Ci+</p>
      <p>∀j:πj&lt;θi
Sik + Ci+
∀j:πj&lt;θi</p>
      <p>Fik
Tj
Fik
Tj
−</p>
      <p>Sik</p>
      <p>Tj
− 1 +</p>
      <p>Cj
Sik
Tj</p>
      <p>if Bi &gt; 0
Cj if Bi = 0
(5)</p>
      <p>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>
      <p>Ri =</p>
      <p>max
∀k:0≤k&lt;li
(Fik − kTi)
(6)
5.2</p>
    </sec>
    <sec id="sec-9">
      <title>Definition and Observations</title>
      <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 [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ] and later
exploited by Yao et al. [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ]. 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 (5) 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.
6.</p>
    </sec>
    <sec id="sec-10">
      <title>OPTIMAL PRIORITY AND THRESHOLD</title>
    </sec>
    <sec id="sec-11">
      <title>ASSIGNMENT</title>
      <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 [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ] (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.
6.1
      </p>
    </sec>
    <sec id="sec-12">
      <title>State-space Pruning</title>
      <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).</p>
    </sec>
    <sec id="sec-13">
      <title>State-space Traversal Heuristic</title>
      <p>Algorithm 1 FPTS-OPT
Input:</p>
      <p>H = ∅
A set of tasks L, and {Ci, Ti, Di} ∀τi ∈ L.</p>
      <p>Prio = 1 The highest priority.
Output:</p>
      <p>The schedulability of the task set, πi, and θi ∀τi ∈ T .
1: function Search(H, L, Prio)
2: if L = ∅ then
3: return schedulable
4: end if
5: ∀τi ∈ L : βi, θi ← CalculateBT(H, τi);
6: if (∃τi ∈ L : βi &lt; 0) then
7: return unschedulable
8: end if
9: if (∃τi, τj ∈ L : i = j ∧ βi &lt; Cj ∧ βj &lt; Ci) then
10: return unschedulable
11: end if</p>
      <p>L is a list of tasks that can be assigned priority Prio.</p>
      <p>L ← L
for (τi ∈ L) do
for (τj ∈ L \ {τi}) do</p>
      <p>if (βi &lt; Cj ∧ βj ≥ Ci) then</p>
      <p>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>
      <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.
6.3</p>
    </sec>
    <sec id="sec-14">
      <title>FPTS-OPT Algorithm</title>
      <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 .
7.</p>
    </sec>
    <sec id="sec-15">
      <title>FIXING WANG-SAKSENA ALGORITHM</title>
      <p>
        A prerequisite for a comparative evaluation of our
algorithm and the algorithm presented by Wang and Saksena [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ]
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 3 of [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ], 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.
8.
      </p>
    </sec>
    <sec id="sec-16">
      <title>EVALUATION</title>
      <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 algorithm1 [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ]. 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
1After applying the corrections outlined in Section 7.
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.
8.1</p>
    </sec>
    <sec id="sec-17">
      <title>Experimental Setup</title>
      <p>
        For both sets of experiments, 5000 task sets are randomly
generated using UUnifast algorithm [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ] for every x-axis point.
Task’s inter-arrival times were randomly chosen from the
range [
        <xref ref-type="bibr" rid="ref10">10, 1000</xref>
        ]. 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.
8.2</p>
    </sec>
    <sec id="sec-18">
      <title>Results</title>
      <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 1 and 2. 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 1 and 2, 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
FPTSOPT 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 1 and 2.
8.3</p>
    </sec>
    <sec id="sec-19">
      <title>Schedulability Ratio</title>
      <p>In the second set of experiments we compared
schedulability of different priority and threshold assignments while
varying experiment parameters. The results in Figures 3, 4
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 3 and 4 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 5 shows that increasing α, i.e.,
larger deadlines, the system schedulability is increased, which
are not surprising results.
9.</p>
    </sec>
    <sec id="sec-20">
      <title>CONCLUSION</title>
      <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
optimal 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.
10.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>S.</given-names>
            <surname>Baruah</surname>
          </string-name>
          .
          <article-title>The limited-preemption uniprocessor scheduling of sporadic task systems</article-title>
          .
          <source>In 17th Euromicro Conference on Real-Time Systems (ECRTS)</source>
          , pages
          <fpage>137</fpage>
          -
          <lpage>144</lpage>
          ,
          <year>July 2005</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>E.</given-names>
            <surname>Bini</surname>
          </string-name>
          and
          <string-name>
            <surname>G. Buttazzo. Measuring</surname>
          </string-name>
          <article-title>the performance of schedulability tests</article-title>
          .
          <source>Real-Time Systems</source>
          ,
          <volume>30</volume>
          (
          <issue>1-2</issue>
          ):
          <fpage>129</fpage>
          -
          <lpage>154</lpage>
          ,
          <year>2005</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>R.</given-names>
            <surname>Bril</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Lukkien</surname>
          </string-name>
          , and
          <string-name>
            <given-names>W.</given-names>
            <surname>Verhaegh</surname>
          </string-name>
          .
          <article-title>Worst-case response time analysis of real-time tasks under fixed-priority scheduling with deferred preemption revisited</article-title>
          .
          <source>In 19th Euromicro Conference on Real-Time Systems (ECRTS)</source>
          , pages
          <fpage>269</fpage>
          -
          <lpage>279</lpage>
          ,
          <year>July 2007</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>A.</given-names>
            <surname>Burns</surname>
          </string-name>
          .
          <article-title>Preemptive priority-based scheduling: An appropriate engineering approach</article-title>
          .
          <source>In Advances in Real-Time Systems</source>
          , chapter
          <volume>10</volume>
          , pages
          <fpage>225</fpage>
          -
          <lpage>248</lpage>
          . Prentice Hall,
          <year>1994</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>A.</given-names>
            <surname>Burns</surname>
          </string-name>
          and
          <string-name>
            <given-names>A. J.</given-names>
            <surname>Wellings</surname>
          </string-name>
          .
          <article-title>Restricted tasking models</article-title>
          .
          <source>In Proc. 8th International Workshop on Real-Time Ada, IRTAW</source>
          , pages
          <fpage>27</fpage>
          -
          <lpage>32</lpage>
          , New York, NY, USA,
          <year>1997</year>
          . ACM.
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>R. I.</given-names>
            <surname>Davis</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L.</given-names>
            <surname>Cucu-Grosjean</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Bertogna</surname>
          </string-name>
          ,
          <article-title>and</article-title>
          <string-name>
            <given-names>A.</given-names>
            <surname>Burns</surname>
          </string-name>
          .
          <article-title>A review of priority assignment in real-time systems</article-title>
          .
          <source>Journal of Systems Architecture</source>
          ,
          <volume>65</volume>
          :
          <fpage>64</fpage>
          -
          <lpage>82</lpage>
          ,
          <year>2016</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>U.</given-names>
            <surname>Keskin</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R. J.</given-names>
            <surname>Bril</surname>
          </string-name>
          , and
          <string-name>
            <given-names>J. J.</given-names>
            <surname>Lukkien</surname>
          </string-name>
          .
          <article-title>Exact response-time analysis for fixed-priority preemption-threshold scheduling</article-title>
          .
          <source>In 15th IEEE Conf. on Emerging Technologies and Factory Automation (ETFA)</source>
          , pages
          <fpage>1</fpage>
          -
          <lpage>4</lpage>
          , Sept.
          <year>2010</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>S.</given-names>
            <surname>Lee</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.-G.</given-names>
            <surname>Lee</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Lee</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Min</surname>
          </string-name>
          , and
          <string-name>
            <given-names>C.</given-names>
            <surname>Kim</surname>
          </string-name>
          .
          <article-title>Limited preemptible scheduling to embrace cache memory in real-time systems</article-title>
          . In F. Mueller and
          <string-name>
            <surname>A</surname>
          </string-name>
          . Bestavros, editors,
          <source>Languages, Compilers, and Tools for Embedded Systems</source>
          , volume
          <volume>1474</volume>
          of Lecture Notes in Computer Science, pages
          <fpage>51</fpage>
          -
          <lpage>64</lpage>
          . Springer Berlin Heidelberg,
          <year>1998</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>V.</given-names>
            <surname>Lortz</surname>
          </string-name>
          and
          <string-name>
            <given-names>K.</given-names>
            <surname>Shin</surname>
          </string-name>
          .
          <article-title>Semaphore queue priority assignment for real-time multiprocessor synchronization</article-title>
          .
          <source>IEEE Transactions on Software Engineering</source>
          ,
          <volume>21</volume>
          (
          <issue>10</issue>
          ):
          <fpage>834</fpage>
          -
          <lpage>844</lpage>
          , Oct.
          <year>1995</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <given-names>J.</given-names>
            <surname>Regehr</surname>
          </string-name>
          .
          <article-title>Scheduling tasks with mixed preemption relations for robustness to timing faults</article-title>
          .
          <source>In 23rd IEEE Real-Time Systems Symposium (RTSS)</source>
          , pages
          <fpage>315</fpage>
          -
          <lpage>326</lpage>
          ,
          <year>2002</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [11]
          <string-name>
            <given-names>M.</given-names>
            <surname>Saksena</surname>
          </string-name>
          and
          <string-name>
            <given-names>Y.</given-names>
            <surname>Wang.</surname>
          </string-name>
          <article-title>Scalable real-time system design using preemption thresholds</article-title>
          .
          <source>In 21st IEEE Real-Time Systems Symposium (RTSS)</source>
          , pages
          <fpage>25</fpage>
          -
          <lpage>34</lpage>
          ,
          <year>2000</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          [12]
          <string-name>
            <given-names>Y.</given-names>
            <surname>Wang</surname>
          </string-name>
          and
          <string-name>
            <given-names>M.</given-names>
            <surname>Saksena</surname>
          </string-name>
          .
          <article-title>Scheduling fixed-priority tasks with preemption threshold</article-title>
          .
          <source>In 6th International Conference on Real-Time Computing Systems and Applications (RTCSA)</source>
          , pages
          <fpage>328</fpage>
          -
          <lpage>335</lpage>
          ,
          <year>1999</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          [13]
          <string-name>
            <given-names>G.</given-names>
            <surname>Yao</surname>
          </string-name>
          , G. Buttazzo, and
          <string-name>
            <given-names>M.</given-names>
            <surname>Bertogna</surname>
          </string-name>
          .
          <article-title>Bounding the maximum length of non-preemptive regions under fixed priority scheduling</article-title>
          .
          <source>In 15th IEEE International Conference on Embedded and Real-Time Computing Systems and Applications</source>
          , pages
          <fpage>351</fpage>
          -
          <lpage>360</lpage>
          ,
          <year>Aug 2009</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>