• No results found

Chapter 3 A Delay Composition Theorem for Real-Time Pipelines

3.7 Simulation Results

To evaluate the actual performance of our delay composition rule and reduction to a single stage system, we constructed a simulator that models a distributed pipelined system. In order to maintain real-time

guarantees within the system, an admission controller is used. For periodic tasks, the admission controller is based on a single stage schedulability test for deadline monotonic scheduling, such as the Liu and Layland bound [60] or response time analysis [8], together with our reduction of the multistage system to a single stage, as shown in Section 3.6. When a task arrives at the system, it is tentatively added to the set of tasks in the system. The admission controller then tests whether the new task set is schedulable. The new task is admitted if the task set is schedulable, and dropped if not. Although the simulation parameters assumed in the evaluation do not reflect any realistic application, the range of values used serve as micro-benchmarks to evaluate the performance of the admission controller.

In the rest of this section, we use the term utilization to refer to the average per-stage utilization. Each point in the figures below represent average values obtained from 100 executions of the simulator, with each execution running for 30000 task invocations. Each admission controller was allowed to execute on the same 100 task sets. End-to-end deadlines (equal to the periods) of tasks are chosen as 10xa simulation seconds,

where x is uniformly varying between 0 and DR (deadline ratio parameter), and a = 500 ∗ N , where N is the number of stages in the system. Such a choice of deadlines enables the ratio of the longest task deadline to the shortest task deadline to be as large as 10DR. If DR is chosen close to zero, tasks would have similar

deadlines. If DR is higher (for example DR = 3), deadlines of tasks would differ more widely. As will be demonstrated later in this section, we observed from our simulations that the achievable utilization varied significantly with the choice of DR. The default value for DR is taken to be 1. The execution time for each task on each stage was chosen based on the task resolution parameter, which is a measure of the ratio of the total computation time of a task over all stages to its deadline. The stage execution time of a task is calculated based on a uniform distribution with mean equal to DTN , where D is the deadline of the task and T is the task resolution. The stage execution times of tasks were allowed to vary up to 10% on either side of the mean. Task preemptions are assumed to be instantaneous, that is, the task switching time is zero. Load is defined as the sum of computation times of all tasks that arrive during the simulation divided by the duration of the experiment. Unless otherwise specified, we use the following default values - system load of 100%, task resolution of 1 : 100, and 5 pipeline stages. The 95% confidence interval for all the utilization values presented in this section is within 0.004 of the mean value, which is not plotted for the sake of legibility.

We first consider the case of aperiodic tasks. Below, we refer to our new process of testing an “equivalent” single-stage system a meta-schedulability test. Recall that, in this approach, the entire pipeline is transformed into one single-stage system that takes the whole pipeline into account and is subjected to the original end- to-end deadlines. This is in contrast, for example, to approaches that partition end-to-end deadlines into

0.05 0.1 0.15 0.2 0.25 0.3 0.35 10 8 5 4 3

Average Per Stage Utilization

No. of Stages

Aperiodic Pipeline Bound Meta-schedulability test using aperiodic bound

Figure 3.8: Comparison of tests for aperiodic job arrivals 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 10 8 5 4 3

Average Per Stage Utilization

No. of Stages

Traditional, Preemptive Traditional using RTA, Preemptive Meta-schedulability test using LL, Preemptive Meta-schedulability test using RTA, Preemptive Meta-schedulability test using LL, Non-Preemptive Meta-schedulability test using RTA, Non-Preemptive Holistic Analysis, Preemptive

Figure 3.9: Comparison of tests for different pipeline stages

per-stage deadlines then apply uniprocessor analysis to each stage independently.

For aperiodic tasks, we transform the pipeline into a single stage, and then use in the meta-schedulability test, the uniprocessor aperiodic utilization bound derived in [3]. We compare it with the pipeline bound presented in [34], which is based on the same aperiodic task bound. As there are no previously known techniques to study aperiodic tasks under non-preemptive scheduling, we evaluate the case of aperiodic tasks only under preemptive scheduling. For both the above mentioned tests, while keeping other simulation parameters constant, we varied the number of pipeline stages and measured the utilization, the results of which are shown in Figure 3.8. The average per-stage utilization of the aperiodic pipeline bound presented in [34] decreases linearly with the number of pipeline stages, as it does not account for the overlap in the execution of different pipeline stages. Our meta-schedulability test is able to achieve nearly the same utilization regardless of the number of pipeline stages. For the rest of this section, we shall concern ourselves only with periodic tasks.

We compare our meta-schedulability test with holistic analysis [89], and two implementations of tradi- tional pipeline schedulability tests, which divide the end-to-end deadline into equal individual single stage deadlines. The first implementation, which we call ‘traditional’, tests for each stage if the sum of the ratios of computation times to per-stage deadlines over all tasks is less than the Liu and Layland bound for periodic tasks. Since this bound is pessimistic when per-stage deadlines are less than periods, our second imple- mentation, which we call ‘traditional using RTA’, uses response time analysis based on deadline monotonic scheduling to analyze the schedulability of each stage. In this analysis, if the response times on every stage for all tasks are found to be less than their respective per-stage deadlines, then the task set is declared to be schedulable. As explained in the example in Section 3.1, tests that partition end-to-end deadlines to per- stage deadlines (and use single-stage analysis independently on each stage) may be pessimistic because they

