The task set of the modeling example “State Machine” is expanded further in this architecture pattern with the result that messages are exchanged in a loop, instead of just in one way. To achieve this, task T1 sends a message u to task T2 before runnable R1 is called. The content of this message is 0, if the content of a previously received message e is 0, or 1 if it was 1. Task T2 represents then a state machine with three states that increases its state, if message u is 1 and decreases, if it is 0. In each state the messages y and w are set with state specific values and sent to task T3 and task T4 respectively. In case of State 0, the messages y and w contain the value 0, in case of State 1 both contain 50 and in case of State 2 the value 100 is sent. These messages are written before runnable R2 is called. However, in 30 % of the cases task T4 is activated via an inter-process activation before this runnable call happens. Task T3 varies its dynamic behavior and consequently also its execution time according the transmitted content of message y. Task T4 finally prepares again the input for task T1. If the content received in message w is 0, then in 30% of the cases the content of message e is 0, otherwise 1. In the case that message w is 50, message e is set to 0 with a probability of 50% and to 1 accordingly. Finally, message e is set to 0 in 70% of the cases and to 1 in 30% of the cases, if message w is 100. In addition to this feedback loop, other system architecture patterns are added to be executed concurrently in order to increase the complexity. The tasks T5 and T6 represent a client-server without reply and are equal to the tasks T1 and T2 respectively as described in the modeling example “Client-Server without Reply”. T7 is a periodically activated task without any communication and identical to task T7 of modeling example “Purely Periodic without Communication”.
The table below gives a detailed specification of the tasks and their parameters. The tasks are scheduled according fixed-priority, preemptive scheduling and if not indicated otherwise, all events are active in order to get a detailed insight into the system’s behavior.
Task | Priority | Preemption | Multiple Task Activation Limit | Activation | Execution Time | |
---|---|---|---|---|---|---|
T1 | 3 | FULL | 1 | Periodic | R1 | Uniform |
Offset = 0 | Min = 9.9 * 106 | |||||
Recurrence = 600 * 106 | Max = 10 * 106 | |||||
T2 | 2 | FULL | 1 | Periodic | R2 | Uniform |
Offset = 20 * 106 | Min = 99 * 104 | |||||
Recurrence = 300 * 106 | Max = 100 * 104 | |||||
T3 | 3 | FULL | 1 | R3,0 | Uniform | |
Min = 99 * 104 | ||||||
Max = 100 * 104 | ||||||
Periodic | R3,1 | Uniform | ||||
Offset = 50 * 106 | Min = 99 * 105 | |||||
Recurrence = 500 * 106 | Max = 100 * 105 | |||||
R3,2 | Uniform | |||||
Min = 99 * 106 | ||||||
Max = 100 * 106 | ||||||
T4 | 1 | FULL | 1 | R4 | Uniform | |
Inter-process Activation | Min = 99 * 105 | |||||
Max = 100 * 105 | ||||||
T5 | 5 | FULL | 1 | Periodic | R5 | Uniform |
Offset = 0 | Min = 99 * 105 | |||||
Recurrence = 100 * 106 | Max = 100 * 105 | |||||
T6 | 4 | FULL | 1 | R6,x | Uniform | |
Min = 99 | ||||||
Max = 100 | ||||||
R6,1 | Uniform | |||||
Min = 990 | ||||||
Max = 1 * 103 | ||||||
Periodic | R6,2 | Uniform | ||||
Offset = 15 * 106 | Min = 49.5 * 103 | |||||
Recurrence = 60 * 106 | Max = 50 * 103 | |||||
R6,3 | Uniform | |||||
Min = 990 * 103 | ||||||
Max = 1 * 106 | ||||||
R6,4 | Uniform | |||||
Min = 49.5 * 106 | ||||||
Max = 50 * 106 | ||||||
T7 | 0 | FULL | 1 | R7,1 | Uniform | |
Min = 59.4 * 106 | ||||||
Periodic | Max = 60 * 106 | |||||
Offset = 0 | R7,2 | Uniform | ||||
Recurrence = 1000 | Min = 19.8 * 106 | |||||
Max = 20 * 106 |
In order to show the impact of changes to the model, the following consecutive variations are made to the model: