Scheduling and its Types
Scheduling and its types are described as follows. There are two types of Scheduling and they are Preemptive Scheduling and Non-Preemptive Scheduling.
1. Preemptive Scheduling: Preemptive scheduling is used when a process switches from running state to ready state or from waiting for the state to the ready state. The resources (mainly CPU cycles) are allocated to the process for a limited amount of time and they are taken away, and the process is again placed back in the ready queue if that process still has CPU burst time remaining. That process stays in a ready queue until it gets the next chance to execute.
Algorithms based on preemptive scheduling are Round Robin (RR), Shortest Job First (SJF basically non-preemptive) and Priority (non-preemptive version), etc.
2. Non-Preemptive Scheduling: Non-preemptive Scheduling is used when a process terminates, or a process switches from running to waiting for the state. In this scheduling, once the resources (CPU cycles) is allocated to a process, the process holds the CPU until it gets terminated or it reaches a waiting state. In the case of non-preemptive scheduling does not interrupt a process running CPU in the middle of the execution. Instead, it waits till the process completes its CPU burst time and then it can allocate the CPU to another process.
Algorithms based on preemptive scheduling are Shortest Remaining Time First (SRTF), Priority (preemptive version), etc.
You may also like: Comparison among Scheduler