Non Preemptive Scheduling in Operating System (OS)
An operating system often assigns the CPU to processes that need execution. The method used to carry out such a function is known as Scheduling. The method can be of two types, pre-emptive, and non-preemptive scheduling. In the first case, every process is allocated a fixed amount of time to the CPU. When this time is over, the process is replaced by another process which is waiting for the state. On the other hand, the second type of scheduling is the non-preemptive scheduling in which, the process releases the CPU only after its execution is completed.
Some of the important points about this approach are:
- Once the CPU starts executing a process, it finishes before picking up another process.
- Less CPU utilization as compared to pre-emptive scheduling.
- In this case, the response time and the waiting time is more.
- Once a process enters the running state, its state is not deleted from the scheduler until the process is finished executing or finishes its service time.
- If a process with a long burst time is being executed, then a process with minimum burst time might have to starve.
- The scheduling approach is also known as rigid.
- Some of its examples are FCFS, SJF, Priority, etc.
Learn more about non preemptive scheduling through Shortest Job First Scheduling (SJF) algorithm here.
The following diagrammatic representation explains the concept.
|Process||Arrival Time||CPU Burst Time (in milliseconds)|
- Process (Intro)
- Process Life Cycle
- Process Control Block PCB
- Process Scheduling
- Context Switching
- CPU Scheduling
- FCFS Scheduling
- Shortest Job First (or SJF) scheduling – non-preemptive
- Shortest Job First (or SJF) scheduling – preemptive (SRTF)
- Round Robin scheduling
- Priority Scheduling
- Convoy Effect
- Difference between Scheduler and Dispatcher
- Preemptive scheduling vs Non Preemptive scheduling
- Preemptive scheduling
- Non preemptive scheduling