Fixed-Priority Preemptive Scheduling Semantics of AADL in UPPAAL Timed Automata

The scheduling automaton providing the required thread execution semantics is shown in Figure 1. The labels of the scheduling automaton are defined as follows: – (int)ready queue[x]: is a sorted queue of currently dispatched threads. The queue is sorted according to a given scheduling policy where the first element in the queue (x=0) is the (identifier of the) thread being processed and where the second element is the next thread to be processed, and so forth. – (clock)sch clocks[x][2]: is a list of clocks in sets of two, each set referenced by an identifier x of a currently dispatched thread. Each dispatched thread has two clocks, the first (sch clocks[x][0] of thread with identifier x) is used to keep track of a thread's execution time, and the second (sch clocks[x][1] of thread with identifier x) is used to keep track of a thread's deadline. – (int)sch info[x][3]: is a list of threads' scheduling properties (integers) in sets of three, each set referenced by an identifier x of a currently dispatched thread. Each dispatched thread has three scheduling properties, the first (sch info[x][0] of thread with identifier x) is the execution time, the second (sch info[x][1] of thread with identifier x) is the deadline, and the third (sch info[x][2] of thread with identifier x) is the priority. Note that the required properties are related to a given scheduling policy. For example, we consider priorities of threads since we assume a fixed priority scheduler in this particular example. – (int)preempt stack[x][2]: is a stack of sets of currently preempted threads (integer identifiers) and the amount time each thread has been preempted. Given a stack of preempted threads, the first set of elements in the stack (preempt stack[0][0] is the thread identifier and preempt stack[0][1] is the amount of time) corresponds to the thread that first was preempted. – (int)nr preempted: number of currently preempted threads. – (int)threads: number of currently dispatched threads. – (int)check preempt: holds the identity of a thread that is dispatched at the same time as another thread is running. It is used to check if the dispatched thread preempts the running thread. – (chan)dispatched[(int)x],(chan)run[(int)x], (chan)complete[(int)x],(chan)preempt[(int)x]: are channels used to synchronize every thread transition of every thread in the system. Synchronization