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. The low priority task is executed after that. This task priority is a simple integer value that identifies the relative order in which it should be executed with respect to other tasks. The scheduler attempts to schedule higher priority tasks before lower priority tasks.
What is a monitor?
What is a monitor? - The mechanism that Java uses to support synchronization is the monitor...
Use of synchronization keyword
Use of synchronization keyword - A method, declared as synchronized, first attains a lock over an object before beginning an execution...
How do we allow one thread to wait while other to finish?
How do we allow one thread to wait while other to finish? - The wait method, notify method, and notifyAll method provide an efficient transfer of control from one thread to another...
Post your comment