- Long-term scheduler or Job scheduler
- Short-term scheduler or CPU scheduler
- Medium-term scheduler
Long-term scheduler or Job scheduler
- The long-term scheduler or job scheduler selects processes from discs and loads them into main memory for execution. It executes much less frequently.
- It controls the degree of multiprogramming (i.e., the number of processes in memory).
- Because of the longer interval between executions, the long-term scheduler can afford to take more time to select a process for execution.
Short-term scheduler or CPU scheduler
- The short-term scheduler or CPU scheduler selects a process from among the processes that are ready to execute and allocates the CPU.
- The short-term scheduler must select a new process for the CPU frequently. A process may execute for only a few milliseconds before waiting for an I/O request.
The medium-term scheduler schedules the processes as an intermediate level of scheduling
Processes can be described as either:
✦ I/O-bound process – spends more time doing I/O than computations, many short CPU bursts.
✦ CPU-bound process – spends more time doing computations; few very long CPU bursts.