- In multiprogramming systems, whenever two or more processes are simultaneously in the ready state, a choice has to be made which process to run next.
- The part of the OS that makes the choice is called the scheduler
- and the algorithm it uses is called the scheduling algorithm.
- In a single-processor system, only one process can run at a time; any others must wait until the CPU is free and can be rescheduled.
- Every time one process has to wait, another process can take over use of the CPU.
- Scheduling of this kind is a fundamental OS function. Almost all computer resources are scheduled before use.
- The CPU is, of course, one of the primary computer resources. Thus, its scheduling is central to OS design.
- Many of the same issues that apply to process scheduling also apply to thread scheduling, although some are different.