Page 143 - DCAP608_REAL TIME SYSTEMS
P. 143
Real Time Systems
Notes scheduler thread may not be able to directly adjust priority of an application thread. In
such a case an “agent” thread is necessary to reside in each application process. The “agent”
thread accepts commands from the Meta scheduler thread and adjusts priority of the target
thread accordingly.
Furthermore, application threads are usually created by a “factory” thread. For example,
the main thread in each process can use a timer to periodically create a sequence of
application threads, which are instances of a periodic task. Conceptually, activations of
the “agent” thread and the “factory” thread represent scheduling events, and hence should
be “atomic” in the sense that one should not interleave with another. To do that, we assign
priority P3 to both the “agent” thread and the “factory” thread. The atomicity property is
guaranteed due to the FIFO policy for threads with the same priority. Note that P3 is
higher than both P2 and P1, such that a scheduling event can always be issued even during
the execution of an application thread. Finally, the Meta scheduler thread is assigned the
highest priority, denoted as P4.
Thus, our implementation of Meta preempt and Meta resume only requires four distinct
priorities, P1, P2, P3 and P4, where P1 < P2 < P3 < P4. This requirement is satisfied by
virtually all POSIX-compliant real-time operating systems.
Questions:
1. Define Meta scheduler.
2. What is the function of Meta scheduler?
3. What is the significance of POSIX-compliant in real-time operating systems?
Source: http://www.computer.org/csdl/trans/ts/2004/09/e0613-abs.html
14.3 Summary
In case the priority can change only at job boundaries, for example with EDF, and then the
algorithm is said to have “fixed job priority”.
In case the priority can change throughout the job execution also, and then the algorithm
is said to have “dynamic priority”.
As long as the total utilization of a system satisfies, it will never miss any deadline.
If we were to determine whether a system of such tasks is schedulable based on the
schedulability tests we have learned, we would surely underutilized the processor.
A ready job is blocked when it is prevented from executing by a lower-priority job; a
priority inversion is when a lower-priority job executes while a higher-priority job is
blocked.
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.
14.4 Keywords
Algorithm: It refers to a step-by-step problem-solving procedure, especially an established,
recursive computational procedure for solving a problem in a finite number of steps.
Context Switch: A context switch is the process of storing and restoring the state (context) of a
process so that execution can be resumed from the same point at a later time.
138 LOVELY PROFESSIONAL UNIVERSITY