assume a worst-case arrival pattern at each stage. Holistic analysis avoids this problem. In holistic analysis, the response time on one stage is considered as the jitter for the next change. The analysis does not divide the end-to-end deadline into single stage deadlines. Nevertheless, by considering the previous stage response time as the jitter, it considers possible that a job is delayed by the same higher priority job on every stage of the pipeline. We compare the above approaches to the performance of our meta-schedulability test under preemptive as well as non-preemptive scheduling. In the following figures, for curves labeled preemptive, the scheduling was preemptive and the preemptive version of the test was used in admission control. Likewise, for curves that are marked non-preemptive, the scheduling was non-preemptive and the non-preemptive version of the test was used. In our meta-schedulability test, we use both the Liu and Layland bound and response time analysis on the resulting single stage system. We did not evaluate the holistic analysis technique applied to non-preemptive scheduling as described in [52], as this adds an extra term to account for blocking due to lower priority jobs and tends to be more pessimistic than holistic analysis applied to preemptive scheduling. The meta-schedulability test applied to non-preemptive scheduling was observed to outperform holistic analysis applied to preemptive scheduling, which in turn, would sustain a higher utiliza- tion than holistic analysis applied to non-preemptive scheduling as described in [52]. Likewise, for a similar reason the traditional schedulability analysis was not analyzed under non-preemptive scheduling.

We conducted experiments to measure the average per-stage utilization for different number of pipeline stages, when using admission controllers based on each of the above mentioned tests. In these experiments, task periods were set equal to their end-to-end deadlines. Figure 3.9 plots this comparison. Notice that the meta-schedulability test under non-preemptive scheduling using response time analysis as the single stage test, significantly outperforms all other tests. As motivated in Section 3.1, preemption can reduce the overlap in the execution of jobs on different stages, resulting in non-preemptive scheduling performing better than preemptive scheduling in the worst case. We observe that the utilization for both the traditional pipeline tests decrease proportionally with the number of stages in the pipeline system. Holistic analysis outperforms both traditional tests, but its utilization nevertheless decreases with increasing number of pipeline stages. In contrast, our meta-schedulability test sustains nearly the same utilization, regardless of the number of pipeline stages. In other words, the pessimism in declaring task sets schedulable is not dependent on the number of pipeline stages. This property is a result of our delay composition rule. Under preemptive scheduling, the meta-schedulability test outperforms holistic analysis for pipelines longer than 5 stages.

We compared the utilization achieved under preemptive scheduling by our meta-schedulability test based on RTA with holistic analysis, for two different deadline ratio parameters and for different number of pipeline stages. Figure 3.10 plots this comparison. For both analysis techniques, trends similar to those in Figure 3.9

0.2 0.4 0.6 0.8 1 1.2 10 8 5 4 3

Average Per Stage Utilization

No. of Stages

Meta-schedulability test using RTA, DR 1.0 Holistic analysis, DR 1.0 Meta-schedulability test using RTA, DR 3.0 Holistic analysis, DR 3.0 Simulation, DR 1.0 Simulation, DR 3.0

Figure 3.10: Comparison of tests for different stages and different deadline ratio parameter values under preemptive scheduling 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 3 2.5 2 1.5 1 0.5

Average Per Stage Utilization

Deadline Ratio Parameter Meta-schedulability test using RTA, Preemptive Meta-schedulability test using RTA, Non-preemptive Holistic Analysis, Preemptive

Figure 3.11: Comparison of tests for different dead- line ratio parameter values

are observed. It can be observed that as the deadline ratio parameter increases, the achievable per-stage utilization significantly increases. For high deadline ratio parameter values, the deadlines of lower priority tasks are very large compared to those of higher priority tasks (when DR = 3, the deadline ratio of the highest to the lowest priority task can be as high as 1000). At most times, some of these lower priority tasks exist in the system and can execute in the background, thereby providing high processor utilization. This figure helps to suggest in some sense, that the worst case situation in terms of reducing the achievable processor utilization, occurs when all tasks have very similar deadlines and stage execution times. Further, the values specified as ‘simulation’ were the lowest utilization values at which deadline misses were observed in the absence of any admission controller (for the same task parameters). This serves to indicate an upper bound on the achievable utilization.

In order to precisely quantify the space in which non-preemptive scheduling performs better than pre- emptive scheduling, we compare the performance of the meta-schedulability tests and holistic analysis by varying the deadline ratio parameter DR, while keeping the other parameters equal to their default values. Figure 3.11 plots this comparison for the meta-schedulability test under both preemptive and non-preemptive scheduling, and holistic analysis under preemptive scheduling. Recall that a DR value of x indicates that the end-to-end deadlines of tasks can vary by as much as 10x. As stage execution times of tasks are chosen pro- portional to their end-to-end deadline, when the deadlines are very different, the lower priority tasks (with large deadlines) have a large stage execution time. As DR increases, initially, the admitted utilization under preemptive as well as non-preemptive scheduling increases. The reason for this is due to the fact that when lower priority tasks have a larger computation time, they can execute in the background of higher priority tasks leading to better system utilization. However, larger computation times for lower priority tasks imply that higher priority tasks can now be blocked for longer durations under non-preemptive scheduling, which

