主权项 |
1. A method for scheduling tasks with deadline constraints, which is based on a model of independent periodic tasks and performed in user space, in which:
each task to be scheduled is associated with a data structure, which is defined in user space and contains at least one time information item and an information item that is indicative of a state of activity of the task, said state of activity being chosen from a list comprising at least: a state of a task being executed; a state of a task awaiting the end of its execution period; and a state of a task ready to be executed, awaiting a resumption condition; in the course of its execution, each task modifies said information item that is indicative of its state of activity and, if need be, according to a predefined scheduling policy, calls a scheduler that is executed in user space; upon each call, said scheduler: sets up a queue for the tasks that are ready to be executed, awaiting a resumption condition; sorts said queue according to a predefined priority criterion; if necessary, preempts a task being executed by sending it a signal forcing it to change to said state of a task ready to be executed, awaiting a resumption condition; and sends said resumption condition at least to the task that is at the head of said queue. |