Method and apparatus for scheduling tasks to control hardware devices
First Claim
1. A method for scheduling a plurality of tasks given in an apparatus that produces periodical reference cycles, each of the reference cycles being given as a time slice, the tasks being given execution rights in sequence, the method including steps of:
- first performing the tasks, each of the tasks being given an activation time, the tasks including first type of tasks each of which is necessarily given the execution right during the activation time thereof in each of the time slices and second type of tasks each of which is not necessarily given the execution right during the activation time thereof in each of the time slices, a sum of the activation times given to the first type of tasks in each of the time slices being smaller than a period of each of the time slices, the first type of tasks respectively being given a first priority used to give the execution right and the second type of tasks respectively being given a second priority used to give the execution right;
terminating, among the tasks, a specified task to which the execution right is given in a current time slice of the time slices, by depriving the execution right from the specified task, when a time during which the execution right continues reaches the activation time given to the specified task, the current time slice being a time slice beginning after the latest one reference cycle;
second performing an identification process when each of the reference cycles has been completed or each of the tasks has been finished, wherein in the identification process, i) in cases where there remain, among the first type of tasks, remaining first type of tasks which have not been finished in the current time slice, a first type of task of which first priority is maximum among the remaining first type of tasks is identified, and ii) in cases where there remain no first type of tasks which have not been finished in the current slice, of remaining second type of tasks which are not finished yet in the current time slice, a second type of task of which second priority is maximum is identified; and
assigning the execution right to the identified task through the identification process.
1 Assignment
0 Petitions
Accused Products
Abstract
In a method of scheduling tasks for controlling hardware devices, a specified task having the execution right in a current time slice is terminated by depriving the execution right therefrom, when a time during which the execution right continues reaches the activation time given to the specified task. An identification process is performed when each reference cycle has been completed or each task has been terminated. In the identification process, i) when there remain, time-guaranteed tasks which have not been terminated in the current time slice, a time-guaranteed task whose priority is maximum among the remaining tasks is identified, and ii) when there remain no un-terminated time-guaranteed tasks in the current slice, of remaining non-time-guaranteed tasks which are not terminated yet in the current time slice, a non-time-guaranteed task whose priority is maximum is identified. The execution right is assigned to the identified task through the identification process.
-
Citations
19 Claims
-
1. A method for scheduling a plurality of tasks given in an apparatus that produces periodical reference cycles, each of the reference cycles being given as a time slice, the tasks being given execution rights in sequence, the method including steps of:
-
first performing the tasks, each of the tasks being given an activation time, the tasks including first type of tasks each of which is necessarily given the execution right during the activation time thereof in each of the time slices and second type of tasks each of which is not necessarily given the execution right during the activation time thereof in each of the time slices, a sum of the activation times given to the first type of tasks in each of the time slices being smaller than a period of each of the time slices, the first type of tasks respectively being given a first priority used to give the execution right and the second type of tasks respectively being given a second priority used to give the execution right; terminating, among the tasks, a specified task to which the execution right is given in a current time slice of the time slices, by depriving the execution right from the specified task, when a time during which the execution right continues reaches the activation time given to the specified task, the current time slice being a time slice beginning after the latest one reference cycle; second performing an identification process when each of the reference cycles has been completed or each of the tasks has been finished, wherein in the identification process, i) in cases where there remain, among the first type of tasks, remaining first type of tasks which have not been finished in the current time slice, a first type of task of which first priority is maximum among the remaining first type of tasks is identified, and ii) in cases where there remain no first type of tasks which have not been finished in the current slice, of remaining second type of tasks which are not finished yet in the current time slice, a second type of task of which second priority is maximum is identified; and assigning the execution right to the identified task through the identification process. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16)
-
-
17. A computer-readable program stored in a medium, the program being for scheduling a plurality of tasks given in an apparatus that produces periodical reference cycles, each of the reference cycles being given as a time slice, the tasks being given execution rights in sequence, each of the tasks being given an activation time, the tasks including first type of tasks each of which is necessarily given the execution right during the activation time thereof in each of the time slices and second type of tasks each of which is not necessarily given the execution right during the activation time thereof in each of the time slices, a sum of the activation times given to the first type of tasks in each of the time slices being smaller than a period of each of the time slices, the first type of tasks respectively being given a first priority used to give the execution right and the second type of tasks respectively being given a second priority used to give the execution right,
the program allowing the computer to realize functions of: -
terminating, among the tasks, a specified task to which the execution right is given in a current time slice of the time slices, by depriving the execution right from the specified task, when a time during which the execution right continues reaches the activation time given to the specified task, the current time slice being a time slice beginning after the latest one reference cycle; performing an identification process when each of the reference cycles has been completed or each of the tasks has been finished, wherein in the identification process, i) in cases where there remain, among the first type of tasks, remaining first type of tasks which have not been finished in the current time slice, a first type of task of which first priority is maximum among the remaining first type of tasks is identified, and ii) in cases where there remain no first type of tasks which have not been finished in the current slice, of remaining second type of tasks which are not finished yet in the current time slice, a second type of task of which second priority is maximum is identified; and assigning the execution right to the identified task through the identification process.
-
-
18. An apparatus for scheduling a plurality of tasks given in an apparatus that produces periodical reference cycles, each of the reference cycles being given as a time slice, the tasks being given execution rights in sequence, the apparatus comprises:
-
first performing means for performing the tasks, each of the tasks being given an activation time, the tasks including first type of tasks each of which is necessarily given the execution right during the activation time thereof in each of the time slices and second type of tasks each of which is not necessarily given the execution right during the activation time thereof in each of the time slices, a sum of the activation times given to the first type of tasks in each of the time slices being smaller than a period of each of the time slices, the first type of tasks respectively being given a first priority used to give the execution right and the second type of tasks respectively being given a second priority used to give the execution right, terminating means for finishing, among the tasks, a specified task to which the execution right is given in a current time slice of the time slices, by depriving the execution right from the specified task, when a time during which the execution right continues reaches the activation time given to the specified task, the current time slice being a time slice beginning after the latest one reference cycle; second performing means for performing an identification process when each of the reference cycles has been completed or each of the tasks has been finished, wherein in the identification process, i) in cases where there remain, among the first type of tasks, remaining first type of tasks which have not been finished in the current time slice, a first type of task of which first priority is maximum among the remaining first type of tasks is identified, and ii) in cases where there remain no first type of tasks which have not been finished in the current slice, of remaining second type of tasks which are not finished yet in the current time slice, a second type of task of which second priority is maximum is identified; and assigning means for assigning the execution right to the identified task through the identification process. - View Dependent Claims (19)
-
Specification