Page 110 - DCAP608_REAL TIME SYSTEMS
P. 110

Unit 11: Application of Clock-driven Scheduling




              A hardware fault may cause some job to execute longer than expected.             Notes
              A software flaw that was undetected during debugging and testing can also cause this
               problem.

          There are many ways to handle overrun as follows:
              A way to handle overruns is to simply abort the overrun job at the beginning of the next
               frame and log the premature termination of the job.

                   Such a fault can then be handled by some recovery mechanism later when necessary.
                   This way seems attractive for applications where late results are not useful, like
                    control-law computation of a robust digital controller.

                   Premature termination of overrun jobs may put the system in some inconsistent
                    state and the actions required recovering from the state and maintain system integrity
                    may be costly.
                   That is why in most real time systems, a job that overruns its allocated time and is
                    found executing at the end of the frame is preempted immediately, if it is not in a
                    critical section at the time, or as soon as it exits the critical section, if it is.
                   The unfinished portion executes as an aperiodic job during the slack time in the
                    subsequent frames or in the background whenever there is spare time.
              Another way to handle overrun is to continue to execute the offending job.
                   The start of the next frame and the execution of jobs scheduled in the next frame are
                    then delayed.
                   Letting a job postpone the execution and completion of jobs scheduled after it can in
                    turn causer these jobs to be late.

                   Appropriate only if the late result is still useful and occasional late completion of
                    periodic job is acceptable.

          11.1.2 Mode  Changes


              We have assumed that the number of periodic tasks in the system  of their parameters
               remain constant as long as the system stays in the same operation mode.
              During a mode change a system is reconfigured.

              Some periodic tasks are deleted from the systems as not required in the new mode.
              The periodic tasks which execute in both modes continue to execute in timely fashion.
              We assume that the parameters of periodic tasks to be executed in the new mode are also
               known.

              The schedule of the tasks executed in the new mode is also precomputed.
              However the new schedule table may not be in the memory, so it must be brought into
               memory.

              Code of the new tasks must also be brought into memory and memory space for data
               accessed by them must be allocated before their execution begins.

              The mode change job is released at a mode-change request.
              The mode change job can either have soft or hard deadline.




                                           LOVELY PROFESSIONAL UNIVERSITY                                   105
   105   106   107   108   109   110   111   112   113   114   115