Docstoc

Towards bandwidth optimal temporal partitioning

Document Sample
Towards bandwidth optimal temporal partitioning Powered By Docstoc
					                    Towards bandwidth optimal temporal partitioning

                                      Attila Zabos, Alan Burns
                                   Department of Computer Science
                                       University of York, UK


                       Abstract                                  time intervals specified by the VRs replenishment pe-
                                                                 riod, this budget is replenished to its initial value.
    In real-time systems the available processing time is            The selected VR parameter values can be considered
partitioned in order to enforce separation of concerns           as globally or locally optimal [4]. They are globally op-
of concurrent application components. This is a neces-           timal if the minimum system utilisation, including all the
sary step to prevent possible side effects of an erroneous       other VRs in the system, is achieved. On the other hand,
application component on other components in the sys-            the parameter values of a single VR, considered in iso-
tem. One of the main objectives in temporal partitioning         lation, are locally optimal if the obtained VR utilisation
is the selection of appropriate partition parameters (e.g.       is the smallest.
replenishment period and budget) that minimise the re-               The main challenge in the selection of locally opti-
sulting resource bandwidth reservation. Currently there          mal VR parameters is that the demand requirements of
are only heuristic limits on the search space of band-           the associated application component are satisfied while
width optimal virtual resource (VR) parameters. We pro-          the processing time reservation for the application com-
vide a lower and upper bound on the period of a periodic         ponent is kept at a minimum. The VR budget and period
VR in order to limit the search space for bandwidth op-          parameters leading to this minimal resource reservation
timal parameters. We also show that the VR parameters            (i.e. minimum VR utilisation) are considered in this pa-
derived from the VR period upper bound provide suffi-             per as the bandwidth optimal parameters or simply just
ciently good results if the time for VR parameter calcu-         optimal parameters.
lation is limited and an exhaustive search for optimal               Various deficiencies of existing approaches inhibit
parameter values is not an option.                               the calculation of locally optimal VR parameters. The
                                                                 origin of these deficiencies are either:
1. Introduction and motivation                                      • the application of a linear VR supply model [11, 1]
                                                                       for VR parameter calculation,
   Due to the increasing processing power of complex                • the requirement of additional VR parameter con-
embedded real-time systems, there is a trend to integrate              straints (e.g. the initial delay of the VR supply
real-time application components, that were initially de-              function [11] or the specification of the VR pe-
veloped and verified independently of each other and                    riod [6]) that need to be specified by the application
also executed on distinct hardware, on a single system.                designer, or
   Independently developed and verified application                  • the definition of a search space that might not con-
components imply that each of them is associated with                  tain the optimal VR parameters [12, 7].
a different system function. Hence the diversity of ap-              In contrast to previous approaches we utilise the exact
plication components on a single integrated platform re-         supply bound function of the VR and avoid inaccuracy
quires isolation of various application components in or-        due to a linear VR model. Furthermore, our analysis re-
der to avoid interference among each other. The require-         quires only the taskset temporal specification, enabling
ment for separation of concerns in multi-application sys-        the calculation of optimal VR parameters without the in-
tems makes the temporal partitioning of the available            tervention of the application designer.
processing time essential.                                           One method to determine optimal VR parameters for
   A common approach to implement the required tem-              an application component is to provide a VR period
poral partitioning is by periodic virtual resources (VRs).       for which the smallest possible VR budget can be ef-
VRs act as a resource reservation mechanism and man-             ficiently determined (similar to the approach introduced
age the processing time budget that is assigned to ap-           for the EDP resource model [6]). This approach implies
plication components. Characteristic parameters of pe-           a brute-force search over an interval of possible VR pe-
riodic VRs are their budget and replenishment period.            riod values. To our best knowledge there is no definition
The VR budget is consumed while the associated ap-               of an interval that ensures the existence of a VR period
plication component’s tasks are executed and at regular          from which the optimal VR parameters can be derived.

                                                             1
    We approach the problem of optimal VR parame-                supply function and the demand bound function) in or-
ter selection by providing a lower and upper bound on            der to determine whether an application component’s
the VR period, thus limiting the search space. It shall          taskset is schedulable or not is specified by Lipari and
be noted that the optimal VR period is not necessarily           Bini [12] and Easwaran et al. [7]. In order to use the
smaller than the smallest task period or its deadline.           schedulability condition to determine the optimal VR
    In this paper we examine two level hierarchical              parameters implies a brute force search over the inter-
real-time systems with a fixed-priority (FP) pre-emptive          val of possible VR periods.
scheduler at both the operating system and the applica-              As a reasonable upper bound for the search space of a
tion component level.                                            VR period (leading to sufficiently good VR utilisation),
    The paper is structured as follows: Section 2 gives an       the least common multiple of task periods or the task
overview of related work in the area of VR parameter se-         deadlines were suggested by Easwaran et al. [7], and by
lection. The model that is assumed in order to determine         Lipari and Bini [12], respectively. We will show in an
the VR parameters is defined in Section 3. The analyti-           example that for optimal parameters the VR period may
cal tools that are used in order to derive the optimal VR        be larger than the smallest task period or deadline, and
period upper bound are presented in Section 4. Our con-          consequently also larger than the least common multiple
tribution, the calculation of an upper and lower bound on        of task periods.
the optimal VR period is presented in Section 5 and Sec-             The selection of periodic VR parameters based on the
tion 6, respectively. Section 7 demonstrates with a nu-          task demand function was analysed by Almeida and Pe-
merical example how to calculate the VR period bounds            dreiras [1]. They examined the demand at each priority
using the algorithms and equations that are presented in         level and determined relevant demand points that were
this paper. The evaluation of the quality of the VR pa-          used as input for the VR parameter calculation algo-
rameters derived from the VR period upper bound and              rithm. The information about the taskset demand at the
the length of the optimal VR period search interval is           time instant of task deadlines was used in order to de-
provided in Section 8. The conclusion and the summary            termine the required processing time of the correspond-
of our contribution is presented in Section 9.                   ing taskset. This is a pessimistic assumption since there
                                                                 might be a lower taskset demand at an earlier time in-
2. Related work                                                  stant than at the task deadline. Furthermore, their ap-
   In the past, various research work [5, 9, 15, 3] pro-         proach also used a linear VR supply function to deter-
vided in-depth analysis of hierarchical real-time sys-           mine the final VR budget and period.
tems, leaving the question of efficient VR parameter se-              The selection of optimal VR parameters was also in-
lection open.                                                    vestigated by Davis and Burns [4]. For a set of periodic
   Mok et al. [14] presented the bounded-delay resource          VRs, the parameter selection was examined if two out of
partition model that makes use of the linear supply func-        the three VR parameters (i.e. budget, period or priority)
tion defined by an availability factor and a partition de-        were given.
lay. Since it is a general resource model there may exist            In this work we utilise the idea of demand func-
many periodic VRs that satisfy a given bounded-delay             tion based VR parameter selection [1] and the observa-
model specification. Feng and Mok [8] extended the                tion that the task demand increases only at task release
bounded-delay model by an additional constraint that             times [6].
specifies the smallest scheduling quantum of a VR. This
constraint shall limit the number of VR context switches
                                                                 3. System model
and reduce the resulting context switch overhead.                   In this paper we investigate uniprocessor real-time
   The application of the bounded-delay resource                 systems. It is also assumed that these systems use a two-
model [14] on the selection of periodic VR parameters            level hierarchical fixed-priority pre-emptive scheduling.
was investigated by Shin and Lee [16] but without the            At the operating system level, the global scheduler de-
option to determine the optimal parameters.                      termines the processor allocation to multitasking appli-
   A linear model to represent the VR supply is also             cation components (in the following only referred to as
used by Lipari and Bini [11]. The VR model is char-              application component). Within a scheduled application
acterised by an initial delay that occurs before the VR          component the local scheduler then determines which of
supply starts at a uniform rate. This model has the same         the application component’s ready tasks shall execute.
disadvantage as the bounded-delay model.                            In order to enforce temporal partitioning among the
   Using an Explicit Deadline Periodic model,                    application components in the system, the periodic VR
