Scheduling tasks

The scheduler removes tasks from the task queue and schedules them for execution in one of the available slots. The scheduler attempts to schedule a task:


The scheduler selects a task for execution by narrowing down the set of queued tasks using the following steps:


  1. Start with the set of all tasks on the queue that match any available execution slot.
  2. Narrow down to tasks for jobs that have the highest job priority in the task set.
  3. Narrow down to the task that was placed on the queue first.

The selection process ends as soon as the result set contains a single task (in which case the task is scheduled for execution) or is empty (in which case no action can be taken). The last step selects a single task so the selection process always ends.