**6.7 Summary**

18 Will-be-set-by-IN-TECH

(iii) *CurrentTime* is set to 0, and (iv) *Earliesttime* is set to the earliest time among the heads of

<sup>56</sup> <sup>4</sup> <sup>5</sup> <sup>2</sup><sup>n</sup> system queue -1 <sup>10</sup>

27 3

<sup>23</sup> <sup>2</sup>n-1 <sup>34</sup>

**Legend:** event head of an active queue which is decrementd

The behavior of a RELTEQ tick handler supporting servers is summarized in Figure 10.

Fig. 10. Pseudocode for the RELTEQ tick handler supporting hierarchical scheduling.

Note that at any moment in time there are at most four active queues, as shown in Figure 9.

dummy event head of an active queue which is incremented

3

37 4

Fig. 9. Example of the RELTEQ queues managed by the tick handler.

*Head*(*q*).*time* := *Head*(*q*).*time* − *CurrentTime*;

<sup>27</sup> <sup>5</sup> <sup>101</sup> active

<sup>17</sup> <sup>21</sup> active

<sup>7</sup> <sup>2</sup><sup>n</sup> stopwatch queue -1

all active queues3.

inactive server queues & virtual server queus

*IncrementQueue*(*stopwatch*); *CurrentTime* := *CurrentTime* + 1; **if** *Earliesttime* = *CurrentTime* **then for all** *q* ∈ *activequeues* **do**

*PopEvent*(*q*);

**end while**

*CurrentTime* := 0;

**end for**

**end if**

*Schedule*();

**while** *Head*(*q*).*time* = 0 **do** *HandleEvent*(*Head*(*q*));

*Earliesttime* := *Earliest*(*activequeues*);

<sup>3</sup> Note that the *time* of any event will never become negative.

server queue

virtual server queue

We have described a generic framework for supporting servers, which is tick based (Section 4.3) and limits the interference of inactive servers on system level (Section 6.2). The interference of inactive servers which are either ready or depleted was limited by means of a combination of inactive server queues and a stopwatch queue. Deactivating server queues of waiting servers was made possible by inserting a wakeup event into the system queue, in order to wake up the server upon the arrival of a periodic task while the server is switched out.
