Page 111 - DCAP608_REAL TIME SYSTEMS
P. 111
Real Time Systems
Notes IN both cases we assume that periodic jobs are independent and hence can be added and
deleted independently.
Aperiodic Mode Change
A reasonable way to schedule a mode-change job that has a soft deadline is to treat it just
like an ordinary aperiodic job, except that it may be given the highest priority and executed
ahead of other aperiodic jobs.
A periodic task that will not execute in the new mode can be deleted and its memory space
and processor time freed.
During mode change, the scheduler continues to use the old schedule table.
Before the periodic tasks server begins to execute a periodic job, however, it checks whether
the corresponding task is marked and return immediately if the task is marked.
Thus the schedule of the periodic tasks that execute in both modes remains unchanged.
The time allocated to the deleted tasks can be used to execute the mod-change job.
Once the new schedule table and code of the new tasks are in memory, the scheduler can
switch to use the new table.
How aperiodic and sporadic jobs in the system should be dealt with during mode change?
(already running)
Since the deadlines of the remaining periodic jobs are soft, their execution can be delayed
until after the mode change.
The sporadic jobs should not be affected by the mode change.
One way to ensure their on-time completion is to defer the switchover from the old
schedule table to the new schedule table until all the sporadic jobs in the system complete.
Clearly this option can lengthen the response time of the mode change.
Another option is to have the mode-change job check whether the sporadic jobs in the
system can complete in time according to the new schedule.
The schedule switchover is deferred only when some sporadic job cannot complete in
time according to the new schedule.
When the delay thus introduces is unacceptably long, the scheduler may be forced to
switchover to the new schedule, let some sporadic jobs complete late and leaved the
affected applications to handle the timing faults.
One way to ensure their on-time completion is to defer the switchover from the old
schedule table to the new schedule table until all the sporadic jobs in the system complete.
Clearly this option can lengthen the response time of the mode change.
Another option is to have the mode-change job check whether the sporadic jobs in the
system can complete in time according to the new schedule.
The schedule switchover is deferred only when some sporadic job cannot complete in
time according to the new schedule.
When the delay thus introduces is unacceptably long, the scheduler may be forced to
switchover to the new schedule, let some sporadic jobs complete late and leaved the
affected applications to handle the timing faults.
Pseudo code on next pate describes a mode changer.
106 LOVELY PROFESSIONAL UNIVERSITY