Preemptive scheduling vs. time slicing.Preemptive scheduling ensures the highest priority thread to execute until it enters the waiting or dead states.
Under time slicing scheme, thread is executed for a predefined slice of time and then re-enters into the pool of ready threads.What is the difference between preemptive scheduling and time slicing?In preemptive scheduling, if a task with lower priority is executing, it can be preempted with a task with higher priority. However, in time slicing, the task is run to completion for that time slice after which the scheduler reschedules the tasks per their priorities, etc.
|