An RTOS facilitates meeting some system-design constraints. But, minimizing interrupt latency isn't the only way to ensure that jobs get done within time specifications.
Most developers think of a fixed-priority preemptive scheduling policy when they discuss hard real-time systems. The most common scheduling approach used by a majority of real-time operating-system (RTOS) implementations, it's easy to implement and easy to understand. A number of alternatives are listed in the Real-Time Scheduling Policies table below.
The various scheduling policies provide advantages, depending upon the task's type of job. For example, dynamic-priority preemptive scheduling is useful when fast system response time is crucial. A task that supports the user interface may have its priority increased when user input is being processed.
Reservations provide a way to manage resources like processor time. Such an approach divides up a system's processing capacity and will enable tasks to reserve a fraction of this capacity. The task needn't use all of its time, but it's guaranteed at least that amount. Also, a task needn't reserve a single block of time. It may have multiple blocks that are distributed at useful intervals. An RTOS that supports reservations has a mechanism to specify the required intervals. Reservation systems can be integrated on top of many existing RTOS implementations.
More reservations Task execution time is just one way to employ reservations. Almost any resource can benefit from reservation systems. Physical memory pages, network bandwidth, and disk bandwidth represent just a few resources commonly managed in real-time environments.Network bandwidth reservations typically deliver quality-of-service (QoS) features. QoS is very important for Voice-over-IP (VoIP) service and real-time networking.
Finding an RTOS that supports reservation isn't easy, as few companies offer an RTOS with this feature. Green Hills Integrity and TimeSys Linux are two that provide a form of reservation support. Integrity has time and memory resource guarantees, while TimeSys Reservations is an add-on to TimeSys Linux. This system also supports TimeSys' implementation of the Real Time Java Specification.
REAL-TIME SCHEDULING POLICIES |
Fixed-Priority Preemptive Scheduling Each task has a fixed priority. The highest priority task runs. Tasks typically change their priority. Most common RTOS scheduler. |
Dynamic-Priority Preemptive Scheduling Each task has a priority that may change based on the services it may be performing or utilizing. |
Rate-Monotonic Scheduling Priorities assigned based on task frequency of execution. The higher-rate task has higher priority. |
Deadline-Monotonic Scheduling Generalization of rate-monotonic scheduling, in which a task's deadline is a fixed point in time relative to the beginning of the period. The highest priority has the shortest fixed deadline. Identical to rate-monotonic scheduling, when deadline time equals task period. |
Earliest-Deadline-First Scheduling Task with the earliest deadline is assigned the highest priority. |
Least Slack Scheduling Also known as least laxity algorithm. Task priorities assigned according to the laxity (the difference between the deadline interval and the computation time). |