Page 102 - DCAP608_REAL TIME SYSTEMS
P. 102
Unit 10: Working of Clock-driven Scheduling
execute in frame k as long as there is slack. When the cyclic executive finds the aperiodic job Notes
queue empty, it lest the periodic task server execute the next slice in the current block. The
amount of slack remains the same during this execution.
Example of slack stealing is discussed below:
T1= (3, 1); T2= (10, 4): RM scheduled; + aperiodic job A:r = 0.1 , e = 2.1
Figure 10.1: Example of Slack Stealing
Source: http://www.dei.unipd.it/corsi/so2/12-aperiodic-sporadic-tasks-1.pdf
The initial amount of sack in each frame can be pre-computed along with the cyclic schedule
and stored in the table defining the schedule.
It is necessary for the cyclic executive to keep track of the amount of available slack and
update this amount as it consumes the slack.
This can be done using an interval timer.
At the beginning of each frame, the cyclic executive sets the timer to the value of the initial
slack in the frame.
The timer counts down whenever an aperiodic job executes ahead of any slice in the
current block.
When the timer expires, indicating that there is no more slack, the cyclic executive preempts
the executing aperiodic job and lets the execution of the next job slice in the current block
begin.
Most operating systems do not offer interval timers of sub-millisecond granularity and
accuracy.
This scheme is practical only when the temporal parameters of periodic tasks are in orders
of hundreds of milliseconds or seconds.
Self Assessment
Fill in the blanks:
1. In clock driven scheduling, a schedule of jobs is computed ………………
2. All scheduling decisions are made a ………………
3. In clock driven scheduling, schedule is static, finite but generally is applied ………………
4. The run-time scheduler is driven by a ……………… timer and simply follows this schedule.
5. There is ……………… runtime overhead. Behaviour is completely predictable and some
variation can be accommodated using multiple tables which apply to different operational
modes of the system.
6. The sooner the aperiodic jobs complete, the ……………… responsive the system is.
LOVELY PROFESSIONAL UNIVERSITY 97