36 density increase and percentage of schedulability with those of using
Sx
(Here,Sx
stands forSx
g andg
= 2 instead of the originalSx
in 4]). From our simulation result, we nd that the performance ofHSx
is the same asSx
b. In the following, we therefore compare the performance ofSx
,Sx
3 (Sx
g using only bases 2 and 3),Sx
10 (Sx
g using bases less or equal to 10),Sx
100 (Sx
g using bases less or equal to 100) andSx
b.Figure 3.8 shows the dierences of the total densities after task sets are specialized by
Sx
and bySx
b. Figure 3.8(a) shows the average dierence for the task sets which are and Figure 3.8(b) shows the average dierence for all task sets schedulable bySx
b. Figure 3.8(a) has decreasing values when the total utilization for the task set is greater than the schedulability bound ofSr
. In other words, for those schedulable cases, the density dierences between the two get smaller as the system utilization increases. However, wend the improvement of using
Sx
b for the task sets with higher original utilization is not as substantial asSr
b. This is due to the requirement for the distance constraints to be integers after specialization.Figure 3.9(a) shows the percentage of schedulable tasks using
Sx
and usingSx
b. Among those schedulable bySx
b, Figure 3.9(b) shows the percentage of those also schedulable bySx
.Figures 3.10, 3.11 and 3.12 show similar comparisons as in Figure 3.9 except we compare
Sx
bwithSx
3,Sx
10 andSx
100 respectively. We can see for the task sets with an original density less than 90%,Sx
3 can schedule about 90% of the tasks schedulable bySx
b, and with original density less than 95%,Sx
10 can schedule about 90% of tasks schedulable bySx
b. ForSx
100 in Figure 3.12, it performs almost as good asSx
b.65 70 75 80 85 90 95 100 0
0.005 0.01 0.015 0.02 0.025 0.03 0.035
utilization
density difference after specialization, Sx - Sxb
2 tasks 3 tasks 4 tasks 5 tasks 6 tasks 7 tasks
(a)task sets schedulable by
Sx
65 70 75 80 85 90 95 100
0 0.005 0.01 0.015 0.02 0.025 0.03 0.035
utilization
density difference after specialization, Sx - Sxb
2 tasks 3 tasks 4 tasks 5 tasks 6 tasks 7 tasks
(b)task sets schedulable by
Sx
bFigure 3.8: Comparison of density after specialization between
Sx
andSx
b65 70 75 80 85 90 95 100
0 2 4 6 8 10 12 14 16 18 20
utilization
difference in schedulable percentages, Sxb - Sx
2 tasks 3 tasks 4 tasks 5 tasks 6 tasks 7 tasks
(a)
65 70 75 80 85 90 95 100
0 10 20 30 40 50 60 70 80 90 100
utilization
percentage of schedulable task sets, Sx / Sxb
2 tasks 3 tasks 4 tasks 5 tasks 6 tasks 7 tasks
(b)
Figure 3.9: Comparison of schedulable tasks between
Sx
andSx
b38
65 70 75 80 85 90 95 100
0 2 4 6 8 10 12 14 16 18 20
utilization
difference in schedulable percentages, Sx(<=3) - Sx
2 tasks 3 tasks 4 tasks 5 tasks 6 tasks 7 tasks
(a)
65 70 75 80 85 90 95 100
0 10 20 30 40 50 60 70 80 90 100
utilization
percentage of schedulable task sets, Sx(<=3) / Sxb
2 tasks 3 tasks 4 tasks 5 tasks 6 tasks 7 tasks
(b)
Figure 3.10: Comparison of schedulable tasks between
Sx
,Sx
3 andSx
b65 70 75 80 85 90 95 100
0 2 4 6 8 10 12 14 16 18 20
utilization
difference in schedulable percentages, Sx(<=10) - Sx
2 tasks 3 tasks 4 tasks 5 tasks 6 tasks 7 tasks
(a)
65 70 75 80 85 90 95 100
0 10 20 30 40 50 60 70 80 90 100
utilization
percentage of schedulable task sets, Sx(<=10) / Sxb
2 tasks 3 tasks 4 tasks 5 tasks 6 tasks 7 tasks
(b)
Figure 3.11: Comparison of schedulable tasks between
Sx
,Sx
10 andSx
b65 70 75 80 85 90 95 100 0
2 4 6 8 10 12 14 16 18 20
utilization
difference in schedulable percentages, Sx(<=100) - Sx
2 tasks 3 tasks 4 tasks 5 tasks 6 tasks 7 tasks
(a)
65 70 75 80 85 90 95 100
0 10 20 30 40 50 60 70 80 90 100
utilization
percentage of schedulable task sets, Sx(<=100) / Sxb
2 tasks 3 tasks 4 tasks 5 tasks 6 tasks 7 tasks
(b)
Figure 3.12: Comparison of schedulable tasks between
Sx
,Sx
100 andSx
bdistance constraints, a generalized pinwheel scheduler
Sr
g is presented. We have also shown the schedulability condition ofSr
g. Moreover, we present an optimal pinwheel algorithm,Sr
b, among those using the single-number reduction technique. It has also been shown that usingSr
b, which tries all possible bases, a system has a better chance of nding a good schedule than usingSr
. We have also designed a heuristic algorithmHSr
and found thatHSr
andSr
b has almost the same performance in our simulation study. Therefore, we believe thatHSr
is the best practical algorithm for pinwheel scheduling using the single-number reduction technique. For systems requiring integer distance constraints, pinwheel schedulerSx
g which is derived fromSr
g can be used. We also presentSx
b, which tries all possible bases usingSx
g, and prove thatSx
b is the optimal pinwheel algorithm for integer distance constraints using the single-number reduction technique. A polynomial-time heuristic algorithmHSx
is then designed and its performance compared toSx
b.Using optimal pinwheel schedulers like
Sr
b orSx
b, most tasks will be scheduled with a shorter distance constraint than required by the applications. Therefore, tasks will be executed more frequently than originally requested. This may appear to be a waste of system resources since some other tasks may become unschedulable. However,Sr
b orSx
b40 makes task executions more predictable. With the increased predictability, most tasks can run more eciently since less time will be wasted in dealing with system uncertainty 25, 26].
We believe that system utilization will not degrade using the pinwheel scheduling approach.
Multiple-Node Pinwheel Scheduling
Real-time applications running on distributed systems often have timing constraints on tasks running on several processors. To design real-time systems with end-to-end perfor-mance requirements, we need to have algorithms to schedule and to coordinate tasks on dierent processor nodes. In this chapter, an end-to-end scheduling approach based on the pinwheel scheduling model is presented for distributed real-time systems. We present how tasks on dierent nodes may be transformed to have periods consisting of only harmonic numbers. With harmonic periods, on each node, the start and nish times of each task are the same relative to its ready time in each period. Phase alignment algorithms are then applied to adjust the phases between schedules of neighboring nodes so that the overall end-to-end delay is minimized. Using the proposed pinwheel model, schedules on dierent nodes are better synchronized but suer less delays. For many practical real-time systems, this approach provides a more predictable performance and a shorter end-to-end delay.
Algorithms for allocating resources and scheduling tasks are important to the success of real-time systems with end-to-end performance requirements 1, 42, 44]. A good algo-rithm will improve the schedulability, dependability and scalability of systems. Previous work on the problem has studied dierent algorithms when systems are using the
priority-41
42 driven approach. In this chapter, an end-to-end scheduling approach based on the pinwheel scheduling algorithms 3, 15] is presented for distributed real-time systems. Previous pin-wheel algorithms are all designed for a single node. We extend one of the most powerful pinwheel algorithms,
Sr
(refer to Section 2.3.2), to theDSr
algorithm so that all nodes are processed at the same time 19]. We then produce the single-node schedule for each node after it is processed byDSr
and consists of only harmonic distance constraints. After the schedules for individual nodes are produced, we then provide algorithms to adjust the phases (relative start time) between these nodes so that the overall end-to-end delay for transactions is minimized or reduced.Using the pinwheel approach, schedules on dierent nodes are better synchronized and the end-to-end delays are more predictable. We believe that our work provides a useful and complete design methodology to many practical real-time systems that are statically structured and well-dened, such as those in automated factory, automobile and avionics systems 25, 26].
The rest of this chapter is organized as follows. Section 4.1 reviews the basic end-to-end scheduling model. Section 4.2 presents the distributed pinwheel scheduling algorithm