Easwaran et al. [6] presented an algorithm to determine          model is used as a resource reservation mechanism.
the optimal VR budget for a given VR period. But                 Each application component Ai is associated with a vir-
without the knowledge of the optimal value or the upper          tual resource (VR) Si that manages the predefined bud-
bound of the VR period, this algorithm can generate an           get for this application component and the correspond-
infinite set of VR parameters.                                    ing taskset. That means there is a one to one mapping
   Exact schedulability conditions (based on the VR              between application components and VRs.

                                                             2
   In this paper we are concerned with periodic VRs,                   A demand point DPi for priority level i is a pair
where each VR Si is defined by its budget Θi and re-                (qi , ti ), containing the information about the priority
plenishment period Πi . The budget Θi is decreased with            level demand qi at a certain time instant ti .
the same rate as time progress, when ready tasks of the                The demand bound function for a priority level i is
corresponding application component Ai execute. If the             defined in Equation 2 with hep(i) denoting priority lev-
VR’s budget is exhausted, the VR is suspended until its            els equal or higher than i.
budget is replenished to its full capacity. The time in-
stants of budget replenishment are determined by the                                                       t
                                                                                  dbfi (t) =                   · Cj          (2)
VR’s replenishment period Πi . The behaviour of the pe-                                                   Tj
                                                                                               j∈hep(i)
riodic VR is identical to a classical periodic server with
the exception that the server’s budget is not exhausted               The analysis of Equation 2 shows that the demand
instantaneously if there are no tasks in the ready queue           bound function has local minima at time instants that
waiting for execution. In the case that there are no tasks         are multiples of task periods. This was also observed by
ready to execute, the periodic VR’s budget is continu-             Easwaran et al. [6]. We exploit this fact and determine
ously consumed by an idle task until it is exhausted [3].          a specific demand point DPi for each priority level i.
   Within a time interval between two VR budget re-                This enables us to represent the demand requirements of
plenishment events, the maximum time without process-              an entire taskset by a set of demand points.
ing time supply is defined as δ = Π − Θ.                               Algorithm 1 is used to determine the demand points
   The supply bound function s(t) determines for a pe-             that represent the minimum demand requirements of a
riodic VR and a time instant t the cumulative process-             given taskset.
ing time available to execute the associated application
                                                                       In  : Priority ordered taskset
component’s tasks. The supply bound function for peri-
                                                                       Out : Set of demand points
odic VRs is a piecewise defined function and it can be
expressed as in Equation 1 [1].                                    1   foreach priority level i do
                                                                  2       At each priority level i determine a set of
      0
                   :t≤∆                                                   (qm , tm ) pairs. Each (qm , tm ) pair represents a
s(t) = t − (∆ + mδ) : ∆ + mΠ ≤ t < ∆ + mΠ + Θ                              demand point DPm with the cumulative
      
      (m + 1)Θ     : ∆ + mΠ + Θ ≤ t < ∆ + (m + 1)Π                        demand qm of the tasks τj : j ∈ hep(i) at task
                                             (1)                           release times
                                                                           tm ∈ Υi = {x | x = n · Tj Di } ;
                      (t − ∆)
                m=                                                 3       For priority level i let DPi denote
                          Π
                                                                           (qi , ti ) = (qm , tm ) : minm (qm /tm ) with the
                ∆ = 2 · δ = 2 · (Π − Θ)                                    smallest ratio (qm /tm ). If multiple (qm , tm )
    Within an application component, each task τj is de-                   pairs satisfy this condition, then choose the one
fined by the tuple (Cj , Dj , Tj , Pj ), with Cj denoting the               with the largest tm ;
task’s worst-case execution time, Dj its deadline and Tj           4   Remove redundant demand points;
its period. The task’s deadline may be less than or equal
to its period (i.e. Dj <= Tj ). Additionally, each task
                                                                          Algorithm 1: Demand point calculation
has a unique priority Pj within its associated application
component. The priority Pj is determined according to                  In summary, the algorithm determines for each pri-
the deadline-monotonic priority assignment policy.                 ority level i a set of time instants Υi when a task with
    Furthermore, the task release time is considered to            priority j ∈ hep(i) is released. At the examined priority
be independent of the VR’s replenishment period. This              level i, for each time instant tm ∈ Υi the corresponding
notion of task releases has an impact on the analysis and          demand qm is calculated. From the set of (qm , tm ) pairs,
it will be further described in Section 5.                         the one with the lowest ratio is selected and denoted as
                                                                   the representative demand point DPi for priority level i.
4. Analysis                                                        Before the algorithm terminates, redundant elements are
   In this section we introduce the tools that will be             removed from the set of demand points. A demand point
utilised in Section 5 to determine the optimal VR period           (qr , tr ) is considered to be a redundant element if there
upper bound.                                                       is another element (qi , ti ) such that tr = ti and qr < qi .
                                                                   That means, for a specific time instant t only the demand
4.1. Demand points                                                 point with the largest demand is retained. The removal
    In order to simplify the analysis of the task require-         of redundant points from the set of demand points (last
ments and the VR parameter calculation, the demand re-             step in Algorithm 1) also implies that every time instant
quirements for each priority level i (expressed by the             ti is associated to only one demand requirement qi .
demand bound function [10]) are mapped to a represen-                  A demand point DPi can also be considered as a con-
tative demand point DPi .                                          straint on the slowest processor speed that is required in

                                                               3
order to satisfy the taskset demand at priority level i.                                                                   Table 2. Required processor speed
   It should be noted that line 2 of Algorithm 1 may                                                                  Priority       Demand point            Required slowest
require a lot of iterations if in a multitasking system at                                                            level (i)        (DPi )                processor speed
least one of the tasks has a very short or very long period                                                                1           (400,1300)                  30.77%
in contrast to the other tasks. However, it is expected                                                                    2          (2000,3900)                  51.28%
that for most embedded real-time systems the range of                                                                      3          (4600,6500)                  70.77%
task periods will be relatively small (e.g. in avionic [13]
or automotive system, from a few milliseconds to a sec-                                        initial processing speed, without rendering the taskset
ond). Thus for these systems, line 2 of Algorithm 1 gen-                                       unschedulable.
erates at most 1000 demand points and constrains the
                                                                                               4.2. Optimal VR utilisation
number of iterations of Algorithm 1 within reasonable
limits.                                                                                           Plotting the minimum VR utilisation as a function
   To demonstrate Algorithm 1 on an example, we ex-                                            of the VR period, reveals a sawtooth shape graph (see
amine the taskset defined in Table 1 and assume that task                                       Figure 2). The minimum VR utilisation for a VR pe-
deadlines are equal to their periods.                                                          riod (further referred to as the optimal VR utilisation) is
                                                                                               determined by calculating the smallest VR budget such
                         Table 1. Taskset example                                              that the associated taskset is still schedulable.
                 Task         Priority             Ci           Ti                                The problem of efficient optimal VR parameter cal-
                  A        1 (high)              400        1300                               culation due to the sawtooth shape of the optimal
                  B        2 (medium)            800        4600                               VR utilisation graph was also observed by Davis and
                  C        3 (low)              1000        6800                               Burns [3].
                                                                                                  Figure 2 shows the minimum VR utilisation as a
    In Figure 1 the demand function of each priority level                                     function of the VR period. For one line on the graph,
is rendered along with its representative demand point.                                        the VR utilisation values were determined without con-
The line of the slowest processor speed that supplies just                                     sidering VR context switch overhead, and for the second
sufficient capacity to satisfy the corresponding priority                                       line on the graph a context switch overhead of 100 ticks
level demand, is rendered as well.                                                             was specified.
          7000
                                       Priority level low                                         For the VR with 100 ticks context switch overhead,
                                       demand function                                         Figure 2 shows that the rightmost trough on the minimal
          6000
                                             Priority level low                                VR utilisation graph also represents the optimal VR pa-
                      Priority level mid     processor speed                                   rameters. However, this is not always the case as we will
          5000        demand function                                     DP3 =(q3 ,t3 )
                                                                                               see in the following sections.
 Demand




          4000             Priority level mid                                                                        100
                           processor speed                                                                                                                   VR utilisation with
                                                                                                                     95                VR period             100 ticks VR context
                                                                                                VR utilisation (%)




          3000                                                                                                                         upper bound (Πu )     switch execution time
                                                                                                                     90
                                                      DP2 =(q2 ,t2 )
          2000
                                                                                                                     85
                                                                Priority level high
          1000                                                  demand function                                      80                                        VR utilisation with
                                                Priority level high                                                                                            0 tick VR context
                                 DP1 =(q1 ,t1 ) processor speed                                                      75                                        switch execution time
             0
                  0     1000 2000 3000 4000 5000 6000 7000 8000 9000                                                 70
                                          Time (t)                                                                         0   500   1000   1500 2000 2500         3000   3500       4000
                                                                                                                                               VR period (ticks)
                 Figure 1. Demand points example
                                                                                                                            Figure 2. Minimum VR utilisation
    Using the aforementioned taskset (defined in Table 1)
as an example and applying Algorithm 1 on it, pro-                                                 Furthermore, the examination of the minimum VR
vides the demand point DP1 = (400, 1300), DP2 =                                                utilisation graphs indicates that there exists a VR period
(2000, 3900) and DP3 = (4600, 6500) for priority level                                         beyond which the function of the VR utilisation is strict
1, 2 and 3, respectively. The slowest processor speed                                          monotonically increasing. Therefore, the optimal VR
that is required to satisfy the taskset demand at each pri-                                    budget and period parameters must lie at or below this
ority level is depicted in Table 2. The slower processor                                       value that we denote as the VR period upper bound.
speed can be also considered as the percentage of the
initial processing speed.                                                                      5. VR period upper bound
    In this example, the slowest feasible processor speed                                         In this section we use the tools presented in Section 4
is determined by the demand point DP3 at priority level                                        to derive an equation for the VR period upper bound.
3, since it represents the maximal expected taskset de-                                           For the calculation of the VR parameters, we assume
mand per time unit. In this case, the processor speed                                          a discrete time space. Hence in further equations, the
could be slowed down approximately to 70.77% of its                                            VR period is mapped to an integer value by applying the

                                                                                           4
floor function. For the same reason, the VR budget is             demand point DPi experiences a single VR replenish-
mapped to an integer by applying the ceiling function.           ment period.
Generally, these discretisation steps are not limited to
integer values but could be carried out to an arbitrary




                                                                  VR supply s(t)
precision.
5.1. VR context switch excluded
   First, we consider the scenario in which there is no                                     DPi
                                                                  qi
VR context switch overhead and task release times are
not synchronised with the replenishment period of the
VR.                                                                                ∆ = 2(Π − Θ)   Θ        Π               Time (t)

   Since the task release times are not synchronised to                     t=0
                                                                                                      ti
the VR’s replenishment period, the worst-case task exe-
cution delay occurs under the following circumstances.                              Figure 4. Single VR replenishment
The VR budget is consumed by lower priority tasks                   Consequently a single VR replenishment period up
starting right after the VR’s replenishment period. In           to ti implies that the VR budget Θ is equal to the de-
the following VR period, the budget supply experiences           mand requirement qi . Furthermore, considering a single
the maximum possible delay due to higher priority VRs.           replenishment period, the supply bound function can be
Therefore, after a task is released, its execution can be        simplified to s(t) = t − ∆ and the corresponding VR
delayed by ∆ = 2 · δ = 2 · (Π − Θ) in the worst-case             period can be derived as:
situation (see Figure 3).
                                                                                                       s(ti ) = qi
                                                                                                    ti − ∆ = qi
                                                                                         ti − 2 · (Π − Θ) = qi
                                                  Time (t)
                                                                                         ti − 2 · (Π − qi ) = qi
    VR supply s(t)




                                                                                                                 ti + qi
                                                                                                           Π=
                                                                                                                    2

                                                                     Given a single VR replenishment up to ti , we show
                     Θ         ∆ = 2(Π − Θ)   Π   Time (t)       that if the VR period Π is increased by an arbitrary pos-
                                                                                         ti + qi
                                                                 itive value x, i.e. Π =         + x, the VR budget needs
                         t=0                                                                2
                                                                 to be increased by the same value x in order to preserve
            Figure 3. Maximum delay of VR supply
                                                                 s(ti ) = qi .
   Figure 2 indicates that there is a VR period Πu such
that for all other VR period values Π > Πu the VR util-                                    s(ti ) = qi
isation U (Π) monotonically increases.                                                  ti − ∆ = ti − 2 · (Π − Θ) = qi
   In the following, we provide the necessary statements                                            qi − ti
                                                                                              Θ=            +Π
that can be used to define the algorithm for the optimal                                                2
VR period upper bound calculation.                                                                  qi − ti   ti + qi
                                                                                              Θ=            +         +x
                                                                                                       2         2
Lemma 1. (Monotonic increase of the VR utilisation)                                           Θ = qi + x
Considering a single demand point DPi = (qi , ti ), the
optimal virtual resource utilisation U (Π) (satisfying the           It can be concluded that for demand point DPi =
demand specified by DPi ) monotonically increases with                                           ti + qi
                      ti + qi                                    (qi , ti ) and a VR period Π ≥         , the VR’s initial
the VR period Π ≥              .                                                                    2
                         2                                       delay ∆ remains constant if the VR budget and period
                                                                 are increased by the same value x.
Proof. With an optimal VR utilisation, the VR is sup-                                 ti + qi
plying only as much processing time as dictated by the                            Π=
                                                                                         2
demand point DPi . Hence, the VR supply stops right                               Θ = qi
at the demand point DPi , implying s(ti ) = qi (see Fig-
ure 4).
    Additionally, the examination of the second case of                                   ∆ = (Π + x) − (Θ + x)
the piecewise defined VR supply bound function and the                                     ∆= Π−Θ
corresponding graph (see Figure 4) shows that a strict                                        ti + qi        ti − qi
monotonic increase of the VR utilisation occurs if the                                    ∆=          − qi =
                                                                                                 2              2

                                                             5
   To show that the VR utilisation U (Π) is a monoton-                          mini (ti − qi ) determines the maximal initial delay of a
                                     ti + qi                                    VR.
ically increasing function for Π ≥           , we define
                                        2
       Θ                                                                           We are interested in the largest possible VR period
U = . Considering that Π − Θ = δ is constant, the                               that might enable us to determine the optimal VR pa-
       Π
                                              Π−δ                               rameters. Theorem 1 provides the essential means for
VR utilisation can be rewritten as U (Π) =          . In                        an algorithm to determine a bandwidth optimal VR pe-
                                                Π
order to prove that U (Π) is monotonically increasing,                          riod upper bound.
we have to show that Π1 < Π2 ⇒ U (Π1 ) < U (Π2 ).
                                                                                Theorem 1. (Optimal VR period upper bound) The op-
                                           Π1 < Π2                              timal VR period upper bound is Πu = Πs + x and the
                                           δ        δ                           corresponding minimal VR budget Θu = Θs + x with:
                                        −      <−
                                          Π1       Π2                                   DPs = (qs , ts ) = (qi , ti ) : min(ti − qi )
                                                                                                                          i
                                           δ          δ
                                      1−       <1−                                                 ts + qs
                                          Π1          Π2                                  Πs =
                                      Π1 − δ     Π2 − δ                                               2
                                               <                                          Θs = qs
                                        Π1         Π2
                                       U (Π1 ) < U (Π2 )                        and x being a positive integer number such that for all
                                                                                demand points DPi the condition s(ti ) ≥ qi holds.
                                                                                Proof. Lemma 2 provided (qs , ts ) = mini (ti −qi ) as the
    Furthermore, it can be observed that for optimal peri-                      smallest possible VR initial delay. Lemma 1 showed that
odic VRs the demand point with the smallest difference                                   ts + qs
                                                                                for Π ≥          the VR utilisation U (Π) monotonically
(ti − qi ) has a significant influence on the VR period up-                                   2
per bound calculation. It defines the maximal VR initial                         increases with the VR period Π, and implies that:
delay 2 · (Π − Θ) (see Figure5). A supporting argument                                                                   ts + qs
is presented in Lemma 2.                                                                    Π = Πs + x ≥ Πs =
                                                                                                                            2
                  5000
                                        t2 −q2        DP3                            The increment x of the initial VR parameters
                                        and
                  4000       t1 −q1     t3 −q3                                  (Θs , Πs ) can be determined by calculating the required
                                                                                increase for the VR budget in order to meet all task de-
 VR supply s(t)




                  3000                                                          mand requirements.
                         2 · (Π − Θ)        DP2                                      It shall be noted that in further steps, references to all
                  2000
                                                                                demand points imply the exclusion of DPs = (qs , ts )
                  1000        DP1                                               from the set of demand points.
                                                                                     Now we take a counter intuitive step and first calcu-
                                                                                late the minimal VR budget Θu (see Equation 3) for the
                         }




                    0
                         0   1000 2000 3000 4000 5000 6000 7000 8000 9000       VR period Πu that is yet to be determined. Θu is the
                                               Time (t)
                                                                                smallest VR budget that is required to satisfy the condi-
                    Figure 5. Mapping of demand points                          tion ∀i : s(ti ) ≥ qi . The number of VR replenishment
                                                                                periods up to the demand point DPi is represented by
