Static-priority scheduling of multiframe tasks - Semantic Scholar

8 downloads 0 Views 227KB Size Report
is a generalization of the model of Liu and Layland, since any Liu and Layland task can be represented as a MF task in which the dimension of the execution-.
Sanjoy Baruah, Deji Chen, and Aloysius Mok. Static-priority scheduling of multiframe tasks. Proceedings of the EuroMicro Conference on Real-Time Systems, pp 38-45, York, UK. June 1999. IEEE Computer Society Press.

Static-priority scheduling of multiframe tasks Sanjoy K. Baruah

The University of Vermont

Abstract The multiframe model of hard-real-time tasks is a generalization of the well-known periodic task model of Liu and Layland (Scheduling algorithms for multiprogramming in a hard real-time environment. Journal of the ACM 20(1), pp. 46{61. 1973 ). The feasibility analysis of systems of multiframe tasks which are assigned priorities according to the rate-monotonic priority assignment scheme is studied. An ecient suf cient feasibility test for such systems of multiframe tasks is presented and proved correct | this generalizes a result of Mok and Chen (A multiframe model for real-time tasks. IEEE Transactions on Software Engineering 23(10), pp. 635{645. 1997 ).

Keywords: Hard-real-time scheduling; multiframe

tasks; static priorities; rate-monotonic; feasibility determination.

1 Introduction The multiframe (MF) task model for hard-real-time tasks was introduced by Mok and Chen [10, 11] as a generalization to the well-known periodic task model of Liu and Layland [9], to better model applications in which jobs are generated periodically, but the execution requirements of jobs vary greatly from one instance to another with the variation following a regular pattern. This variation is captured by specifying the execution requirement not as a single (worstcase) number as in the model of Liu and Layland, but as a nite list of numbers from which the execution requirements of successive jobs are obtained by repeating this list ad in nitum. More formally, a  This work has been supported in part by the National Science Foundation (Grant Nos. CCR-9704206 and CDA-9720676.)

Deji Chen

Aloysius Mok

The University of Texas at Austin

task T = ((e(0); e(1); : : : ; e(N ;1)); p) in the MF model

is characterized by a vector of execution requirements (e(0) ; e(1) ; : : : ; e(N ;1) ) and a minimum separation p, and generates an in nite sequence of jobs (or frames) Jo ; J1 ; J2 ; : : :. Each job Ji is characterized by three attributes: an arrival time a(Ji ), an execution requirement e(Ji ), and a deadline d(Ji ), with the interpretation that it must execute for e(Ji ) time units during the interval [a(Ji ); d(Ji )]. The attributes of the jobs are further restricted as follows:

arrival times: a(Jo)  0; a(Ji+1 ) ; a(Ji )  p for all i  0; i.e., the rst job of the task can

arrive at any time, and successive arrivals must be separated by at least the speci ed minimum separation of the task.

execution requirements: e(Ji ) = e(i mod N ) for all i  0; i.e., the execution requirement of the

rst job is e(0) , and the execution requirements of subsequent jobs are obtained by cycling through the vector of execution requirements in order.

deadlines: d(Ji ) = a(Ji )+p for all i  0; i.e., each

job of the task has a deadline which is exactly the minimum-separations parameter after its arrival time.

In the Liu and Layland model [9] of periodic tasks, each task is characterized by a single execution-requirement and a minimum separation (also often known as the period of the task); it is easy to see that the MF model is a generalization of the model of Liu and Layland, since any Liu and Layland task can be represented as a MF task in which the dimension of the executionrequirements vector is one. (An additional issue to consider is: does the multiframe model actually buy us any added expressive power, or is it simply an alternative representation of

task systems which can be equally conveniently modelled using earlier models (e.g., the periodic model of Leung and Merrill [8])? We believe that the MF model is suciently di erent from earlier models to merit independent study: however, this issue is somewhat orthogonal to the remainder of this document, and further discussions on it are relegated to the appendix.) x1.

Dynamic and static priorities. Run-time scheduling is the process of determining, during the execution of a real-time application system, which job should be executed on the shared processor at each instant in time. Run-time scheduling algorithms are typically implemented as follows: at each time instant, assign a priority to each active1 job, and allocate the processor to the highest-priority job. With respect to certain run-time scheduling algorithms, it is possible that some tasks T and T^ both have active jobs at times t1 and t2 such that at time t1 , T 's job has higher priority than T^'s while at time t2 , T^'s job has higher priority than T 's. Scheduling algorithms that permit such \switching" of priorities between tasks are known as dynamic priority schedulers. An example of a dynamic-priority run-time scheduling algorithm is the earliest deadline rst scheduling algorithm (EDF) [9, 3], which at each instant in time executes the currently active job with the earliest deadline. It has been shown [3] that EDF is an optimal uniprocessor dynamic-priority run-time scheduling algorithm, in the sense that if it is possible to schedule a set of jobs such that they all complete by their deadlines, then EDF is guaranteed to do so. By contrast, static priority schedulers satisfy the property that for every pair of tasks T and T^, whenever T and T^ both have active jobs, it is always the case that the same task's jobs have priority. An example of a static-priority scheduling algorithm is the ratemonotonic scheduling algorithm [9] for systems of sporadic tasks in which all jobs have their deadline equal to their period. In such task systems, the rate-monotonic scheduling algorithm assigns each task a priority inversely proportional to its period { the smaller the period, the higher the priority, with ties broken arbitrarily but in a consistent manner: if T and T^ have equal periods and T 's job is given priority over T^'s job once, Informally, a job becomes active at its ready time, and remains so until it has executed for an amount of time equal to its execution requirement, or until its deadline has elapsed. 1

then all of T 's jobs are given priority over T^'s jobs. x2.

Static-priority feasibility-analysis. A hardreal-time task system is de ned to be static-priority feasible if it can be scheduled by a static-priority runtime scheduler in such a manner that all jobs will always complete by their deadlines. Given the speci cations for a system of hard-real-time tasks, staticpriority feasibility analysis is the process of determining whether the system is static-priority feasible. Static-priority feasibility analysis comes in two

avours: The priority testing problem: Given a system of hard-real-time tasks, and an assignment of (unique) priorities to these tasks , can the system be scheduled by a static-priority run-time scheduler such that all jobs will always complete by their deadlines? The priority determination problem: Given a system of hard-real-time tasks, does there exist an assignment of (unique) priorities to these tasks satisfying the property that the system, with this priority-assignment, can be scheduled by a staticpriority run-time scheduler such that all jobs will always complete by their deadlines? (From a practical perspective, it is useful to be able to actually produce such a priority assignment, if one exists.) For a system of n tasks, the priority determination problem can be solved by solving at most n! priority testing problems (where n! denotes the product n  (n ; 1)  (n ; 2)    2  1) | simply try out all n! possible priority assignments to the n tasks. However, n! grows too fast with increasing n for such an approach to yield a computationally tractable reduction from priority determination to priority testing. Current research on priority determination has thus been concentrated upon trimming the search space of possible priority assignments that need to be tested. In particular, an optimal priority assignment for a system of hard real-time tasks is de ned to be a priority assignment such that, if any priority assignment will cause the system to be feasible in the priority-testing sense, then this particular priority assignment will do so. If an optimal priority assignment can be easily found for a particular task model, then the priority determination problem reduces to the priority testing problem in that model.

x3.

Previous research. Liu & Layland [9] have shown that the rate-monotonic priority assignment scheme, which assigns tasks priorities in inverse proportion to their minimum-separations parameter, is optimal in the above sense for a system of Liu and Layland tasks. Thus, static-priority feasibility analysis for a system of such tasks reduces to determining whether any deadlines are missed when tasks are assigned priorities in inverse proportion to their periods. It was shown [9] that a sucient condition for this (and hence, a sucient test for feasibility) is that the densities2 of all the tasks in the system sum to no more than n(21=n ; 1), where n denotes the number of tasks in the system. A necessary and sucient feasibility test was subsequently proposed by Lehoczky, Sha, and Ding [7]. These results have since been generalized in various directions (see, e.g., [2] for a survey), and indeed form the basis of the popular rate-monotonic analysis methodology [6] for the design of hard-real-time systems. The static-priority scheduling of systems of MF tasks has also been studied. Mok and Chen [10] proved that the rate-monotonic priority assignment is optimal for systems of MF tasks in which each task satis es an additional property called the accumulatively monotonic (AM) property. They obtained a sucient feasibility test, somewhat similar to the density-based test in [9], for such tasks; this test was subsequently improved by Han [4]. In [11], Mok and Chen de ned a transformation from an arbitrary MF task T to an MF task T 0 satisfying the AM property, and proved that a system of arbitrary MF tasks fT g is feasible under the rate-monotonic priority assignment if the system of tasks fT 0g, obtained by transforming each task in fT g, is feasible. In conjunction with the sucient feasibility tests in [10, 4], this result yields a sucient feasibility test for systems of arbitrary MF tasks. This research extends the research in Mok and Chen [11], and derives (and proves correct) a more accurate sucient feasibility test for systems of arbitrary MF tasks. This test is more accurate than the one in [11] in the sense that it is far less likely to reject feasible systems as being infeasible than the previous test; however, it is not \density-based," and executes in time pseudo-polynomial in the representation of the task system (the Mok and Chen test, by contrast, has a polynomial runtime complexity). 2 The density of a Liu and Layland task is de ned to be the ratio of its execution-requirement to its minimum separation.

2 Some properties of systems of MF tasks In this section we will prove some properties of MF task systems which will form the basis of our feasibilityanalysis algorithm in Section 3. We start with some de nitions. Consider an MF task T = ((e(0) ; e(1) ; : : : ; e(N ;1) ); p).  Let g(T; i) denote the maximum cumulative execution requirement of any i successive jobs of task T . For 1  i  N , g (T; i) is easily computed from the execution-requirements vector of T : g (T; i)

8 i;1 N , observe that any N successive jobs of T must have a cumulative execution requirement equal to g(T; N ) (note that this is equal to the sum of the N components of the executionrequirements vector). Hence if i = N  q + r where q and r are non-negative integers and 0  r < N , g (T; i)

=



q g (T; N ) + g (T; r) :

(2)

 Next, we de ne a function G(T; t) for

t = 0; 1; 2; : : :, that measures the maximum cumulative execution requirement that can be requested by jobs of T over an interval of length t (it is not required that all this execution requirement be of jobs that have deadlines within the interval). The function G(T; t) can be computed as follows: G(T; t)

=

g (T;

  t p

):

(3)

 With respect to MF task T , we will sometimes re-

fer to a job of T with execution requirement equal to g(T; 1) as a \peak job of T ;" the deadline of such a job will then be referred to as a \peak deadline of T ." For the remainder of this section, we will consider a system  = fT1; T2 ; : : : ; Tn g of MF tasks that are to be preemptively scheduled on a single processor, using static-priority scheduling. We will suppose that the tasks in  have been assigned (unique) priorities, and let hp(Ti ) denote the tasks in  that have been assigned priorities greater than the priority of Ti .

Lemma 1 For Ti to meet its peak deadline, it is suf cient that the following inequality hold: X

9 to  pi such that [

hp(T )

Tj 2

G(Tj ; to )]+g (Ti ; 1)

i



to

(4)

Proof Sketch: The proof that Inequality 4 is suf-

cient for Ti to always meet its peak deadline hinges upon the observation that the \worst case" scenario | the one that makes it most likely that Ti 's peak job will miss its deadline | occurs when Ti 's peak job arrives simultaneously with jobs of all tasks in hp(Ti ). This observation is proved in a manner virtually identical to the manner in which similar \critical-instant" results have been proved in, e.g. [9, 11], and we will not repeat it here.

Lemma 2 Assume that Ti can always meet any (k ; 1) consecutive deadlines. For Ti to always meet any k consecutive deadlines, it is sucient that the following inequality hold:

9 t1  kpi such that [

X

hp(T )

Tj 2

i

G(Tj ; t1 )]+g (Ti ; k )



t1

(5)

Proof Sketch:

The proof of this lemma is identical to the proof of Lemma 1 (indeed, Lemma 1 is a special case of this lemma, and has been presented separately for ease of exposition.) The sole di erence is that, rather than considering the peak job, we consider the sequence of k jobs whose total execution requirement de nes the value g(Ti ; k); for these k jobs, we consider only the problem of meeting the deadline of the k'th job, since by assumption the deadlines of the earlier jobs will have been met, and assume that this k'th job completes at time t1 . (Note that, if Ti 's k 'th job is to miss its deadline, it is not possible that there be any idle time in the schedule over [0; t1) | the presence of such gaps in the schedule could be used to construct a scenario in which Ti fails to complete its `'th job for some ` < k , thus contradicting the assumption that Ti can always meet any (k ; 1) consecutive deadlines.)

Theorem 1

Ti can always meet all deadlines if it satis es Inequality 4.

Proof:

We will show that if Ti always meets its peak deadline then Ti always meets all its deadlines.

The theorem would then follow as a consequence of Lemma 1. First, we claim that for any integer `  1 `  G(Ti ; to )  G(Ti ; `  to ) ; (6) l

m

l

m

since G(Ti ; `  to ) = g(Ti ; `pt )  g(Ti ; `  pt )  l m `  g (Ti ; pt ) = `  G(Ti ; to ). Since Ti satis es Inequality 4, there is some to  pi such that X [ G(Tj ; to )] + g (Ti ; 1)  to (7) T 2hp(T ) We will now prove that Ti will always meet k consecutive deadlines, for arbitrary k. Our proof is by induction: we assume that Ti always meets (k ; 1) consecutive deadlines, and prove that Ti will therefore always meet k consecutive deadlines. To do so, we will make use of Lemma 2. Let t1 def = k  to . Since to  pi , it follows that t1 = k  to  k  pi . X [ G(Tj ; t1 )] + g (Ti ; k ) T 2hp(T ) X = [ G(Tj ; k  to )] + g (Ti ; k ) T 2hp(T ) X  [ k  G(Tj ; to )] + g (Ti ; k ) (by Inequality 6) T 2hp(T ) X  [ k  G(Tj ; to )] + k  g (Ti ; 1) T 2hp(T ) (By de nition of the function g(T; `)) X = k  ([ G(Tj ; to )] + g (Ti ; 1)) T 2hp(T )  k  to (by Inequality 7) = t1 Thus, we have shown that, for t1 = k  to , X [ G(Tj ; t1 )] + g (Ti ; k )  t1 ; T 2hp(T ) by Lemma 2, this is sucient for Ti to always meet k consecutive deadlines. By Theorem 1 to ensure that a system of MF tasks can always meet all deadlines under a given priority assignment, it suces to ensure that each task can always meet the deadline of its peak job when this peak job arrives simultaneously with jobs of all higher-priority tasks in the system. o i

j

j

i

i

j

i

j

i

j

i

j

j

i

i

o i

o i

Theorem 2 If a system of MF tasks satis es Inequality 4 for all tasks under any priority assignment, then the system of MF tasks satis es Inequality 4 for all tasks when priorities are assigned to the tasks according to the rate-monotonic priority assignment scheme.

Proof: Consider any priority assignment for a system

of MF tasks in which all the tasks satisfy Inequality 4. Consider two tasks Ti and Tj with adjacent priorities, such that Ti has the higher priority but pi > pj . Now consider the priority assignment obtained from this priority assignment by swapping the priorities of tasks Ti and Tj ; observe that Inequality 4 continues to hold for both Ti and Tj in this new priority assignment. It therefore follows that this priority assignment is also a feasible one. By repeated applications of such priority-swappings, we can obtain the rate-monotonic priority assignment from the original priority assignment; since each priority-swap preserves the property of satisfying Inequality 4, the rate-monotonic priority assignment also satis es Inequality 4.

3 A sucient feasibility-analysis algorithm In this section, we will consider a system  = fT1; T2 ; : : : ; Tn g of MF tasks that are to be preemptively scheduled on a single processor, using staticpriority scheduling. Our goal is to determine whether  can be so scheduled such that no job of  will ever miss a deadline under any circumstances whatsoever.

/* D is an N  N integer array. The following piece of Pi+j (` mod N ) code sets D[i][j ] to `=i e . */ for j = 0; j < N ; j + +) D[0][j ] = e(j) for (i = 1; i < N ; i + +) for (j = 0; j < N ; j + +) D[i][j ] = D[i ; 1][j ] + e((i+j ) mod N ) /* The i'th row of the array D now contains the sums of all possible sequences of (i + 1) consecutive jobs. The following piece of code determines the maximum of each row i | this is equal to g(T; i +1) | and stores this value in M [i + 1]. */ M [0]

=0 for (i = 1; i = D[i ; 1][j ])?M [i] : D[i ; 1][j ]

g

Figure 1. Computing the array M .

for any integer i and any integer t: g (T; `) G(T; t)

= (` div N)  M [N ] + =

g (T;

t

p

M [`

mod N ]

)

3.2 The (sufficient) feasibility test

3.1 Preprocessing each task

Let T 2  ; T = ((e(0) ; e(1); : : : ; e(N ;1)); p). Recall from Section 2 that g(T; i) denotes the maximum cumulative execution requirement by i consecutive jobs of task T . We wish to rst compute g(T; i), 1  i  N , according to Equation 1. This can be done in a straightforward manner in O(N 2 ) time, as depicted in Figure 1. The pseudocode in Figure 1 computes the values of the function g(T; i) into an array M [0; : : : ; N ], storing g(T; i) in M [i], for each i, 1  i  N . (For convenience, M [0] is set to zero.) Once this array M has been determined, it follows from Equation 2 and Equation 3 that the functions g (T; i) and G(T; t) can be computed in constant time

Once every task Ti 2  has been preprocessed as described in Section 3.1, the functions g(Ti ; `) and G(Ti ; t) can be computed in constant time for all Ti and all t, `. We will now determine whether  will always meet all deadlines if the tasks are assigned priorities according to the rate-monotonic scheme. Therefore, assign priorities to the tasks in  according to their minimum separation parameters, with the task with smaller minimum separations having greater priority (ties broken arbitrarily). By Theorem 1, it is sucient to now determine whether each task Ti can always meet its peak deadline:

for (i = 0; i < N ; i + +) f if Ti cannot always meet its peak deadlinef the system is not feasible return

g

g

the system is feasible Lemma 1 suggests a method of testing whether Ti can always meet its peak deadline. Motivated by the response-time analysis method of Joseph and Pandya [5], we transform the problem of determining whether Inequality 4 holds to the problem of determining whether the equation to

= g(Ti ; 1) +

X

hp(T )

Tj 2

G(Tj ; to )

(8)

i

has a xpoint for to that is no larger than pi . And this can be determined using the iterative method proposed by Audsley et al. [1]: = g(Ti ; 1) for (; ; ) f P R0 = g (Ti ; 1) + T 2hp(T ) G(Tj ; R) if (R0 > p) fpeak deadline missed; returng if (R0 = R) fpeak deadline met; returng R = R0

R

j

i

g

4 An example Consider a system  of three MF tasks:  = fT1; T2 ; T3g. The parameters of the tasks are as follows:



T1

= ((3; 10; 2; 7; 8); 15),



T2

= ((4; 20; 6); 50), and



T3

= ((27; 50; 40; 31); 135).

We are to determine whether  is static-priority feasible.

Priority assignment. Since we are using the rate-

monotonic priority assignment, we assign highest priority to T1 , intermediate priority to T2 , and lowest priority to T3.

Preprocessing each task. As speci ed in Sec-

tion 3.1, we compute the \M " array for each of the three tasks using the algorithm in Figure 1. The \M " arrays computed are

Task T1: M [1-5] = [10; 15; 21; 28; 30] Task T2: M [1-3] = [20; 26; 30] Task T3: M [1-4] = [50; 90; 121; 148] The feasibility test. It now remains to determine

whether each task T1 , T2 , and T3 can always meet its peak deadline. Since T1 is the highest-priority task and its peak job has execution-requirement less than its minimum separation parameter, it follows that T1 's peak frame will always meet its deadline. To determine the response time of T2 's peak frame, we use the iterative method of Audsley et al. to compute the response time of T2's peak frame, and ensure that this response time does not exceed the peak deadline: R

=

R0 =

= = = = 0 R = = = = = 0 R = = = = =

g (T2 ; 1)

= 20 g (T2 ; 1) + G(T1 ; 20)   20 g (T2 ; 1) + g (T1 ; 15 ) g (T2 ; 1) + g (T1 ; 2) 20 + 15 35 g (T2 ; 1) + G(T1 ; 35)   35 ) g (T2 ; 1) + g (T1 ; 15 g (T2 ; 1) + g (T1 ; 3) 20 + 21 41 g (T2 ; 1) + G(T1 ; 41)   41 ) g (T2 ; 1) + g (T1 ; 15 g (T2 ; 1) + g (T1 ; 3) 20 + 21 41

Since the last two values computed for R0 are the same, it follows that the response-time of T2 's peak frame is

41. This is less than T2 's minimum separation parameter of 50; T2 therefore always meets its deadline as well. To determine the response time of T3 's peak frame, we again make use of the iterative method proposed by Audsley et al. to compute the response time of the peak frame, and ensure that this response time does not exceed the peak deadline: R

=

R0 =

= = = = 0 R = = = = = 0 R = = = = =

g (T3 ; 1)

= 50 g (T3 ; 1) + G(T1 ; 50) + G(T2 ; 50)     50 ) + g(T ; 50 ) g (T3 ; 1) + g (T1 ; 2 50 15 g (T3 ; 1) + g (T1 ; 4) + g (T2 ; 1) 50 + 28 + 20 98 g (T3 ; 1) + G(T1 ; 98) + G(T2 ; 98)     98 ) 98 g (T3 ; 1) + g (T1 ; ) + g (T2 ; 15 50 g (T3 ; 1) + g (T1 ; 7) + g (T2 ; 2) 50 + 45 + 26 121 g (T3 ; 1) + G(T1 ; 121) + G(T2 ; 121)     121 121 g (T3 ; 1) + g (T1 ; 15 ) + g(T2 ; 50 ) g (T3 ; 1) + g (T1 ; 9) + g (T2 ; 3) 50 + 58 + 30 138

The value of R0 has exceeded p3 without yet converging. Hence the response-time of T3 's peak frame is at least 138, which is greater than the minimum separation parameter of T3 . Therefore T3 's peak frame cannot guaranteed {by this test{ to always meet its deadline, and  may be infeasible as a result.

Conclusions The multiframe (MF) model for sporadic real-time tasks was introducted by Mok and Chen as a convenient abstraction for accurately modelling processes that generate sequences of jobs, with the execution requirements of these jobs varying greatly from job to job but according to a known pattern. Within the context of xed-priority preemptive uniprocessor scheduling, Mok and Chen showed that

the rate-monotonic priority assignment scheme is optimal for systems of MF tasks in which each task also satis es the accumultively monotonic (AM) property. Mok and Chen [10, 11] and Han [4] have obtained density-based sucient tests for determining whether a system of MF tasks is static-priority feasible on a single processor. In this paper we have presented (Section 3) a more accurate sucient test for static-priority feasibility-analysis of systems of MF tasks. However, our feasibility test is computationally less ecient than the test of Mok and Chen [11] | while the Mok and Chen executes in time polynomial in the representation of the task system, our test takes pseudo-polynomial time.

Acknowledgements We are grateful to John Lehoczky for assistance in identifying errors in an earlier version of this document.

References [1] N. C. Audsley, A. Burns, M. F. Richardson, and A. J. Wellings. Hard Real-Time Scheduling: The Deadline Monotonic Approach. In Proceedings 8th IEEE Workshop on Real-Time Operating Systems and Software, Atalanta, May 1991. [2] Alan Burns, Ken Tindell, and Andy Wellings. E ective analysis for engineering real-time xed priority schedulers. IEEE Transactions on Software Engineering, 21(5):475{480, May 1995. [3] M. Dertouzos. Control robotics : the procedural control of physical processors. In Proceedings of the IFIP Congress, pages 807{813, 1974. [4] Ching-Chih Han. A better polynomial-time schedulability test for real-time multiframe tasks. In Proceedings of the Nineteenth IEEE Real-Time Systems Symposium, Madrid, Spain, December 1998. IEEE Computer Society Press. [5] M. Joseph and P. Pandya. Finding response times in a real-time system. The Computer Journal, 29(5):390{ 395, October 1986. [6] Mark Klein, Thomas Ralya, Bill Pollak, Ray Obenza, and Michael Gonzalez Harbour. A Practitioner's Handbook for Real-Time Analysis: Guide to Rate Monotonic Analysis for Real-Time Systems. Kluwer Academic Publishers, Boston, 1993. [7] J. Lehoczky, L. Sha, and Y. Ding. The rate monotonic scheduling algorithm: Exact characterization and average case behavior. In Proceedings of the Real-Time

[8] [9] [10]

[11]

Systems Symposium - 1989, pages 166{171, Santa Monica, California, USA, December 1989. IEEE Computer Society Press. J. Leung and M. Merrill. A note on the preemptive scheduling of periodic, real-time tasks. Information Processing Letters, 11:115{118, 1980. C. Liu and J. Layland. Scheduling algorithms for multiprogramming in a hard real-time environment. Journal of the ACM, 20(1):46{61, 1973. Aloysius K. Mok and Deji Chen. A multiframe model for real-time tasks. In Proceedings of the 17th RealTime Systems Symposium, Washington, DC, 1996. IEEE Computer Society Press. Aloysius K. Mok and Deji Chen. A multiframe model for real-time tasks. IEEE Transactions on Software Engineering, 23(10):635{645, October 1997.

Appendix: The expressiveness of the MF model A natural question to ask may be: does the multiframe model actually buy us any added expressive power, or is it simply an alternative representation of task systems which can be equally conveniently modelled using, e.g., the four-parameter periodic model of Leung and Merrill [8]? We believe that the MF model is suciently di erent from the four-parameter periodic model of [8] to merit independent study | below, we make some attempts to transform feasibility-analysis of systems of MF tasks to a feasibility-analysis problem in the periodic task model, and show how these attempts lead to failure. In the four-parameter periodic model, a periodic task is characterized by four parameters: (a; e; d; p), with the interpretation that the task generates a job at time a + k  p for all integer k  0, and that each such job has an execution requirement of e, and a deadline d time units after its arrival time. As a rst attempt towards transforming the feasibility question for systems of MF tasks to feasibility in systems of (four-parameter) periodic tasks, we may attempt to transform an MF task Ti = (1) (n ) ((e(0) i ; ei ; : : : ; ei ; ); pi ) into ni four-parameter periodic tasks (0; e(0) (pi ; e(1) i ; pi ; ni pi ), i ; pi ; ni pi ), (n1 ;1) ; p ; n p ). (2pi ; e(2) ; p ; n p ), : : : , (( n ; 1) p ; e i i i 1 i i i i i i i

Thus for example the MF system  = fT1 = ((1; 4); 5); T2 = ((4; 1); 5)g would get transformed into the periodic task system  0 = f(0; 1; 5; 10); (5; 4; 5; 10)(0; 4; 5; 10); (5; 1; 5; 10)g, with the rst two periodic tasks being derived from T1 and the next two from T2 . However, this transformation does not lead to a necessary and sucient test for feasibility of a system of MF tasks | observe that while  0 above is feasible,  is not (to see that  is infeasible, note that if the rst job of T1 arrives simultaneously with the second job of T2 , then a total of 8 time units of execution will be required within the next 5 time units). However, if we had instead transformed T1 into the periodic tasks (0; 4; 5; 10) and (5; 1; 5; 10), then the periodic system obtained would have been infeasible. Motivated by this observation, we could try di erent \orderings" of periodic tasks to which each MF task is transformed, and consider the MF system feasible only if all these periodic task systems are feasible ; however, such an approach would rapidly result in combinatorial explosion and we would end up transforming each MF task system to an exponential number of periodic task systems that need to be tested. As another attempt towards transforming the feasibility question for systems of MF tasks to feasibility in systems of periodic tasks, we may at(1) tempt to transform an MF task Ti = ((e(0) i ; ei ; (n ;1) ; ); p ) into n four-parameter periodic tasks : : : ; ei i i (0) (1) (0; ei ; pi ; ni pi ), (0; ei ; 2pi ; ni pi ), (0; e(2) i ; 3pi ; ni pi ), (n ;1) ; n p ; n p ). : : :, (0; ei 1 Under this transfori i i i mation, the MF task system  above would be transformed to the periodic task system  00 = f(0; 1; 5; 10); (0; 4; 10; 10)(0; 4; 5; 10); (0; 1; 10; 10)g, with the rst two periodic tasks being derived from T1 and the next two from T2 . However, it is not dif cult to see that such a transformation, too, does not lead to a necessary and sucient test for feasibility of a system of MF tasks; once again,  00 is feasible while (as we have seen above)  isn't. While the above discussion is by no means a formal argument or a formal proof, we believe it provides strong evidence that the MF model is not equivalent in any straightforward manner to more traditional task models, in the sense that there are task systems that can be succintly represented in the MF model that are not conveniently representable in other models. i

Suggest Documents