What Is The Difference Between A Preemptive And Non-preemptive Scheduling'?


4 Answers

David Gill Profile
David Gill answered
The difference between 'Preemptive' and 'Non-preemptive scheduling', is that Non-preemptive Scheduling occupies full control of the CPU whereas Preemptive Scheduling allows the computer's Operating System, (OS), control over the states of processes. It may help to understand a little about the different states of a computer process:

  • Process States
There are five states which a process goes through during its cycle;

  1. New - When a process is first activated or created such as when launching a software program (we'll keep to this example throughout this explanation).
  2. Ready - When the program is ready to be assigned to the processor.
  3. Running - When the program is being executed it is known as 'running'.
  4. Waiting - The process here is dormant and waiting for communication from other processes.
  5. Terminated - The term used for when the executed process has finished.
  • Preemptive Scheduling
Preemptive Scheduling is when a computer process is interrupted and the CPU's power is given over to another process with a higher priority. This type of scheduling occurs when a process switches from running state to a ready state or from a waiting state to a ready state.

  • Non-Preemptive Scheduling
Non-Preemptive Scheduling allows the process to run through to completion before moving onto the next task.

Here is an example of the former Preemptive Scheduling -  if you launch a software application such as a text editor, the OS will assign the task to the processor, and will allocate disk space, memory and other resources to the program; the text editor program is now in a running state. If you decide to launch a second application and a new process is generated, various necessary resources are assigned to the new program, and the text editor is kept in a waiting or ready state until the new process has been executed.
Anonymous Profile
Anonymous answered
In Preemptive scheduling the process in forcibly sent to waiting state when a process with higher priority comes to cpu.
In non_preemptive scheduling the process at running state can not be forced to leave the cpu unless it completes.
Anonymous Profile
Anonymous answered
NON-PREEMPTIVE  : It is the shedulling in which the process os the task on any processor is not terminated until it is completed
PREEMPTIVE  :the shedule for which the above is not the case
Anonymous Profile
Anonymous answered
In preemptive scheduling we preempt the currently executing process.
In non preemptive we allow the current process to finish its cpu burst time.

Answer Question