A real-time process is characterized by continual input, which must be processed fast enough to generate nearly instantaneous output. Each arriving input item is subject to a deadline. Ex: Streaming of audio or video, processing and displaying radar data, control of robots or of fly-by-wire aircraft.
A period is a time interval (typically in milliseconds or even microseconds for some applications) within which each input item must be processed. The end of each period is the implicit deadline for processing the current item.
Given the nature of real-time applications, depending upon their complexity, and necessity, they may run stand alone on a computer (flight control computer, radar intercepts,etc) or on a regular user machine (listening to spotify or a YouTube Live Stream).
Scheduling Algorithms
The rate monotonic (RM) algorithm schedules processes according to the period. The shorter the period, the higher the priority. By picking the shorter period, there is a greater chance that one process will be able to finish – preemptive
The earliest deadline first (EDF) algorithm schedules processes according to the shortest remaining time until the deadline. The shorter the remaining time, the higher the priority. The basic idea is that this system will more likely ensure that process will finish if it’s close, and not be preempted unnecessarily. – preemptive
When looking at these algorithms, you want to ensure that the schedule is feasible – meaning that the deadlines of all processes can be met. If U is considered the CPU utilization:
- EDF is an optimal algorithm in that a feasible schedule is always guaranteed as long as U ≤ 1.
- RM is not guaranteed to produce a feasible schedule but empirical evidence shows that RM is likely to produce a feasible schedule if U is less than approximately 0.7. This may vary based upon the sections that are run.
Scheduling Real-Time Processes was originally found on Access 2 Learn