What is pre-emptive and non-preemptive scheduling? Tasks are usually assigned with priorities. At times it is necessary to run a certain task that has a higher priority before another task although it is running. Therefore, the running task is interrupted for some time and resumed later when the priority task has finished its execution. This is called preemptive scheduling.
Eg: Round robin
In non-preemptive scheduling, a running task is executed till completion. It cannot be interrupted.
Eg First In First Out
What is pre-emptive and non-preemptive scheduling?Preemptive scheduling: The preemptive scheduling is prioritized. The highest priority process should always be the process that is currently utilized.
Non-Preemptive scheduling: When a process enters the state of running, the state of that process is not deleted from the scheduler until it finishes its service time.