Difference between Preemative and non-Preemative in OS   

                                              Github (Follow me) and Click it for more things

Difference Between Preemptive and Non-Preemptive Scheduling in OS

preemptive-vs-non-preemptive-schedulingIt is the responsibility of CPU scheduler to allot a process to CPU whenever the CPU is in the idle state. The CPU scheduler selects a process from ready queue and allocates the process to CPU. The scheduling which takes place when a process switches from running state to ready state or from waiting state to ready state is called Preemptive Scheduling.

On the other hand, the scheduling which takes place when a process terminates or switches from running to waiting for state this kind of CPU scheduling is called Non-Preemptive Scheduling.

The basic difference between preemptive and non-preemptive scheduling lies in their name itself. That is a Preemptive scheduling can be preempted; the processes can be scheduled. In Non-preemptive scheduling, the processes can not be scheduled.

Let us discuss the differences between the both Preemptive and Non-Preemptive Scheduling in brief with the help of comparison chart shown below.

Content: Preemptive Vs Non-Preemptive Scheduling

  1. Comparison Chart
  2. Definition
  3. Key Differences
  4. Conclusion

Comparison Chart

BASIS FOR COMPARISONPREEMPTIVE SCHEDULINGNON PREEMPTIVE SCHEDULING
BasicThe resources are allocated to a process for a limited time.Once resources are allocated to a process, the process holds it till it completes its burst time or switches to waiting state.
InterruptProcess can be interrupted in between.Process can not be interrupted till it terminates or switches to waiting state.
StarvationIf a high priority process frequently arrives in the ready queue, low priority process may starve.If a process with long burst time is running CPU, then another process with less CPU burst time may starve.
OverheadPreemptive scheduling has overheads of scheduling the processes.Non-preemptive scheduling does not have overheads.
FlexibilityPreemptive scheduling is flexible.Non-preemptive scheduling is rigid.
CostPreemptive scheduling is cost associated.Non-preemptive scheduling is not cost associative.

Comments

Popular posts from this blog

Computer Architecture vs Computer Organization