Lemma 2. (Maximal VR initial delay) The demand                                  hi .
point DPs = (qs , ts ) = mini (ti − qi ) determines the                                                             qi
VR’s maximal initial delay.                                                                        Θu = max                                (3)
                                                                                                             i      hi
Proof. The equations to determine the VR parameters                                 The time interval taken into account to determine hi
under the assumption of a single replenishment period                           is [(Π − Θ), ti ], i.e. excluding the inactive VR time that
were derived in Lemma 1. Lemma 1 also implies that                              originates from the VR period before the critical instant.
the VR supply experiences the maximum possible delay                                In order to derive hi , a geometric mapping of the de-
and the supply is equal to the demanded processing time,                        mand points onto to X-axis was carried out (see Equa-
s(ts ) = qs .                                                                   tion 4 and Figure 5). After the mapping, the demand
   Thus, among all the demand points determined by                              point (qi , ti ) becomes the point (ti − qi ) on the X-axis.
Algorithm 1, DPs = (qs , ts ) = mini (ti − qi ) speci-                          The end points of the VR supply, also mapped onto the
fies the maximal VR initial delay of ts − qs .                                   X-axis, reveal that the distance between these points is
   For a longer than ts − qs VR initial delay the                               Π − Θ.
                                                                                            ′                                   
