Preemptive scheduling vs. time slicing

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.
What is a daemon threads?
What is a daemon threads? - Daemon threads run at a low priority. The GC is an example of such thread....
Arraylist vs. Vector
Arraylist vs. Vector - Arraylist's methods are not synchronized which means they are not thread safe. Vector's methods are....
What is a Throwable class?
What is a Throwable class? - It is the superclass of all errors and exceptions in Java....
Post your comment