What are the high-level thread states?

What are the high-level thread states?

The thread can be in one of the following states:

- Running state: A thread which is in running state has an access to the CPU. This means that the thread is being executed.

- Ready state: A thread is in “Ready” state after it has been created and started. This state signifies that the thread is ready for execution. From here, it can be in the running state

- Dead state: The thread reaches the Death state when it has finished execution. From here on it cannot be executed.

- Waiting state: in this state, the thread is waiting for some action to happen. Once the action happens, the thread is in ready state.

- This waiting thread can be in either sleep, suspend, block or waiting for monitor state.
Preemptive scheduling and time slicing
Preemptive scheduling and time slicing - Under Preemptive scheduling, the task with the highest priority is executed until it enters the waiting or dead states...
What is a task's priority and how is it used in scheduling?
What is a task's priority and how is it used in scheduling? - Every task is assigned a priority for execution. The task with the highest priority is executed first...
What is a monitor?
What is a monitor? - The mechanism that Java uses to support synchronization is the monitor...
Post your comment