An optimal algorithm for scheduling soft-aperiodic tasks in fixed-priority preemptive systems
Summary (3 min read)
1 Introduction
- A reclaimer can cooperate with a slack stealer by making available for aperiodic service any processing time uuused by the periodic tasks when they require less thau their worst-case execution times.
- The slack stealing algorithm requires a relatively large amount of calculation.
- A direct implementation may not be practical.
- It does, however, provide a lower bound on aperiodic response which is attainable and a basis for finding nearly optimal implementable algorithms.
Tk = min{t 1 E(t) = &pi },
- It is important to note that if such an upper envelope can be found, it will lead to the minimum response time for every aperiodic task, not just the average response time.
- The authors will determine the upper envelope and the associated optimal aperiodic scheduling algorithm in the next section, under the following assumptions: l Al: All overhead for context swapping, task scheduling, etc., is assumed to be zero.
- Tasks are ready at the start of their period and do not suspend themselves or synchronize with any other task.
- Higher priority-work from 0 until the completion time Of Tij.
Ai
- Gives the largest amount of aperiodic processing in [0, t] at priority level i or higher possible such that the processor is constantly busy with priority level i or higher activity but all jobs of Ti meet their deadline.
- These are step functions, with jump points corresponding to the completion times of the jobs of Ti, or the Cij's, and jump heights corresponding to the Aij values computed by Equation (7).
- Thus, every job of ~1 has zero slack, in the interval of time between its arrival and completion.
- As a result, their exact completion times depend on the amount of higher priority aperiodic processing done at run-time.
- The authors next determine bounds on the aperiodic processing at each level for which all deadlines of all periodic tasks can still be met.
3.2 Algorithm Description
- If A*(s, t) < W, then aperiodic work can be done during [s, s+A*(s, t)] at the highest priority level, but no further work can be done until additional slack becomes available.
- Note that more aperiodic processing capacity can become available only when a periodic job is completed, because these are the only points in time in which the Ai(s, t) functions step up to their next values.
- Thus, the evaluation of A*(s, t) should be done only when aperiodic work arrives to an empty aperiodic queue or when there is aperiodic work ready and a periodic task completes.
4.2 Servicing Hard Deadline Aperiodics
- The problem of scheduling hard deadline aperiodic tasks where the periodic tasks are scheduled using the Earliest Deadline algorithm was studied by Ghetto and Chetto [14] .
- A similar approach can be used to solve this scheduling problem for the case in which the periodic tasks are scheduled according t,o a fixed priority algorithm.
- If so, that aperiodic task's deadline could be guaranteed.
- This is the basis for an approach to guaranteeing harddeadline aperiodic tasks.
4.3 Managing Aperiodic Capacity: The Allocation Problem
- It is important to point out that the SRPT would reduce the uveruge aperiodic response times; however, if the slack stealer were to process aperiodic tasks using SRPT instead of FIFO ordering, it would no longer possess the strong optimality property of minimizing every aperiodic response time.
- Thus an aperiodic scheduling policy different from the slack stealer using SRPT will have a longer average aperiodic response time, but the response times of some of the aperiodic tasks may be shorter.
4.4 Finding An Optimal Fixed-Priority Assignment for Joint Scheduling
- This optimality property is relative to a given fixed-priority order for the periodic tasks.
- To see that changes in the fixed priority order can alter the aperiodic response times, consider the following example:.
Example 2
- All periodic deadlines are met and the response time is 13.
- The authors also wish to identify the operating conditions in which the performance of the slack stealing algorithm approaches and/or deviates significantly from the lower bound derived from the queueing model.
- There are four important parameters which play a major role in determining the aperiodic task response times and the accuracy of simple queueing formulas for approximating those response times.
- (1) the periodic load, expressed as a utilizai tion factor, U,. obtained by summing the utilizations 5 Performance Evaluation, also known as The parameters are.
Whaf are the operating conditions for a real-time system under which the slack stealer significantly outperforms state-of-the-art server algorithms? How much do their performances differ under such conditions?
- The answers to these questions can provide valuable insights for assessing the potential value of implementing the slack stealing algorithm as an alternative to current server algorithms.
- Surprisingly, it is sufficient to compute the aperiodic response times that would be attained if the aperiodic tasks were to have sole access to the processor.
- Standard results from queueing theory indicate that job response times will increase with the traffic intensity parameter, popcr = Uopr and also with the mean computation requirement of the aperiodic jobs.
- These effects will carry over to a processor which handles both aperiodic tasks and hard deadline periodic tasks.
- Moreover, the difference between UP and UBD is an additional measure of the slack that is typ ically available.
An interesting
- Observation is that for a fixed demand-capacity ratio and a given aperiodic load, the mean aperiodic execution times for THBD are larger than those for TLBD.
- Thus, one woulcl expect that larger job sizes would tend to mask out performance differences due to a larger server execution time.
- Yet, the optimal algorithm outperforms the sporadic server as the aperiodic load is increased, even under these ideal conditions.
- The performance gains of the optimal algorithm, on the other hand, illustrate the superiority of allocating time for the aperiodics on demand, without the constraints of a periodic server task.
- Second, the authors observe that the optimal curve departs from the ideal M/M/l bound at lower aperiodic loads than those observed for the 40% load.
5.2.2 Evaluation of the INS Task Set
- The sporadic server deviates from the optimal at a very low aperiodic load , which reaffirms the higher susceptibility of the sporadic server to the periodic load relative to the optimal algorithm.
- In fact, the optimal algorithm is capable of maintaining aperiodic response times equal to those of the M/M/l bound for the entire range of aperiodic loads and both demand-capacity ratios shown in Figure 8 .
- The performance results for the INS task set confirm that a periodic workload with a high breakdown utilization is very favorable to aperiodic responsiveness, as concluded in the random task set study.
- It seems even more surprising that such a performance is maintained for all reasonable aperiodic loading levels, even for a moderate demand-capacity ratio of 50%.
- This is a significant result because it shows a promising direction for finding some solutions to the analytical prediction of aperiodic response times, which is an open research issue.
5.3 Performance Summary
- The performance of the optimal algorithm approaches the ideal M/M/l bound within a 10% error margin for a relatively large range of total loads.
- In most cases, optimal performance tends to deviate significantly from the ideal when the aperiodic load is high relative to the periodic load.
- Under these conditions, preemption delays due to the periodic tasks tend to dominate the aperiodic response times.
- Since this situation is not likely to occur at high periodic loads, the performance of the optimal algorithm remains close to the M/M/l bound for a wide range of operating conditions.
Did you find this useful? Give us your feedback
Citations
636 citations
Cites background from "An optimal algorithm for scheduling..."
...The Slack Stealing algorithm overcomes these disadvantages [125, 183, 184]....
[...]
471 citations
Cites methods from "An optimal algorithm for scheduling..."
...The ability to run soft tasks in the slack provided by the hard tasks is also supported by the Slack Stealing schemes [82, 89, 166, 212] which have similar properties to servers....
[...]
402 citations
Cites background from "An optimal algorithm for scheduling..."
...The Slack Stealing algorithm suffers from none of these disadvantages (Lehoczky and Ramos-Thuel 1992)....
[...]
385 citations
350 citations
References
7,067 citations
1,582 citations
1,230 citations
947 citations
867 citations
Related Papers (5)
Frequently Asked Questions (16)
Q2. What is the way to compute the ideal response time bound for aperiodic tasks?
An M/M/l queueing model can be used to compute the ideal response time bound for such an aperiodic workload, using the M/M/l formula previously stated.
Q3. What is the effect of aperiodic processing on the periodic8?
The longer the aperiodic mean service times, the more the periodic8 will be forced to interrupt aperiodic processing thus increasing their response times.
Q4. What is the way to maximize aperiodic processing time?
The slack stealer maximizes the time available for aperiodic processing during any interval of time among all algorithms that use fixed priority for the periodic tasks and meet all periodic deadlines.
Q5. What is the effect of a periodic load on the aperiodics?
at a 70% periodic load, the preemption delays experienced by the aperiodics have a significant impact on their response times.
Q6. How does the optimal algorithm perform under a large range of loads?
The performance of the optimal algorithm approaches the ideal M/M/l bound within a 10% error margin for a relatively large range of total loads.
Q7. How is the optimal algorithm able to mask out periodic tasks?
in this region, the optimal algorithm is capable of “masking out” the presence of periodic tasks so efficiently that the responsiveness of aperiodic tasks is almost equal to that attainable on a dedicated processor.
Q8. What is the way to predict aperiodic response times?
In conclusion, results indicate that TLBD has a particular operating region under which the M/M/l queueing model can be used to predict average aperiodic response times within a reasonably small error margin.
Q9. How is the optimal algorithm able to maintain aperiodic response times?
In fact, the optimal algorithm is capable of maintaining aperiodic response times equal to those of the M/M/l bound for the entire range of aperiodic loads and both demand-capacity ratios shown in Figure 8.
Q10. How is the aperiodic response time compared to other servers?
the distribution of service opportunities is optimal, so aperiodic response times are guaranteed to degrade as gracefully as possible.
Q11. How is the performance of the sporadic server optimal?
With a 5% demandcapacity ratio, the performance of the sporadic server is approximately optimal for aperiodic loads up to 25%, or a combined load of 65%.
Q12. How does the optimal algorithm circumvent this shortcomiug?
The optimal algorithm circumvents this shortcomiug by allocating time for aperiodic service in the most aggressive way possible subject only to schedulability constraints.
Q13. What is the difference between aperiodic response times and ubd?
the authors should find that aperiodic response times are an increasing function of l/p and U, and a decreasing function of UBD - Up, the proximity of the periodic load to the task set’s breakdown utilization.
Q14. How can you see the effect of fixed priority assignment on aperiodic response times?
To see that changes in the fixed priority order can alter the aperiodic response times, consider the following example:Example 2Consider two periodic tasks 7, and 76 with the following timing requirements: C, = cb = 1, T, = 14, Tb = 10, D, = 14, Db = 10, I,, = Ib = 0.
Q15. Why are the performance curves for background not shown?
The performance curves for background are not shown because they have degraded an order of magnitude relative to all other algorithms.
Q16. What is the time to execute a sporadic task?
the sporadic server deviates from the optimal at a very low aperiodic load (less than 3% in Figure 8.a), which reaffirms the higher susceptibility of the sporadic server to the periodic load relative to the optimal algorithm.