VR could not supply sufficient processing time in or-                                         qi        −1 1 0         qi       ti − qi
der to satisfy the requirement of the demand point                                DPi′ =  t′  =  0 0 0 ·  ti  =  0  (4)
                                                                                               i
DPs . Therefore the demand point DPs = (qs , ts ) =                                           1         0 0 1          1          1

                                                                            6
   After the transformation of all demand points DPi to              Without loss of generality, we assume that a context
DPi′ , the number of complete VR replenishment periods           switch overhead C0 occurs in each replenishment period
hi up to the time instant ti can be calculated as specified       at the beginning of the VR supply.
in Equation 5.                                                       First, the equations that calculate the initial VR pa-
                    (ti − qi ) − (Πs − Θs )                      rameter values need to be extended in order to consider
            hi =                                      (5)        the time consumed by the context switch (see Equa-
                           Πs − Θs
                                                                 tions 8 and 9).
In the presence of VR context switch overhead the ap-
proach with the mapping of points to the X-axis simpli-             DPs = (qs , ts ) = (qi , ti ) : min(ti − qi − C0 )   (7)
                                                                                                   i
fies the calculation of the number of VR supplies.                            ts + qs + C0
   Knowing the VR budget Θu , the budget increase                     Πs =                                               (8)
                                                                                   2
Θd over the VR’s initial value Θs can be easily de-
termined. The VR budget increase Θd entails an in-                    Θs = qs + C0                                       (9)
crease of the initial VR period Πs by the same value (see           Since we account for one context switch overhead
Lemma 1) leading to the bandwidth optimal VR period              during each replenishment period the number of context
upper bound. As shown in Equation 6, without consider-           switches up to the time instant ti is equal to the number
ing the VR context switch overhead in the analysis, the          of VR replenishment periods hi . In order to determine
increase of the VR budget and period, Id , is determined         the number of VR processing time supplies for the de-
only by the required VR budget increase Θd . In Sec-             mand point DPi = (qi , ti ), we assume at ti a demand
tion 5.2, considering VR context switch overhead, the            of qi + hi · C0 . The mapped value of the demand point
calculation of the VR budget and period increase Id will         with VR context switch overhead included is equal to:
be extended.                                                                   ′                                 
                                                                                qi       −1 1 0          qi + hi · C0
                      Θd = Θu − Θs
                                                                     DPi′ =  t′  =  0 0 0 · 
                                                                                 i                             ti     
                       Id = Θd                        (6)                       1         0 0 1                1
                      Πu = Πs + Id                                                               
                                                                                ti − qi − hi · C0
    In summary, given Πu and Θu we can conclude that                 DPi′ =            0         
the VR utilisation U (Π) monotonically increases for                                    1
Π ≥ Πu .
    In the following we show that by keeping the VR                 Using the demand points DPi′ with the incorporated
budget constant and decreasing the VR period, for Π ≤            context switch information, Equation 5 can be easily
Πu , the VR utilisation U (Π) again monotonically in-            modified to account for the VR context switch overhead
creases.                                                         (see Equation 10).
    With Θu = Θs + Id denoting the smallest possible
                                                                                           (ti − qi − hi · C0 ) − (Πs − Θs )
VR budget for Πu = Πs + Id implies that Θu cannot be                               hi =
                                                                                                       Π s − Θs
reduced by any arbitrary small positive integer value ε <
Id , otherwise the solution for the optimal VR parameters                                (ti − qi − hi · C0 ) − (Πs − Θs )
                                                                                    hi ≤
would be Θu = Θs + Id − ε and Πu = Πs + Id − ε.                                                      Π s − Θs
    But a reduction of the optimal VR period Πu is pos-                       hi · C0     ti − qi
                                                                        hi +           ≤            −1
sible without violating the demand requirements, since                       Π s − Θs    Π s − Θs
(Πu − ε) has two effects on the VR supply:                       hi · (Πs − Θs + C0 )     ti − qi
                                                                                       ≤            −1
  1. the initial delay ∆ = 2·((Πu − ε) − Θu ) decreases                Π s − Θs          Π s − Θs
      and,                                                       hi · (Πs − Θs + C0 ) ≤ ti − qi − (Πs − Θs )
  2. the replenishment periods are shortened, thus the                                  ti − qi − (Πs − Θs )
                                                                                   hi ≤
      VR still supplying the budget Θu just in shorter pe-                                  Π s − Θ s + C0
      riods.                                                                              ti − qi − (Πs − Θs )
    Hence, additionally to Lemma 1 the VR utilisation                              hi =
                                                                                             Π s − Θ s + C0
U (Π) increases also with Π : (Πu − ε) < Π < Πu .                                                                        (10)
Thus, proving that Πu denotes the largest period con-
tributing to a local optimum on the optimal VR utilisa-             After calculating the number of VR budget supplies
tion graph U (Π).                                                hi up to the time instant ti , the VR budget and period
                                                                 increase Id needs to be determined.
5.2. VR context switch included                                     One possible value for Id is the required increase of
   In this section we extend the analysis provided in            the initial VR parameters (Θs , Πs ) by Θd . It can be de-
Section 5.1 by the context switch overhead, also denoted         rived analogous to Equation 3. In order to determine Θd
as virtual resource context switch overhead, that occurs         under consideration of the VR context switch overhead
during the scheduling of application components.                 (see Equation 11), the demand at each demand point is

                                                             7
                                                                                                              qi + (hi · C0 )              qi
defined as qi + hi · C0 .




                                                                      VR supply s(t)
                           qi + hi · C0
         Θd = max                        − Θs
                  i             hi




                                                                                         Θd
                                                    (11)
                           qi
             = max               + C0 − Θs
                  i        hi




                                                                                         Θs
   But Θd might provide a smaller than required incre-                                              C0                  Πd
                                                                                                                                                   Time (t)
ment for the initial VR parameters, leading to a shorter                                               Πs
VR period and a higher number of VR replenishment                                                                                  ti

periods hi , resulting in a higher than required demand
                                                                                                         hi               hi + 1
at ti . Figure 6 illustrates this scenario for the demand
                                                                                          (a) Determine VR parameter increment
point DPi including the expected cumulative VR con-
text switch overhead for the predetermined number of                                            qi + ((hi + 1) · C0 )




                                                                      VR supply s(t)
