The mechanism for scheduling is how we actually switch from process to process. This problem has several solutions:
into the polling approach:
Policy dictates which process we choose to run when the kernel is asked to schedule a new process, either by the cooperative or preemptive mechanism. To construct a well thought-out policy, we must address the following long, medium and short term issues:
Generally, we can have two main policy approaches when dealing with realtime scheduling:
Each of the detailed times (wait time, response time, etc.) is a time measured from the point of view of a job. We often look at aggregates of these individual statistics such as average wait time, or worst case turnaround time, when judging the quality of a scheduler.
There is another set of metrics that we can use to look at the quality of a scheduler. These look from the point of view of the scheduler, or the entity scheduling the jobs:
Many of our goals for making the scheduler better are at odds. Making one better can make others worse. For example, improving utilization can lead to an unfair scheduler; improving the worst case of a time metric may take a toll on the average case of said metric.
Job | arrival time | runtime | wait time | turnaround |
A | 0 | 5 | 0 | 5 |
B | 1 | 2 | 4 + δ | 6 + δ |
C | 2 | 9 | 5 + 2δ | 14 + 2δ |
D | 3 | 4 | 13 + 3δ | 17 + 3δ |
average | 5.5 + 1.5δ | 10.5 + 1.5δ | ||