Processing

Please wait...

Settings

Settings

Goto Application

1. EP2984565 - METHOD FOR EXECUTING TASKS IN A CRITICAL REAL-TIME SYSTEM

Note: Text based on automatic Optical Character Recognition processes. Please use the PDF version for legal matters

Claims

1. A method for offline scheduling processes forming a task conforming to a flexible model for a real-time multitasking system, the method comprising the following steps carried out by a toolchain for compiling source code defining the task:

a) assigning to each process a hardware resource need and a time constraint, wherein hardware resources include CPU occupation and memory footprint;

b) allocating to each process a time slot having a duration corresponding to the time constraint of the process;

c) identifying a branch point at which is decided the execution of one or the other of two alternative processes (a, b);

d) allocating to the two alternative processes a common time slot (+2);

e) assigning to the common time slot a resource need (max(a,b)) equal to the larger of the resource needs of the two alternative processes;

f) iterating from step c) for each branch point;

g) organizing the resulting time slots in an execution template associated with the task, the resulting template being defined by a succession of consecutive time slots, each associated to at least one process and a resource need; and

h) producing static scheduling parameters for the multitasking system from the execution template, wherein the time slots configure synchronization points of the real-time multitasking system for initiating the corresponding processes, and the resource need associated to each slot configures a watchdog of the real-time multitasking system for monitoring that the corresponding process executes within its constraints.


  2. The method of claim 1, wherein the source code represents the task in the form of a graph defining a set of processes connected by transition nodes, wherein each transition node defines a synchronization point according to a time base during execution of the task on the multitasking system, the method comprising the steps of:

• defining the limits of the time slot allocated to each process from a source transition node and a destination transition node of the process;

• for two alternative processes that have a common source node (1) and two respective target nodes (2, 3), merging the two target nodes into a merged target node (2_3); and

• defining the time slot common to both alternative processes from the common source node and the merged target node (2_3).


  3. The method according to claim 2, comprising, for two alternative processes (b+1, c+4) having in step c) different time constraints, the following steps:

• creating an intermediate transition node (3b) in a first (c) of the two alternative processes (c+4) having the longest time constraint, resulting in a first partial alternative process (c1) between the source node and the intermediate node, and a second partial process (c2) between the intermediate node and the target node of the first alternative process;

• assigning to the first partial alternative process a first resource need (c1) and a time constraint (1) equal to the time constraint of the second alternative process;

• assigning to the second partial process a second resource need (c2) such that the sum of the first and second resource needs is equal to the resource need of the first alternative process (c), and a time constraint (c2) equal to the difference of the time constraints of the two alternative processes; and

• proceeding with the first partial alternative process (c1+1) and the second alternative process (b+1) according to step d).


  4. The method of executing a task scheduled according to claim 3, comprising the following steps executed in the multitasking system:

• in each time slot, checking by the watchdog that the execution of an ongoing process complies with the resource need assigned to the time slot; and

• omit signaling a fault by the watchdog if the execution of the ongoing process exceeds the resource need and the ongoing process is the first partial alternative process (c1).


  5. The method of claim 4, comprising the steps of:

• setting a state variable (B=1) upon execution of the first partial alternative process (c1);

• omit signaling a fault by the watchdog if the execution of the ongoing process exceeds the resource need and the state variable is set; and

• clearing the state variable at a synchronization point corresponding to a merged target node (2_3).


  6. The method according to claim 3, comprising the following steps for a cyclic portion of the graph:

• dividing each process (c2|d) having a longer time constraint in a set of partial processes having a shorter time constraint that is the greatest common divisor of the time constraints in the cyclic portion, whereby the cyclic portion of the graph is transformed into a normalized sub-graph defining a sequence of full or partial processes all having the same normalized time constraint; and

• distributing the resource need of each process having a longer time constraint between the corresponding partial processes, whereby the sum of the resource needs of the partial processes is equal to the resource need of the process having the longer time constraint.


  7. The method of claim 6, comprising the steps of:

• overlapping the end of a first portion of the sub-graph over the beginning of a second portion of the sub-graph, so that the transition nodes of the end of the first portion of the sub-graph (1, 2, 3_3b) coincide with respective nodes (4a, 4b, 4) of the beginning of the second portion of the sub-graph, whereby two consecutive pairs of coincident nodes define a time slot common to the processes having as respective origins the two nodes of the first pair; and

• assigning to the common time slot thus defined a resource need equal to the greatest of the resource needs of the processes associated with the first pair of nodes, and a time constraint equal to the normalized time constraint.