Prerequisite-based scheduler
First Claim
1. A method for scheduling a plurality of tasks in a processing system having a plurality of defined resources, comprising:
- identifying prerequisites for each task, the prerequisites representing all defined resources needed for that task to execute to completion;
identifying one or more higher priority task paths and one or more lower priority task paths, each of the paths having a plurality of tasks in series;
representing each defined resource by one or more resource flags that provide information about that resource;
storing the prerequisites for each task as a collection of resource flags known as a prerequisite row;
storing the system state as a collection of resource flags;
creating a prerequisite table, the prerequisite table having one prerequisite row for each instantiated task arranged in descending order according to a task priority order determined in accordance with the higher priority task paths and the lower priority task paths, and having one column for each resource flag;
in a descending row order, performing a comparison of the prerequisite row for the task in a given row against a system state representing a current state of the defined resources until a task is identified for which the comparison reveals that the prerequisites for the identified task are currently available; and
dispatching the identified task.
7 Assignments
0 Petitions
Accused Products
Abstract
A prerequisite-based scheduler is disclosed which takes into account system resource prerequisites for execution. Tasks are only scheduled when they can successfully run to completion and therefore a task, once dispatched, is guaranteed not to become blocked. In a prerequisite table, tasks are identified horizontally, and resources needed for the tasks are identified vertically. At the bottom of the table is the system state, which represents the current state of all resources in the system. If a Boolean AND operation is applied to the task prerequisite row and the system state, and if the result is the same as the prerequisite row, then the task is dispatchable. In one embodiment of the present invention, the prerequisite based scheduler (dispatcher) walks through the prerequisite table from top to bottom until a task is found whose prerequisites are satisfied by the system state. Once found, this task is dispatched.
-
Citations
40 Claims
-
1. A method for scheduling a plurality of tasks in a processing system having a plurality of defined resources, comprising:
-
identifying prerequisites for each task, the prerequisites representing all defined resources needed for that task to execute to completion; identifying one or more higher priority task paths and one or more lower priority task paths, each of the paths having a plurality of tasks in series; representing each defined resource by one or more resource flags that provide information about that resource; storing the prerequisites for each task as a collection of resource flags known as a prerequisite row; storing the system state as a collection of resource flags; creating a prerequisite table, the prerequisite table having one prerequisite row for each instantiated task arranged in descending order according to a task priority order determined in accordance with the higher priority task paths and the lower priority task paths, and having one column for each resource flag; in a descending row order, performing a comparison of the prerequisite row for the task in a given row against a system state representing a current state of the defined resources until a task is identified for which the comparison reveals that the prerequisites for the identified task are currently available; and dispatching the identified task. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18)
-
-
19. In a processing system having a plurality of defined resources, the processing system for executing a plurality of tasks, a computer program for scheduling the plurality of tasks, the computer program being stored on a machine readable medium and executable to perform acts comprising:
-
identifying prerequisites for each task, the prerequisites representing all defined resources needed for that task to execute to completion; identifying one or more higher priority task paths and one or more lower priority task paths, each of the paths having a plurality of tasks in series; representing each defined resource by one or more resource flags that provide information about that resource; storing the prerequisites for each task as a collection of resource flags known as a prerequisite row; storing the system state as a collection of resource flags; creating a prerequisite table, the prerequisite table having one prerequisite row for each instantiated task arranged in descending order according to a task priority order determined in accordance with the higher priority task paths and the lower priority task paths, and having one column for each resource flag; in a descending row order, performing a comparison of the prerequisite row for the task in a given row against a system state representing a current state of the defined resources until a task is identified for which the comparison reveals that the prerequisites for the identified task are currently available; and scheduling the identified task for dispatch. - View Dependent Claims (20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40)
-
Specification