could lead to missed deadlines and consequently lower utilization sustained by the admission controller. For DR values up to 2, non-preemptive scheduling results in better performance than preemptive scheduling. For DR values greater than 2, the utilization under non-preemptive scheduling decreases, as higher priority jobs are now blocked for longer durations.

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 8 5 2.857 2 1.333 1 0.5

Average Per Stage Utilization

Ratio of End-to-End Deadline to Task Period Meta-schedulability test using RTA, Preemptive, 5 Stages Meta-schedulability test using RTA, Non-Preemptive, 5 Stages Traditional using RTA, Preemptive, 5 Stages

Figure 3.12: Comparison of utilization for different relative values of the end-to-end deadline with re- spect to the period for 5 pipeline stages

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 8 5 2.857 2 1.333 1 0.5

Average Per Stage Utilization

Ratio of End-to-End Deadline to Task Period Meta-schedulability test using RTA, 8 Stages Meta-schedulability test using RTA, Non-Preemptive, 8 Stages Traditional using RTA, 8 Stages

Figure 3.13: Comparison of utilization for different relative values of the end-to-end deadline with re- spect to the period for 8 pipeline stages

A criticism of the above results is that they favor our tests by setting end-to-end deadlines equal to periods. As mentioned in Section 3.1, traditional tests that partition end-to-end deadlines work very well as long as deadlines are large compared to periods. In order to characterize the break-even point after which our meta- schedulability test under preemptive and non-preemptive scheduling outperforms traditional schedulability analysis under preemptive scheduling, we compared the achievable utilization for different values of the ratio between the end-to-end deadline and the task period, while maintaining the offered system load constant (by proportionately changing the execution times of tasks). Response time analysis was used as the single- stage schedulability test for both the techniques. Figures 3.12 and 3.13 plot this comparison for 5 and 8 pipeline stages, respectively. The x axis is plotted in log scale (base 2). Note that a ratio of 5 for 5 stages, and 8 for 8 stages indicate that the period is equal to the per-stage deadline (for traditional schedulability analysis). When the ratio of the end-to-end deadline to period is higher, the laxity available to jobs is larger, and hence, the utilizations of both techniques are high. Under non-preemptive scheduling, apart from the increased laxity that allows for higher utilizations, there is one other factor that determines the sustainable utilization. As the DR value increases, the deadlines of jobs are larger, and as computation times are chosen proportional to the deadlines, the computation times of jobs also increase. This causes high priority jobs to be blocked for longer durations by lower priority jobs (similar to the trend observed in Figure 3.11), reducing the sustainable utilization. These two opposing forces cause the utilization under non-preemptive scheduling to increase up to a ratio of 2, then decrease until 5, and then increase again. For lower values

of the ratio of the end-to-end deadline to the period, the meta-schedulability test under preemptive and non-preemptive scheduling outperforms the traditional test under preemptive scheduling, while at higher values of the end-to-end deadline, the traditional test performs better. The curve for the traditional test under non-preemptive scheduling would always be lower than the curve under preemptive scheduling, and is not plotted in the figure. The cross-over point, the largest value of the ratio of end-to-end deadline to period where the meta-schedulability test outperforms the traditional test, is larger for non-preemptive scheduling than for preemptive scheduling. Further, the cross-over point is higher for 8 stages than for 5 stages, showing the pessimism of the traditional test with increasing number of pipeline stages.

0.16 0.18 0.2 0.22 0.24 0.26 0.28 0.3 100 80 50 30 25 20

Average Per Stage Utilization

Load (%)

3 Stages 5 Stages 8 Stages

Figure 3.14: Comparison of utilization for different number of pipeline stages and system loads

0.2 0.21 0.22 0.23 0.24 0.25 0.26 0.27 1:100 1:80 1:60 1:40 1:20

Average Per Stage Utilization

Task Resolution 3 Stages

5 Stages 8 Stages

Figure 3.15: Comparison of utilization for different number of pipeline stages and task resolutions We varied the system load and measured the utilization for our meta-schedulability test under preemptive scheduling together with the Liu and Layland bound for different number of pipeline stages, as shown in Figure 3.14. The loads considered were 20%, 25%, 30%, 50%, 80%, and 100%. The load values represent the load of all tasks presented to the system, and not the load of the admitted tasks. The utilization of the system saturates at a load of about 25%.

We then considered task resolutions of 1:20, 1:40, 1:60, 1:80, and 1:100. For different pipeline stages, we plot the utilization the meta-schedulability test under preemptive scheduling using the Liu and Layland bound in Figure 3.15. Regardless of the number of pipeline stages, the utilization slightly increases with smaller task execution times (with respect to the task deadline), for the same system load. This can be attributed to the fact that the stage additive component is more for larger task execution times, which in turn causes the utilization to be lower.