replenishment periods hi (represented by a diamond),
and the VR supply function using the initial VR param-
eters (Θs , Πs ).




                                                                                          Θd
   Figure 6a shows how the two possible VR parame-
ter increments can be determined in order to satisfy the
demand requirement of the demand point DPi .
    Figure 6b depicts the VR supply function if the VR                                                                                             Time (t)
parameters are increased by Θd . The resulting VR pe-                                                          hi                       hi + 1
riod is too small and therefore the demand at DPi is af-
                                                                                               (b) VR parameter increased by Θd
fected by an additional VR replenishment period. Con-
sequently, the demand at DPi is higher than assumed
                                                                      VR supply s(t)




for hi number of replenishment periods due to the over-
head of an additional VR context switch. The demand
point with the higher demand is represented by the small
                                                                                          Πd




triangle in Figure 6b
   Therefore, additionally to Θd , a second possible
value for Id is determined.
                                                                                                                                                   Time (t)
    In summary, the accumulated VR context switch
                                                                                                               hi                        hi + 1
overhead at the time instant ti of the demand point DPi
and the resulting required demand (qi + hi · C0 ) is af-                                       (c) VR parameter increased by Πd
fected by the number of VR replenishment periods hi .                                  Figure 6. VR parameter increment
hi on the other hand is determined by the VR period             at least as large as Πi .
Πi . Since the required demand (qi + hi · C0 ) is implic-
itly influenced by the VR period Πi , it must be ensured              ∆ + hi · Πi > ti
for demand point DPi that after the initial VR param-                              ti − ∆
eters (Θs , Πs ) are increased, the number of VR replen-                      Πi >
                                                                                       hi
ishment periods hi is equal to the value determined by                             ti − 2 · (Πs − Θs )                                                    (12)
Equation 10. Figure 6c illustrates the VR supply func-                        Πi >
tion after the initial VR parameters (Θs , Πs ) were in-                                     hi
creased by Πd , ensuring that the demand point experi-                                ti − 2 · (Πs − Θs )
                                                                              Πi =                        +1
ences hi number of VR replenishment periods and the                                            hi
demand requirement qi at the time instant ti is satisfied
by the VR supply.
                                                                    Given a VR period constraint Πi for every demand
   To derive the condition for the aforementioned VR            point DPi , the second possible increment Πd over the
period constraint, it is assumed that the hi -th VR re-         initial VR parameters (Θs , Πs ) can be determined as
plenishment period ends right after the time instant ti         specified in Equation 13.
(see first line in Equation 12). Using this condition, a             Πd = max (Πi ) − Πs
VR period constraint Πi can be determined for the de-                                     i
mand point DPi (see Equation 12). That means, for the                                                 ti − 2 · (Πs − Θs )                                 (13)
demand point DPi , the value of the VR period has to be             Πd = max                                                                     − Πs
                                                                                          i                    hi

                                                            8
   Finally, the increase Id of the initial VR parameters         sation Ua . In contrast to the VR utilisation Uu , the appli-
(Θs , Πs ) is the maximum of either Θd or Πd (see Equa-          cation component’s utilisation Ua does not include the
tion 14).                                                        VR context switch overhead.
                  Id = max(0, Θd , Πd )              (14)                                           qi
                                                                                      Ua = max                           (16)
                                           u                                                   i    ti
   The optimal VR period upper bound Π and the cor-
responding budget Θu , with VR context switch consid-                Considering the bounds of the optimal VR utilisation,
ered in the analysis, can be determined by the Equa-             it can be concluded that Ua Uo Uu .
tions 15.                                                            Given the VR’s and application component’s utilisa-
                    Πu = Πs + Id                                 tion, Uu and Ua , the maximum processor utilisation of
                                                 (15)            the VR context switch overhead can be determined as
                    Θu = Θs + Id                                 C0
                                                                  Π = Uu − Ua . Considering the expected maximum
5.3. Algorithm                                                   VR context switch execution time C0 , a lower bound Πl
                                                                 on the optimal VR period can be derived as shown in
   This section presents a simple 6-step algorithm to de-
                                                                 Equation 17.
termine the bandwidth optimal VR period upper bound
for a given set of demand points. The analysis and equa-                      C0
                                                                                  = Uu − Ua
tions presented in the previous sections are used to build                    Πl
up Algorithm 2.                                                                                                      (17)
                                                                                                   C0
                                                                               Πl = max 1,
    In  : Set of demand points and C0                                                           Uu − Ua
    Out : VR period upper bound Πu and budget Θu
                                                                 7. Example
1   Determine the demand point leading to the longest
    feasible VR initial delay (see Equation 7);                      This section demonstrates the application of Algo-
2   Determine the initial VR parameters (Θs , Πs ) (see          rithm 2 and Equation 17 in order to derive the optimal
    Equation 8 and 9 );                                          VR period lower and upper bound from a given taskset
3   For each demand point DPi , calculate the number             specification.
    of VR supplies hi (see Equation 10);                             As an example, the taskset defined in Table 1 is used
4   Calculate Θd and Πd (see Equation 11 and 13);                for the illustration. The presented values are expressed
5   Determine the initial VR parameter increase Id (see          in time ticks. Additionally, for the VR context switch
    Equation 14);                                                overhead C0 , we assume a maximal execution time of
6   Calculate VR period upper bound Πu = Πs + Id                 100 ticks.
    and the corresponding VR budget Θu = Θs + Id ;                   Given the taskset specification (i.e. the worst-case
                                                                 execution time, period and deadline of tasks), for each
Algorithm 2: Virtual resource period upper bound                 priority level a representative demand point is deter-
                                                                 mined. The time instants where the demand bound func-
6. VR period lower bound                                         tion dbf (t) is examined, is presented in Table 3. For
                                                                 each priority level, the row with the time instant and the
   This section provides the definition for a VR period           taskset demand defining the representative demand point
lower bound in the presence of VR context switch over-           is highlighted.
head. We use the VR period upper bound, determined in
Section 5.2, in order to calculate a lower bound on the                          Table 3. Demand points
VR period.                                                            Priority      Task release    Demand       Demand
   According to the optimality definition in this paper,                level          times (t)      dbf(t)     time ratio
the VR parameters leading to the lowest VR utilisation                1 (high)         1300           400        0.3077
are considered as the optimal VR parameters. As we
showed in Theorem 1, the VR utilisation monotonically                                  1300          1200        0.9231
                                                                                       2600          1600        0.6154
increases for Π      Πu , hence the period of the opti-             2 (medium)
                                                                                       3900          2000        0.5128
mal VR (with the lowest utilisation) must be less than                                 4600          2400        0.5217
or equal Πu . Consequently, the optimal VR utilisation
Uo has to be less than or equal the utilisation Uu result-                             1300          2200        1.6923
ing from the VR period upper bound Πu and the corre-                                   2600          2600        1.0000
sponding minimal VR budget Θu .                                                        3900          3000        0.7692
                                                                       3 (low)         4600          3400        0.7391
   Furthermore, the maximum utilisation of the applica-                                5200          4200        0.8077
tion component Ua is determined by the demand point                                    6500          4600        0.7077
with the highest demand qi per time interval ti (see                                   6800          5000        0.7353
Equation 16). Consequently, the optimal VR utilisation
Uo cannot be less than the application component’s utili-           After analysing the taskset demand at each priority

                                                             9
level, the set of demand points contains the following              Additionally, it can be observed that, as already indi-
elements: DP1 = (400, 1300); DP2 = (2000, 3900);                 cated in Section 2, the optimal VR period is not neces-
DP3 = (4600, 6500). This data serves as input into               sarily smaller than the shortest task deadline or period.
Algorithm 2.
   As indicated in line 1 of Algorithm 2 the demand              8. Evaluation
point DPs = (qs , ts ) leading to the longest feasible VR            Given a set of demand points, the optimal VR period
initial delay ∆ is determined. Among the three given de-         upper bound and the corresponding minimal budget can
mand points, DP1 = (400, 1300) satisfies the condition            be efficiently determined by Algorithm 2.
mini (ti − qi ). Therefore, DPs = DP1 = (qs , ts ) =                 In this section we investigate the quality of the opti-
(400, 1300).                                                     mal VR upper bound parameters in contrast to the opti-
   The following step of Algorithm 2 (see line 2) calcu-         mal parameters that were determined by a more exhaus-
