Page 142 - DCAP608_REAL TIME SYSTEMS
P. 142

Unit 14: Advance Priority-driven Scheduling of Periodic Tasks




          14.2.3 Tick Scheduling                                                                Notes

          All of our previous discussion of priority-driven scheduling was driven by job release and job
          completion events. Alternatively, can perform priority-driven scheduling at periodic events
          (timer interrupts) generated by a hardware clock i.e. tick (or time-based) scheduling.
          Additional factors to account for in schedulability analysis:
              The fact that a job is ready to execute will not be noticed and acted upon until the next clock
               interrupt; this will delay the completion of the job
              A ready job that is yet to be noticed by the scheduler must be held somewhere other than
               the ready job queue, the pending job queue
              When the scheduler executes, it moves jobs in the pending queue to the ready  queue
               according to their priorities; once in ready queue, the jobs execute in priority order

              Clear that non-ideal behaviour can affect the schedulability of a system
          Self Assessment


          Fill in the blanks:
          6.   A ready job is blocked when it is prevented from executing by a ……………………….. job.
          7.   A priority inversion is when a lower-priority job executes while a ……………………………
               job is blocked.
          8.   The fact that a job is ready to execute will not be noticed and acted upon until the next
               ……………………. interrupts.
          9.   When the scheduler executes, it moves jobs in the ………………………… queue to the
               ready queue according to their priorities.

          10.  A ready job that is yet to be noticed by the ………………………….. must be held somewhere
               other than the ready job queue.

              


             Case Study  Priority Manipulations

                t is a POSIX-compliant real-time operating system; we can implement every task and
                the Meta scheduler  as separate POSIX threads.  Furthermore, observe  that we only
             Irequire preemptive priority scheduling with FIFO policy. On the other hand, the UA
             scheduling algorithm embedded in the Meta scheduler framework can be user-defined.
             Therefore, the Meta scheduler essentially needs to map the sequencing decision of a UA
             scheduling algorithm to priorities. This requirement manifests itself in the implementation
             of two complementary operations, namely Meta preempts and Meta resume.
             Our approach is a four-priority scheme: the task selected by a UA algorithm is assigned a
             high priority P2, and all other tasks in the ready queue are assigned a low priorityP1 (P1
             < P2) 5. As such, the underlying priority scheduler always schedules the high  priority
             thread, i.e., the task selected by Meta scheduler.
             In practice, threads that represent application tasks may reside in different processes and
             hence in different address spaces other than that of the Meta scheduler. Therefore, the Meta
                                                                                 Contd...



                                           LOVELY PROFESSIONAL UNIVERSITY                                   137
   137   138   139   140   141   142   143   144   145   146