Difference between preemptive scheduling and time slicing in Java

What is the difference between preemptive scheduling and time slicing?

Preemptive scheduling enables the highest priority task execution until waiting or dead states entered. It also executes, until a higher priority task enters.

Time slicing allows a task to execute for a stipulated time slice and then reenters the pool of ready tasks. At that time the scheduler determines the executable task, based on the priority and various other tasks.

If a certain task is running and the scheduling method used is preemptive, and then if there is another task that has a higher priority than the executing task, then the executing task is preempted by the higher priority task.

In time slicing methods, a task executes for a predefined slice of time.
After the execution of that task, if there is another task with a higher priority, the scheduler executes the priority task the next depending on priority and other factors..
What is a task's priority and how is it used in scheduling?
A task’s priority is an integer value. This value is used to identify the relative order of execution with respect to other tasks...
Difference between the Boolean & operator and the && operator
A single ampersand is used to perform ‘bit-wise AND’ operation on integer arguments. It constitutes the logical AND operator...
Java - Advantage of the event-delegation model over event inheritance model.
Event-delegation model has two advantages over event-inheritance model...
Post your comment