lates the initial VR parameter values using Equation 8           tive brute-force approach.
and 9. The calculated initial VR period is Πs = 900 and
                                                                     The brute-force approach calculated the minimal VR
the budget is Θs = 500.
                                                                 budget for VR period values in the interval bounded
   Proceeding with the initial VR parameters (Θs , Πs ),
                                                                 by the longest task period of the examined taskset and
the number of VR supplies hi is determined for each
                                                                 the VR context switch execution time. Due to the dis-
demand point (see Equation 10). The resulting hi val-
                                                                 crete time space, the step size between two consecutive
ues for the corresponding demand points DPi are as fol-
                                                                 VR period values was one. For example, if the longest
lows: h1 = 1, h2 = 3 and h3 = 3.
                                                                 task period was equal to 6800 ticks and the VR context
   With the available data, the two possible candidate
                                                                 switch execution time was 100 ticks, then the interval
values for the increase of the initial VR parameters are
                                                                 for VR period values was [100,6800]. Based on this in-
calculated (line 4 of Algorithm 2). Using Equation 11,
                                                                 terval, the minimum VR budget was calculated for 6701
Θd = max(0, 267, 1134) = 1134, and using Equa-
                                                                 different VR period values. Finally, among the gener-
tion 13, Πd = max(−400, 134, 1000) = 1000 is cal-
                                                                 ated VR parameter pairs, the one resulting in the lowest
culated.
                                                                 processor utilisation was considered as the optimal VR
   The required increase Id of the initial VR parameters
                                                                 parameter.
is determined as max(Θd , Πd ) = max(1134, 1000) =
                                                                     The evaluation focuses on the utilisation overhead
1134 (line 5 of Algorithm 2).
                                                                 that emerges from the use of VR parameters derived for
   Finally in line 6 of Algorithm 2 the optimal VR pe-
                                                                 the VR period upper bound in contrast to the use of op-
riod upper bound is determined as Πu = Πs + Id =
                                                                 timal parameters. This utilisation overhead, or simply
2034, and the corresponding VR budget is Θu = Θs +
                                                                 the utilisation difference between the optimal VR and
Id = 1634.
                                                                 the VR determined for the period upper bound, is ren-
   The next step is to determine the VR period lower
                                                                 dered in box-and-whisker diagrams (see example in Fig-
bound Πl using Equation 16 and Equation 17.
                                                                 ure 7). These diagrams show the minimum, lower quar-
   Using Equation 16, the application component’s
                                                                 tile (25%), median, upper quartile (75%) and maximum
maximum utilisation Ua = 4600/6500 = 0.7077 is de-
                                                                 value of the utilisation difference for scenarios described
termined by the demand point DP3 = (4600, 6500).
                                                                 in the following paragraph.
   The maximum VR utilisation Uu is determined by the
previously calculated VR period upper bound Πu and                                            Maximum
the corresponding budget Θu , i.e. Uu = 1634/2034 =
0.8033.                                                                                       Upper quartile
   Considering for this example a VR context switch                                           Median
execution time of 100 ticks, the VR period lower
                                                                                              Lower quartile
bound Πl can be calculated by Equation 17 as Πl =
                                                                                              Minimum
                 100
max 1, 0.8033−0.7077          = 1046.
                                                                    Figure 7. Box-and-whisker bar illustration
   In summary, for the taskset defined in Table 1, the VR
