The following problems will be due in class.
Each of the following systems of periodic tasks is scheduled and executed according to a cyclic schedule. For each system, choose an appropriate frame size. Preemptions are allowed, but the number of preemptions should be kept small.
The frame size has to meet all three criteria discussed in the chapter.
The only frame size that works for this set of tasks is f = 8.
The frame size has to meet all three criteria discussed in the chapter.
The only frame size that works for this set of tasks is f = 3 (assuming the last two tasks are split as described above.)
The frame size has to meet all three criteria discussed in the chapter.
Either f = 3 or f = 5 may work, assuming the last two tasks are split as described above. We need to make a schedule to verify the tasks can be scheduled with those frame sizes.
When doing parts b and c use the system from previous parts. That is, if any sporadic jobs are scheduled in part a, they will be in the system in parts b and c.
Call the aperiodic job A. When all the periodic jobs complete at the end of frame 1, the scheduler will let A execute until the start of frame 2, 1 time unit later. Frames 2, 3, and 4 have no slack because S1 and S3, from part (a), consume all of it. The scheduler runs A in the slack at the ends of frames 5 and 6. A completes at t=30, the end of frame 6.
When the periodic jobs complete at the end of frame 1, the scheduler will let A execute until the start of frame 2, 1 time unit later. (If frame 1 has several periodic jobs, and one of them ends after t=1, A could steal the slack then, but it would still get 1 time unit of execution time in frame 1). Frames 2, 3, and 4 have no slack because S1 and S3, from part (a), consume all of it. The scheduler runs A at the start of frames 5 and 6, stealing one unit of slack from each frame. A completes at t=26, 1 time unit into frame 6.
A fourth, aperiodic task controls the user interface. The arrival rate of user-interface jobs is 10 jobs/s. The mean execution and mean square execution time 10 ms and 125 ms, respectively.
What is the average response time of jobs in the aperiodic task? Is the user likely feel that the user-interface is responsive?
As always it is important to pay attention to units. The three periodic task parameters are:
U = 5 μs/22.7 μs + 6 μs/22.7 μs + 0.5 ms/1.45 ms ≈ 0.830
UA = 10 Hz × 10 ms = 0.1
Plugging in to (5.4a) & (5.4b) on P. 95, W ≈ 111 ms
A response time of 100 ms is generally considered the limit for a system to feel responsive. This system is pretty close to that, but a little above, so it might seem a bit sluggish, but mostly responsive.