Patent ID: 8595746

Claim:
A method for scheduling a plurality of tasks given in a vehicle, the method comprising: producing periodical reference cycles repeated at a constant period, each of the reference cycles being given as a time slice, the tasks being given execution rights in sequence in the vehicle; first performing the tasks, each of the tasks being given an in-1TS activation time required for each task in each time slice (TS) in order to ensure real-time performance of the task, the tasks including first type of tasks each of which is necessarily given the execution right during the in-1TS 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 in-1TS activation time thereof in each of the time slices, a sum of the in-1TS 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 in-1TS 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.