next up previous contents Back to Operating Systems Home Page
Next: First comefirst served Up: Scheduling - I Previous: Short term scheduling

Alternative scheduling methods

Short term scheduling methods can be classified according to the ``selection criterion'' they use to decide which process, among the ready ones, should be executed next, and to the ``decision mode'' used to determine when the process switch is to take place.

Decision modes can be either preemptive or nonpreemptive (also said cooperative). In the former case a running process may be blocked by the dispatcher because of the scheduling policy used (e.g. expiration of a fixed time slice, submission of a process with higher priority, particular interrupts occurring, etc.). In the latter a running process is given control of the CPU until completion, or until it put itself to sleep following a request of some service (e.g. an I/O event).

Preemptive modes cause a higher overhead than nonpreemptive ones, because of the multiple switches that may occur during the execution of a process, but allow in principle to achieve fairness in CPU usage, since they prevent a process from monopolising the CPU.

In the next several paragraphs the most common basic selection criteria will be presented. While hardly any actual operating systems implements them literally, it's often the case that real dispatcher designs embody a mix these basic techniques, hence a clear understanding of their relative advantages and disadvantages is important for any designer.





Franco Callari