parameter pair (Θ, Π), based on the optimal VR period               The results of the empirical evaluation were obtained
upper bound value, is equal to (1634, 2034). Figure 2            by generating 10000 random tasksets for each permuta-
shows that these parameters are also the optimal values          tion of the three test-case variables:
for the taskset defined in Table 1 and for an assumed VR             • taskset utilisation (also referred to as Initial Target
context switch execution time of 100 ticks.                           Utilisation (ITU) set to 10%, 40% and 70% of a full
   Although, in the presented example the VR period                   speed processor utilisation.
upper bound and the corresponding VR budget represent               • number of tasks per taskset equal to 5, 10, 20 and
the optimal VR parameters, this may not always be the                 30
case. In the case of a more exhaustive search for the               • context switch overhead equal to 1, 10, 20, ..., 90,
optimal VR parameters, the optimal VR period is bound                 100 ticks
by the interval [Πl , Πu ] = [1046, 1634].                          The combination of the aforementioned test-cases

                                                            10
gives 132 different scenarios with 10000 taskset each,            ues, an exhaustive search over the interval [Πl , Πu ] can
leading to 1320000 tasksets for the entire evaluation.            be carried out. Similar to the box-and-whisker diagrams,
   For each taskset, the task parameters were created by          Figure 14, Figure 15 and Figure 16 depict the minimum,
applying the generation of uniformly distributed utili-           average (represented by a point) and maximum interval
sation values, proposed by Bini and Buttazzo [2]. For             length of [Πl , Πu ] observed among the test-cases that
each utilisation value, a random task period in the in-           were described at the beginning of this section. The fig-
terval [1, 10000] is generated. Given the task utilisation        ures show that the application component’s utilisation
and period, the calculation of its assumed worst-case ex-         (ITU) has the largest impact on the VR period inter-
ecution time is straight forward.                                 val. The interval in which the optimal VR period can be
   The evaluation results are depicted in Figure 8, Fig-          found increases with the application component’s ITU.
ure 9 and Figure 10. They show the utilisation overhead               The VR context switch overhead and the number of
of the VR resulting from the VR period upper bound in             tasks in the application component have just a small ef-
contrast to the optimal VR, for tasksets with 10%, 40%            fect on the interval [Πl , Πu ]. As the average values in-
and 70% initial target utilisation (ITU).                         dicates, there is only a slight decrease in the VR period
   The results show that as the number of tasks in the ap-        interval length as the VR context switch overhead and
plication component and as the assumed context switch             the number of tasks increase.
time increases, the utilisation overhead decreases be-                Figure 14, Figure 15 and Figure 16 also indicate that
tween the optimal VR and the non-optimal VR deter-                the interval containing the optimal VR period is signif-
mined by the efficient method presented in this paper.             icantly reduced for application components with small
   Additionally, to express the processor utilisation used        ITU and it increases with increasing ITU values.
by the VR context switch, the assumed absolute value                  For the sake of clarity, the following example shall
for the VR context switch execution time is compared              demonstrates the information contained in the figures
with the optimal VR period. The resulting processor               presented in this evaluation section.
utilisation denotes the percentage of the processing time             We examine the test-case configuration for tasksets
that is required for the management of the VR. Although           with 20 tasks, 40% ITU, and a VR context switch exe-
the VR context switch time is inevitable, from the ap-            cution time of 60 ticks. Figure 9c shows for the 10000
plication component’s point of view this percentage of            tasksets that the utilisation of the VR determined by the
processing time can be considered as wasted amount of             Algorithm 2 was approximately 0%-18% higher than
processor utilisation.                                            the utilisation of the optimal VR (i.e. smallest possible
   Since the optimal VR period depends on the values              VR utilisation) with the median around 3%. Figure 12c
of the test-case variables and the temporal specification          shows that for the same test-case configuration, the VR
of the application component’s tasks, it is impossible            context switch overhead consumes approximately 3%-
to calculate and associate a single processor utilisation         10% of the processor time.
value to an absolute VR context switch execution time                 The VR period interval containing the optimal VR
value. Therefore, the minimum, lower quartile (25%),              period may range from approximately 200 up to 6200
median, upper quartile (75%) and maximum value of the             values as rendered in Figure 9. In the worst-case situa-
optimal VR period is determined for the 10000 tasksets            tion the interval length might be large, though in average
of each test-case configuration. In order to determine             the interval length for the aforementioned test-case con-
the processor utilisation of the VR context switch over-          figuration contains only approximately 1200 values.
head, the absolute value of the VR context switch execu-              In summary it can be stated that the presented algo-
tion time is divided by each of the five aforementioned            rithm to determine the VR period upper bound and the
optimal VR period values. The results are rendered in             corresponding budget for a given taskset, provides in the
box-and-whisker diagrams.                                         majority of cases an efficient approach to calculate fea-
   In Figure 11, Figure 12 and Figure 13 the range of the         sible VR parameters that can be used as means for tem-
VR context switch overhead is presented for the corre-            poral partitioning.
sponding absolute value of the VR context switch execu-
tion time. The diagrams show that as the ITU of the ap-
                                                                  9. Conclusion
plication component’s taskset and the VR context switch              In this paper we showed that a lower and upper bound
execution time increases, the smaller is the the processor        on the VR period can be determined efficiently, in or-
utilisation consumed by the VR context switch overhead            der to narrow down the search space for bandwidth opti-
and generally the distribution of these values.                   mal VR parameters. On the other hand, if an exhaustive
   It can be further concluded that with increasing ITU           search for the optimal VR parameters is not feasible, the
the optimal VR period increases as well, hence reducing           VR parameters based on the VR period upper bound still
the impact of the VR context switch overhead on the               provide sufficiently good results. Our contribution can
processor utilisation.                                            be summarised as:
   In the case that the VR parameters based on the VR               • we gave a fresh view on task demand functions and
period upper bound do not provide sufficiently good val-                their applicability to the parameter selection of vir-

                                                             11
     tual resources,                                                     [13] C. D. Locke, D. R. Vogel, and T. J. Mesler. Building a
   • for a given taskset, we provided the necessary anal-                     predictable avionics platform in ada: A case study. In IEEE
                                                                              Real-Time Systems Symposium, pages 181–189, 1991.
     ysis in order to determine a lower and upper bound                  [14] A. K. Mok, X. A. Feng, and D. Chen. Resource partition
     on the VR period, thus limiting the search space for                     for real-time systems. In IEEE Real Time Technology and
     optimal VR parameters,                                                   Applications Symposium, pages 75–84, 2001.
                                                                         [15] S. Saewong, R. R. Rajkumar, J. P. Lehoczky, and M. H.
   • the evaluation showed that the VR parameters de-                         Klein. Analysis of hierarchical fixed-priority scheduling.
     rived from the optimal VR period upper bound                             Euromicro Conference on Real-Time Systems, 00:173–181,
     might not be the optimal VR parameters, but they                         2002.
                                                                         [16] I. Shin and I. Lee. Periodic resource model for composi-
     provide sufficiently good parameters if a brute-                          tional real-time guarantees. In Proceedings of the 24th IEEE
     force search is not an option even for the limited                       International Real-Time Systems Symposium, pages 2–13,
                                                                              2003.
     interval of VR periods.
   In future we will examine the effect of non-
preemptable jobs (e.g. packet transmission over net-
works) on the parameter selection of virtual resources.
   Currently we are working on a method to derive the
bandwidth optimal parameters (i.e. both budget and pe-
riod) of a periodic virtual resource only from the speci-
fication of a given taskset.
Acknowledgements
   This work was funded in part by the EU FRESCOR
project (contract number FP6/2005/IST/5-034026).
   We also thank Dr. Robert I. Davis for his comments
on a previous draft version of this paper.
References
 [1] L. Almeida and P. Pedreiras. Scheduling within temporal
     partitions: Response-time analysis and server design. In
     Fourth ACM International Conference On Embedded Soft-
     ware, pages 95–103, 2004.
 [2] E. Bini and G. C. Buttazzo. Measuring the performance of
     schedulability tests. Real-Time Systems, 30(1-2):129–154,
     2005.
 [3] R. I. Davis and A. Burns. Hierarchical fixed priority pre-
     emptive scheduling. In Proceedings of the 26th IEEE Real-
     Time Systems Symposium, pages 389–398, 2005.
 [4] R. I. Davis and A. Burns. An investigation into server pa-
     rameter selection for hierarchical fixed priority pre-emptive
     systems. In 16th International Conference on Real-Time
     and Network Systems, pages 19–28, 2008.
 [5] Z. Deng and J. W.-S. Liu. Scheduling real-time applica-
     tions in an open environment. In IEEE Real-Time Systems
     Symposium, pages 308–319, 1997.
 [6] A. Easwaran, M. Anand, and I. Lee. Compositional analysis
     framework using edp resource models. In Proceedings of
     the 28th IEEE International Real-Time Systems Symposium,
     pages 129–138, 2007.
 [7] A. Easwaran, I. Shin, O. Sokolsky, and I. Lee. Incremen-
     tal schedulability analysis of hierarchical real-time compo-
     nents. In Proceedings of the 6th ACM & IEEE International
     conference on embedded software, pages 272–281, 2006.
 [8] X. A. Feng and A. K. Mok. A model of hierarchical real-
     time virtual resources. In Proceedings of the 23rd IEEE
     Real-Time Systems Symposium, pages 26–35, 2002.
 [9] T.-W. Kuo and C.-H. Li. A fixed-priority-driven open en-
     vironment for real-time applications. In IEEE Real-Time
     Systems Symposium, pages 256–267, 1999.
[10] J. P. Lehoczky, L. Sha, and Y. Ding. The rate monotonic
     scheduling algorithm: Exact characterization and average
     case behavior. In IEEE Real-Time Systems Symposium,
     pages 166–171, 1989.
[11] G. Lipari and E. Bini. Resource partitioning among real-
     time applications. In Euromicro Conference on Real-Time
     Systems, pages 151–158, 2003.
[12] G. Lipari and E. Bini. A methodology for designing hierar-
     chical scheduling systems. Journal of Embedded Comput-
     ing, 1(2):257–269, 2005.


                                                                    12
replacements


                                           30                                                                                                  30




                                                                                                               Utilisation difference (%)
              Utilisation difference (%)




                                           25                                                                                                  25

                                           20                                                                                                  20

                                           15                                                                                                  15

                                           10                                                                                                  10

                                            5                                                                                                  5

                                            0                                                                                                  0
                                                0   10   20   30 40 50 60 70 80 90 100 110                                                          0   10   20   30 40 50 60 70 80 90 100 110
                                                               VR context switch execution time (ticks)                                                            VR context switch execution time (ticks)
                                                                   (a) 5 tasks                                                                                        (b) 10 tasks

                                           30                                                                                                  30




                                                                                                               Utilisation difference (%)
              Utilisation difference (%)




                                           25                                                                                                  25

                                           20                                                                                                  20

                                           15                                                                                                  15

                                           10                                                                                                  10

                                            5                                                                                                  5

                                            0                                                                                                  0
                                                0   10   20   30 40 50 60 70 80 90 100 110                                                          0   10   20   30 40 50 60 70 80 90 100 110
                                                               VR context switch execution time (ticks)                                                            VR context switch execution time (ticks)
                                                                  (c) 20 tasks                                                                                        (d) 30 tasks
          Figure 8. VR utilisation difference between optimal and upper bound parameters for 10% ITU




                                           30                                                                                                  30
                                                                                                               Utilisation difference (%)
              Utilisation difference (%)




                                           25                                                                                                  25

                                           20                                                                                                  20

                                           15                                                                                                  15

                                           10                                                                                                  10

                                            5                                                                                                  5

                                            0                                                                                                  0
                                                0   10   20   30 40 50 60 70 80 90 100 110                                                          0   10   20   30 40 50 60 70 80 90 100 110
                                                               VR context switch execution time (ticks)                                                            VR context switch execution time (ticks)
                                                                   (a) 5 tasks                                                                                        (b) 10 tasks

                                           30                                                                                                  30
                                                                                                                  Utilisation difference (%)
           Utilisation difference (%)




                                           25                                                                                                  25

                                           20                                                                                                  20

                                           15                                                                                                  15

                                           10                                                                                                  10

                                           5                                                                                                    5

                                           0                                                                                                    0
                                                0   10   20   30 40 50 60 70 80 90 100 110                                                          0   10   20   30 40 50 60 70 80 90 100 110
                                                               VR context switch execution time (ticks)                                                            VR context switch execution time (ticks)
                                                                  (c) 20 tasks                                                                                        (d) 30 tasks
          Figure 9. VR utilisation difference between optimal and upper bound parameters for 40% ITU




                                                                                                          13
replacements


                                               30                                                                                                    30




                                                                                                                 Utilisation difference (%)
           Utilisation difference (%)




                                               25                                                                                                    25

                                               20                                                                                                    20

                                               15                                                                                                    15

                                               10                                                                                                    10

                                               5                                                                                                     5

                                               0                                                                                                     0
                                                    0     10   20   30 40 50 60 70 80 90 100 110                                                          0   10   20   30 40 50 60 70 80 90 100 110
                                                                     VR context switch execution time (ticks)                                                            VR context switch execution time (ticks)
                                                                         (a) 5 tasks                                                                                        (b) 10 tasks

                                               30                                                                                                    30




                                                                                                                 Utilisation difference (%)
           Utilisation difference (%)




                                               25                                                                                                    25

                                               20                                                                                                    20

                                               15                                                                                                    15

                                               10                                                                                                    10

                                               5                                                                                                     5

                                               0                                                                                                     0
                                                    0     10   20   30 40 50 60 70 80 90 100 110                                                          0   10   20   30 40 50 60 70 80 90 100 110
                                                                     VR context switch execution time (ticks)                                                            VR context switch execution time (ticks)
                                                                        (c) 20 tasks                                                                                        (d) 30 tasks
         Figure 10. VR utilisation difference between optimal and upper bound parameters for 70% ITU




                                               20                                                                                                    20
                                                                                                                 VR context switch utilisation (%)
           VR context switch utilisation (%)




                                               15                                                                                                    15


                                               10                                                                                                    10


                                               5                                                                                                     5


                                               0                                                                                                     0
                                                    0     10   20   30 40 50 60 70 80 90 100 110                                                          0   10   20   30 40 50 60 70 80 90 100 110
                                                                     VR context switch execution time (ticks)                                                            VR context switch execution time (ticks)
                                                                         (a) 5 tasks                                                                                        (b) 10 tasks

                                               20                                                                                                    20
                                                                                                                 VR context switch utilisation (%)
           VR context switch utilisation (%)




                                               15                                                                                                    15


                                               10                                                                                                    10


                                               5                                                                                                     5


                                               0                                                                                                     0
                                                    0     10   20   30 40 50 60 70 80 90 100 110                                                          0   10   20   30 40 50 60 70 80 90 100 110
                                                                     VR context switch execution time (ticks)                                                            VR context switch execution time (ticks)
                                                                        (c) 20 tasks                                                                                        (d) 30 tasks
                                                        Figure 11. Processor utilisation consumed by the VR context switch at 10% ITU




                                                                                                            14
replacements


                                                   20                                                                                                            20




                                                                                                                         VR context switch utilisation (%)
               VR context switch utilisation (%)




                                                   15                                                                                                            15


                                                   10                                                                                                            10


                                                    5                                                                                                            5


                                                    0                                                                                                            0
                                                        0     10   20   30 40 50 60 70 80 90 100 110                                                                  0   10   20   30 40 50 60 70 80 90 100 110
                                                                         VR context switch execution time (ticks)                                                                    VR context switch execution time (ticks)
                                                                             (a) 5 tasks                                                                                                (b) 10 tasks

                                                   20                                                                                                            20
           VR context switch utilisation (%)




                                                                                                                             VR context switch utilisation (%)
                                                   15                                                                                                            15


                                                   10                                                                                                            10


                                                   5                                                                                                              5


                                                   0                                                                                                              0
                                                        0     10   20   30 40 50 60 70 80 90 100 110                                                                  0   10   20   30 40 50 60 70 80 90 100 110
                                                                         VR context switch execution time (ticks)                                                                    VR context switch execution time (ticks)
                                                                            (c) 20 tasks                                                                                                (d) 30 tasks
                                                            Figure 12. Processor utilisation consumed by the VR context switch at 40% ITU




                                                   20                                                                                                            20
                                                                                                                         VR context switch utilisation (%)
               VR context switch utilisation (%)




                                                   15                                                                                                            15


                                                   10                                                                                                            10


                                                    5                                                                                                            5


                                                    0                                                                                                            0
                                                        0     10   20   30 40 50 60 70 80 90 100 110                                                                  0   10   20   30 40 50 60 70 80 90 100 110
                                                                         VR context switch execution time (ticks)                                                                    VR context switch execution time (ticks)
                                                                             (a) 5 tasks                                                                                                (b) 10 tasks

                                                   20                                                                                                            20
                                                                                                                         VR context switch utilisation (%)
               VR context switch utilisation (%)




                                                   15                                                                                                            15


                                                   10                                                                                                            10


                                                    5                                                                                                            5


                                                    0                                                                                                            0
                                                        0     10   20   30 40 50 60 70 80 90 100 110                                                                  0   10   20   30 40 50 60 70 80 90 100 110
                                                                         VR context switch execution time (ticks)                                                                    VR context switch execution time (ticks)
                                                                            (c) 20 tasks                                                                                                (d) 30 tasks
                                                            Figure 13. Processor utilisation consumed by the VR context switch at 70% ITU




                                                                                                                    15
15



                           10000                                                                                       10000
 Search interval (ticks)




                                                                                             Search interval (ticks)
                           8000                                                                                        8000

                           6000                                                                                        6000

                           4000                                                                                        4000

                           2000                                                                                        2000

                              0                                                                                           0
                                   0   10   20   30 40 50 60 70 80 90 100 110                                                  0   10   20   30 40 50 60 70 80 90 100 110
                                                 VR context switch execution time (ticks)                                                    VR context switch execution time (ticks)
                                                    (a) 5 tasks                                                                                (b) 10 tasks

                           10000                                                                                       10000
 Search interval (ticks)




                                                                                             Search interval (ticks)
                           8000                                                                                        8000

                           6000                                                                                        6000

                           4000                                                                                        4000

                           2000                                                                                        2000

                              0                                                                                           0
                                   0   10   20   30 40 50 60 70 80 90 100 110                                                  0   10   20   30 40 50 60 70 80 90 100 110
                                                 VR context switch execution time (ticks)                                                    VR context switch execution time (ticks)
                                                   (c) 20 tasks                                                                                (d) 30 tasks
                                                 Figure 14. The optimal VR period search interval at 10% ITU




                           10000                                                                                       10000
 Search interval (ticks)




                                                                                             Search interval (ticks)




                           8000                                                                                        8000

                           6000                                                                                        6000

                           4000                                                                                        4000

                           2000                                                                                        2000

                              0                                                                                           0
                                   0   10   20   30 40 50 60 70 80 90 100 110                                                  0   10   20   30 40 50 60 70 80 90 100 110
                                                 VR context switch execution time (ticks)                                                    VR context switch execution time (ticks)
                                                    (a) 5 tasks                                                                                (b) 10 tasks

                           10000                                                                                       10000
 Search interval (ticks)




                                                                                             Search interval (ticks)




                           8000                                                                                        8000

                           6000                                                                                        6000

                           4000                                                                                        4000

                           2000                                                                                        2000

                              0                                                                                           0
                                   0   10   20   30 40 50 60 70 80 90 100 110                                                  0   10   20   30 40 50 60 70 80 90 100 110
                                                 VR context switch execution time (ticks)                                                    VR context switch execution time (ticks)
                                                   (c) 20 tasks                                                                                (d) 30 tasks
                                                 Figure 15. The optimal VR period search interval at 40% ITU




                                                                                        16
                          10000                                                                                       10000
Search interval (ticks)




                                                                                            Search interval (ticks)
                          8000                                                                                        8000

                          6000                                                                                        6000

                          4000                                                                                        4000

                          2000                                                                                        2000

                             0                                                                                           0
                                  0   10   20   30 40 50 60 70 80 90 100 110                                                  0   10   20   30 40 50 60 70 80 90 100 110
                                                VR context switch execution time (ticks)                                                    VR context switch execution time (ticks)
                                                   (a) 5 tasks                                                                                (b) 10 tasks

                          10000                                                                                       10000
Search interval (ticks)




                                                                                            Search interval (ticks)




                          8000                                                                                        8000

                          6000                                                                                        6000

                          4000                                                                                        4000

                          2000                                                                                        2000

                             0                                                                                           0
                                  0   10   20   30 40 50 60 70 80 90 100 110                                                  0   10   20   30 40 50 60 70 80 90 100 110
                                                VR context switch execution time (ticks)                                                    VR context switch execution time (ticks)
                                                  (c) 20 tasks                                                                                (d) 30 tasks
                                                Figure 16. The optimal VR period search interval at 70% ITU




                                                                                       17

				
DOCUMENT INFO
Shared By:
Categories:
Tags:
Stats:
views:3
posted:2/6/2011
language:English
pages:17