Assignments |
Beware that there are multiple correct answers to most of the questions, since there are multiple correct schedules and multiple ways of giving proofs.
Consider the following set of implicit-deadline periodic tasks.
i | pi | ei |
---|---|---|
1 | 6 | 2 |
2 | 8 | 2 |
3 | 12 | 3 |
2/6 + 2/8 + 3/12 = 0.333... + 0.250 + 0.250 = 0.833...
LCM (2 x 3, 2 x 2 x 2, 2 x 2 x 4) = 2 x 2 x 2 x 3 = 24
The following solution uses a frame size of 4. The brackets above the line indicate the frames. The arcs indicate the task release times, which are also deadlines.
TASK | WCRT | Note |
---|---|---|
1 | 6 | second period |
2 | 8 | third period |
3 | 8 | both periods |
TASK | WC Jitter | Note |
---|---|---|
1 | 4 | (12-2)-6 = 4 : first two jobs |
2 | 6 | (24-10)-8 = 6 : last two jobs |
3 | 0 | same for all |
We only have a small number of valid frame sizes, that are greater than or equal to all the execution times, divide the hyperperiod, and are less than or equal to all of the deadllines. They are: 3, 4, 6.
The frame size of 6 will not work, because we cannot enforce the release time and deadline of the second period of task 2. (See the modular contraint in the textbook.)
If we increase the execution time of task 2 to 3, we have a total utilization requirement 95.666... percent; that is, only one free time slot in the hyperperiod. By examining each of the two remaining potential frame sizes we can see that they all leave more than one free time slot. If we cannot preempt, there is no solution.
With a frame size of 3, jobs of task 1 would leave one empty slot per frame. With 4 jobs in the hyperperiod, we would need four empty time slots.
With a frame size of 4, jobs of tasks 2 and 3 would leave one empty slot per frame. With more than one job per hyperperiod, we would again need more than one empty time slot.
T. P. Baker.($Id) |