Our research is based on a pinwheel scheduler
Sr
. For distance-constrained task sets with real-number distance constraints and execution times, the schedulerSr
transforms the distance constraints into harmonic numbers with a base of 2. We have designed several pinwheel scheduling algorithms based onSr
for a single node and multiple nodes. We also studied how to practically use the pinwheel scheduling algorithms in a practical system environment. The pinwheel solutions can be used not only in the distance-constrained model but also the periodic task model. By taking advantage of the harmonic-period property in pinwheel scheduling, the eective schedule can be generated and stored in polynomial time and space. Therefore, a exible time-driven scheduling is possible and the schedule optimization can be done on-line. This provides a new scheme for the real-time system design.In Chapter 3, we present several single-node pinwheel schedulers. We rst study the
Sr
g scheduler , which is a version ofSr
using any baseg
, and its schedulability condition.Then, the
Sr
b scheduler is derived by trying all possible bases usingSr
g. The schedulability condition ofSr
b is presented and its optimality in the class of schedulers using the single-number reduction technique is proved. Since the time complexity ofSr
b is exponential to the number of tasks, we also study the performance ofSr
b by simulation and compare it with a near-optimal heuristic algorithmHSr
. We then present pinwheel schedulersSx
gand
Sx
b, for handling systems with integer distance constraints. The optimality ofSx
bis also proved and its performance studied. We also compare
Sx
b with a near-optimal heuristic algorithmHSx
, which transforms the distance constraints into integer multiples.The various pinwheel schedulers studied in this dissertation are summarized in Table 6.1.
Figure 6.1 shows the the relationship among
Sx
,Sr
,Sx
b, andSr
b in term of the set of all distance-constrained task sets schedulable by each one of them. The proofs of the relationship can be found in Appendix D. In practice,HSr
orHSx
should be used to do the pinwheel transformation because it is near-optimal and can be done in polynomial time.Table 6.1: Various pinwheel schedulers
distance constraint
g
= 2g
2 optimalg
near-optimal heuristicr
is an integerSx Sx
gSx
bHSx
r
is a real numberSr Sr
gSr
bHSr
a = {(1,2),(1,3)}
b = {(1,2.1),(2.1,6)}
c = {(1,1.9),(1,4)}
d = {(1,2),(2.2,6.1)}
e = {(1,1.9),(2.1,6)}
f = {(1,2),(1.1,3)}
: Jitterless
CX: the set of all DCTS’s schedulable by Scheduler x
CSrb
CSx CSxb a.
b.
e.
c. d.
f.
CSr
Figure 6.1: The relationships among
C
SxC
SrC
Sxb andC
Srb.80 We present the multiple-node pinwheel scheduling in Chapter 4 for the real-time sys-tems with multiple processor nodes and end-to-end timing constraints. To design real-time systems with end-to-end timing constraints, we need to schedule and coordinate tasks on dierent nodes. We extend
Sr
to theDSr
algorithm so that the distance constraints on all nodes are transformed at the same time into harmonic values. After the schedules for indi-vidual nodes are produced, we provide algorithms to adjust the phases (relative start time) between each pair of consecutive nodes so that the overall end-to-end delay is minimized or reduced. Using the distributed pinwheel approach, schedules on dierent nodes are better synchronized and the end-to-end delays are more predictable. Our work provides a useful and complete design methodology to many practical real-time systems that are statically structured and well-dened.In Chapter 5, we study how to apply the pinwheel scheduling algorithms in a time-driven system. We rst design a pinwheel schedule constructor
SSr
to generate the eective pinwheel schedule (the state time and nish time of each task) in polynomial time. Base on the eective schedule we can generate the complete pinwheel schedule (with preemptions) o-line (or even on-line) so that the time-driven approach can be applied. To eciently and economically schedule the tasks on-line, we design several time-driven on-line pinwheel schedulers (TOPS's) with dierent complexities according to dierent system requirements.We also address dierent implementation issues and how to modify the TOPS's to solve them.
In summary, we have investigated the pinwheel scheduling problems in a single node and multiple nodes. We show that the pinwheel schedulers can achieve both good predictabil-ity and schedulabilpredictabil-ity. The comparisons of dierent schedulers in periodic and distance-constrained task model is shown in Table 6.2 21].
EDF
has been shown to be optimal in terms of the schedulability condition. However, due to its dynamic scheduling nature, its behavior is not as predictable as the other two schedulers. When systems are heavily overloaded, systems become unstable and most of the tasks will have insucient time to execute and thus miss their deadlines.EDF
also has high jitters since the schedules areTable 6.2: Comparison of Schedulers
Scheduler
EDF RM Sr
bschedulability condition 1
n
(21=n;1)n
(21=n;1)jitter high lowy none
end-to-end delay long short shortest
resource reservation dicult easyy easy worst case blocking time large large small transient overload unstable stable stable
yfor high-priority tasks
highly dynamic with no control for regularity.
RM
andSr
b have the same schedulability condition. However, assuming the execution time is constant, pinwheel schedules are jitter-less 32] and can be generated o-line (or even on-line) in polynomial time 19]. Therefore it provides the best predictability. In other words, it is easy to predict when some specic resources may be needed by a task usingSr
b whileRM
can only predict resource usages for high-priority tasks. Therefore, resource reservation is easier to do inSr
b than inRM
. In multiple-node systems, pinwheel schedules in dierent nodes can be properly aligned to provide shorter end-to-end delays 19]. In comparison, the end-to-end delay for tasks usingRM
may be more dicult to adjust 42]. In practice, since a pinwheel eective schedule can be generated in polynomial time, the schedule optimization can be done in a more dynamic fashion and the scheduling can be exible and adaptive to the system environment change.Therefore, we believe our work creates a new scheme for a better real-time system design.