Difference Between Preemptive and Non-Preemptive Scheduling in OS

Operating SystemComputersHardware

In this post, we will understand the difference between pre-emptive and non-pre-emptive scheduling in operating system −

Preemptive scheduling

  • In this type of scheduling, the resources (CPU Cycle) have been allocated to a process for a limited amount of time.

  • A process can be interrupted when it is being executed.

  • If a process that has a high priority arrives frequently in the ‘ready’ queue, the low priority processes may starve.

  • This kind of scheduling has overheads since it has to schedule multiple processes.

  • It is flexible in nature.

  • It is expensive in nature.

  • The CPU utilization is high in this type of scheduling.

  • Examples of pre-emptive scheduling include: Round Robin scheduling, Shortest Remaining Time First scheduling.

Non-preemptive scheduling

  • In this type of scheduling, once the resources (CPU Cycle) have been allocated to a process, the process holds it until it completes its burst time or switches to the ‘wait’ state.

  • A process can’t be interrupted until it terminates itself or its time is over.

  • If a process that has a long burst time is running the CPU, then the process that has less CPU burst time would starve.

  • It doesn’t have overhead.

  • It is not flexible in nature.

  • It is not expensive in nature.

  • Examples of non-pre-emptive scheduling include: First Come First Serve and Shortest Job First.

raja
Published on 20-Apr-2021 09:04:49
Advertisements