| Rate-monotonic Scheduling |
Website Links For Scheduling |
Information AboutRate-monotonic Scheduling |
| CATEGORIES ABOUT RATE-MONOTONIC SCHEDULING | |
| scheduling algorithms | |
| real-time computing | |
|
In Computer Science , rate-monotonic scheduling is an optimal Preemptive static-priority Scheduling Algorithm used in Real-time Operating System s. The inputs to the algorithm are processes (tasks, threads) with:
In 1973 , Liu and Layland proved that for a set of periodic tasks with unique periods, a feasible schedule that will always meet deadlines exists if the CPU utilization is: : Where is the computation time, and is the release period (with deadline one period later.) For example for . When the number of processes tends towards Infinity this expression will tend towards: : So a rough estimate is that RMS in the general case can meet all the deadlines if CPU utilization is . The other of the CPU can be dedicated to lower-priority non real-time tasks. It is known that a randomly generated periodic task system will meet all deadlines when the utilization is or less , however this fact depends on knowing the exact task statistics (periods, deadlines) and cannot be guaranteed for all task sets. The ''rate monotonic'' priority assignment is ''optimal'' meaning that if any ''static priority'' scheduling algorithm can meet all the deadlines, then the ''rate monotonic'' algorithm can too. The Deadline-monotonic Scheduling algorithm is also optimal in the situation where periods and deadlines are identical, in fact in this case the algorithms are identical; in addition, deadline monotonic scheduling is also optimal when deadlines are less than periods . An optimal static-priority scheduling algorithm when deadlines are greater than periods is an '' Open Problem ''. RESOURCE PREEMPTION, PRIORITY INHERITANCE In many practical applications, resources are shared and the unmodified RMS will be subject to Priority Inversion and Deadlock hazards. In practice, this is solved by introducing Priority Inheritance . Examples of priority inheritance algorithms include (from simplest to most complex):
Priority inheritance algorithms can be characterized by two parameters. First, is the inheritance lazy (only when essential) or immediate (boost priority before there is a conflict). Second is the inheritance optimistic (boost a minimum amount) or pessimistic (boost by more than the minimum amount): In practice there is no mathematical difference (in terms of the Liu-Layland system utilization bound) between the lazy and immediate algorithms, and the immediate algorithms are more efficient to implement, and so they are the ones used by most practical systems. The ''Basic Priority Inheritance protocol'' can produce ''chained blocking'', i.e. an almost arbitrarily long delay from the time a high priority task requests a critical section, until it is served. The other protocols guarantee that at most one lower priority critical section must finish before the high priority task gets its critical section. The ''Priority Ceiling Protocol'' is available in the VxWorks real-time kernel but is seldom enabled. An example of usage of the ''Basic Priority Inheritance'' is related to the " Mars Pathfinder Bug " which was fixed on Mars by changing the creation flags for the semaphore so as to enable the priority inheritance. EXAMPLE The utilization will be: : The theoretical limit for processes will be: : Since the system is schedulable! SEE ALSO REFERENCES
EXTERNAL LINKS
|
|
|