 operating system scheduler picks the task with the earliest deadline to run. A task with an earlier deadline preempts a task with a later deadline.
Least slack scheduling
Least slack scheduling is also a dynamic priority preemptive policy. The slack of a task instance is the absolute deadline minus the remaining execution time for the instance to complete. The OS scheduler picks the task with the shortest slack to run first. A task with a smaller slack preempts a task with a larger slack. This approach maximizes the minimum lateness of tasks.
Dynamic priority preemptive scheduling
In a dynamic scheduling approach such as dynamic priority preemptive scheduling, the priority of a task can change from instance to instance or within the execution of an instance. In this approach a higher priority task preempts a lower priority task. Very few commercial RTOS support such policies because this approach leads to systems that are hard to analyze for real-time and determinism properties. Thus, the analysis in the following articles will focus instead on static scheduling policies.
Part 7 shows how to analyze scheduling behavior, and how to ensure tasks meet their deadlines.
Used with the permission of the publisher, Newnes/Elsevier, this series of eight articles is based on chapter eight of "DSP Software Development Techniques for Embedded and Real-Time Systems," by Robert Oshana.