84 while still keep fairness or user satisfaction among programs. For example, for the CPU intensive tasks, they need larger time slices for I/O intensive tasks, the time slice can be smaller. Using our TOPS's, there is no context switching for real-time tasks until a timer event is raised. The time slice is between a task is run or resumed until it is preempted or nishes. Moreover, the size of time slice can also be changed dynamically for non-real-time tasks.
Mixed Scheduling Policies:
We can also reserve CPU bandwidth for dierent scheduling policies so that mixed scheduling policy is possible. For individual policies, the schedulability is tested using the allocated utilization. For example, if the
EDF
scheduling policy is allocated with execution time 1 and distance constraint 2, the tasks usingEDF
are schedulable if the utilization is less than 0.5. Each task can only execute in the time reserved for its policy. The overall schedulability test can be done by testing individual schedula-bility of each policy with its allocated utilization. Its proof of correctness is also an interesting topic.real-time system. No matter how simple or complicated, the truly real-real-time system is a system we can dene and it will guarantee how "real-time" we want. We believe "time-driven" is an important technique to truly real-time. Therefore, we also believe that the time-driven pinwheel scheduling is a step in the right direction.
Bibliography
1] Riccardo Bettati. End-to-End Scheduling to Meet Deadlines in Distributed Systems.
PhD dissertation, technical report UIUCDCS-R-94-1840, University of Illinois at Urbana-Champaign, August 1994.
2] A. Burns. Scheduling hard real-time systems. Software Engineering journal, 6(3):116{
128, 1991.
3] M. Y. Chan and Francis Chin. General schedulers for the pinwheel problem based on double-integer reduction. IEEE Transactions on Computers, 41(6):755{768, June 1992.
4] M. Y. Chan and Francis Chin. Schedulers for larger classes of pinwheel instances.
Algorithmica, 9:425{462, 1993.
5] S. K. Dhall and C. L. Liu. On a real-time scheduling problem. Operations Research, 26:127{140, 1978.
6] B. Furht. Multimedia systems: An overview. IEEE Multimedia, pages 47{59, Spring 1994.
7] Rhan Ha and Jane W. S. Liu. Validating timing constraints in multiprocessor and distributed real-time systems. In Proceedings of the 14th IEEE Int. Conference on Distributed Computing Systems, June 1994.
8] Ching-Chih Han, Chao-Ju Hou, and Kang G. Shin. On slot allocation for time-constrained messages in DQDB networks. In Proc. of IEEE INFOCOM'95, pages 1164{1171, Boston, Massachusetts, April 1995.
86
9] Ching-Chih Han and Kwei-Jay Lin. Scheduling distance-constrained real-time tasks.
In Proc. IEEE Real-Time Systems Symposium, pages 300{308, December 1992.
10] Ching-Chih Han and Kwei-Jay Lin. Scheduling real-time computations with separation constraints. Information Processing Letters, 42, May 1992.
11] Ching-Chih Han, Kwei-Jay Lin, and Chao-Ju Hou. Distance-constrained scheduling and its applications to real-time systems. IEEE Transactions on Computers, 45(7):814{
826, July 1996.
12] Ching-Chih Han, Kwei-Jay Lin, and Jane W.-S. Liu. Scheduling jobs with temporal distance constraints. SIAM J. Computing, 24:1104{1121, October 1995.
13] Ching-Chih Han and K. G. Shin. Real-time communication in FieldBus multiaccess network. In Proc. IEEE Real-Time Technology and Applications Symposium, pages 86{95, Chicago, May 1995.
14] Ching-Chih Han and Kang G. Shin. A polynomial time optimal synchronous band-width allocation for the time-token mac protocol. In Proc. of IEEE INFOCOM'95, Boston, Massachusetts, April 1995.
15] R. Holte, A. Mok, L. Rosier, I. Tulchinsky, and D. Varvel. The pinwheel: A real-time scheduling problem. In Proc. of the 22nd Hawaii International Conference on System Science, pages 693{702, January 1989.
16] R. Holte, L. Rosier, I. Tulchinsky, and D. Varvel. Pinwheel scheduling with two distinct numbers. Theoretical Computer Science, 100:105{135, June 1992.
17] Chao-Ju Hou and Kar Shun Tsoi. Dynamic real-time channel setup and tear-down in DQDB networks. In Proc. IEEE Real-Time Systems Symposium, pages 232{241, Pisa, Italy, December 1995.
18] Chih-wen Hsueh and Kwei-Jay Lin. Optimal pinwheel scheduling algorithms based on single-number reduction. Submitted to IEEE Transactions on Computers.
88
19] Chih-wen Hsueh and Kwei-Jay Lin. Scheduling real-time systems with end-to-end tim-ing constraints ustim-ing the distributed pinwheel model. To appear in IEEE Transactions on Computers.
20] Chih-wen Hsueh and Kwei-Jay Lin. An optimal pinwheel scheduler using the single-number reduction technique. In Proc. IEEE Real-Time Systems Symposium, pages 196{205, Washington, DC, December 1996.
21] Chih-wen Hsueh and Kwei-Jay Lin. Schedulability comparisons among periodic and distance-constrained real-time schedulers. In Proc. of the 4th International Workshop on Real-Time Computer Systems Applications, Taipei, Taiwan, October 1997.
22] Chih-wen Hsueh, Kwei-Jay Lin, and Nong Fan. Distributed pinwheel scheduling with end-to-end timing constraints. In Proc. IEEE Real-Time Systems Symposium, pages 172{181, Pisa, Italy, December 1995.
23] Tai-Yi Huang, Jane W.-S. Liu, and David Hull. A method for bounding the eect of DMA I/O interference on program execution time. In Proc. IEEE Real-Time Systems Symposium, pages 275{285, Washington, DC, December 1996.
24] Kevin Jeay and David Bennett. A rate-based execution abstraction for multimedia computing. In Proc. the Fifth International Workshop on Network and Operating System Support for Digital Audio and Video, pages 64{75, Durham, NC, April 1995.
25] H. Kopetz. A solution to an automatic control system benchmark. In Proc. IEEE Real-Time Systems Symposium, pages 154{158, December 1994.
26] H. Kopetz and G. Grunsteidl. TTP{A protocol for fault-tolerant real-time systems.
IEEE Computer, pages 14{23, January 1994.
27] T.-W. Kuo and A. K. Mok. Load adjustment in adaptive real-time systems. In Proc.
IEEE 12th Real-Time Systems Symposium, December 1991.
28] J. P. Lehoczky, L. Sha, and Y. Ding. The rate monotonic scheduling algorithm: Exact characterization and average case behavior. In Proc. of the 10th IEEE Real-Time Systems Symposium, pages 166{171, Santa Monica, CA, December 1989.
29] D.W. Leinbaugh. Guaranteed response time in a hard real-time environment. IEEE Trans. Software Eng., January 1980.
30] J.Y.-T. Leung and J. Whitehead. On the complexity of xed priority scheduling of periodic, real-time tasks. Performance Evaluation, 2:237{250, 1982.
31] Kwei-Jay Lin. A synchronous scheduling model for distributed multimedia systems.
In Proc. 1996 Pacic Workshop on Distributed Multimedia Systems, Hong Kong, June 1996.
32] Kwei-Jay Lin and Ansgar Herkert. Jitter control in time-triggered systems. In Proc.
29th Hawaii Conference on System Sciences, Maui, Hawaii, January 1996.
33] S. S. Lin and Kwei-Jay Lin. Pinwheel scheduling with three distinct numbers. In Proc.
EuroMicro Workshop on Real-Time Systems, Vaesteraas, Sweden, June 1994.
34] C. L. Liu and J. Layland. Scheduling algorithms for multiprogramming in a hard real-time environment. Journal of the ACM, 10(1):46{61, 1973.
35] C.D. Locke. Software architecture for hard real-time applications: Cyclic executive vs.
xed priority executives. The Journal of Real-Time Systems, 4:37{ 53, 1992.
36] A. K. Mok. Fundamental Design problems of Distributed Systems for the Hard Real-Time Environment. PhD dissertation, Massachusetts Institute of Technology, Cam-bridge, MA, May 1983.
37] Abhay K. Parekh and Robert G. Gallager. A generalized processor sharing approach to ow control in integrated services networks: the multiple node case. IEEE/ACM Transactions on Networking, 2(2):137{150, April 1994.
90
38] S. Hong R. Gerber and M. Saksena. Guaranteeing end-to-end timing constraints by calibrating intermediate processes. In Proc. IEEE Real-Time Systems Symposium, pages 192{203, December 1994.
39] K. Ramamritham and J. A. Stankovic. Dynamic task scheduling in hard real-time distributed systems. IEEE Software, July 1984.
40] L. Sha, J. Lehoczky, and R. Rajkumar. Solutions for some practical problems in priori-tized preemptive scheduling. In Proc. of the 7th IEEE Real-Time Systems Symposium, pages 166{171, December 1986.
41] L. Sha, R. Rajkumar, and J.P. Lehoczky. Priority inheritance protocols: An ap-proach to real-time synchronization. IEEE Transactions on Computers, 39(9):1175{
1185, September 1990.
42] L. Sha and S.S. Sathaye. A systematic approach to designing distributed real-time systems. IEEE Computer, 26(9):68{78, September 1993.
43] John A. Stankovic. Misconceptions about real-time computing. IEEE Computer, October 1988.
44] Jun Sun, Riccardo Bettati, and Jane W.-S. Liu. An end-to-end approach to schedule tasks with shared resources in multiprocessor systems. In Proc. of the 11th IEEE Workshop on Real-Time Operating Systems and Software, Seattle, Washington, May 1994.
45] Too-Seng Tia. Utilizing Slack Time for Aperiodic and Sporadic Requests Scheduling in Real-Time Systems. PhD dissertation, University of Illinois at Urbana-Champaign, Urbana, Illinois, 1995.
46] J. Xu and D. L. Parnas. On satisfying timing constraints in hard real-time systems.
In Proc. of ACM SIGSOFT'91 Conference on Software for Critical Systems, pages 132{147, 1991.
47] J. Xu and D.L. Parnas. Scheduling processes with release times, deadlines, precedence, and exclusion constraints. IEEE Trans. Software Engineering, 16(3):360{369, March 1990.
48] W. Zhao, K. Ramamritham, and J. Stankovic. Scheduling tasks with resource require-ments in hard real-time systems. IEEE Trans. Software Engineering, 13(5):564{576, May 1987.
49] W. Zhao, K. Ramamritham, and J. A. Stankovic. Preemptive scheduling under time and resource constraints. IEEE Transactions on Computers, C-36(8):949{960, August 1987.
The Correctness of Sr
gIn this appendix we show that to nd an
r
inSr
gso that gT
(r
) = gT
= mincg1<r c1gT
(r
),we only need to compute g
T
(k
gv), for allk
gv in the special base ofT
.Let
gr =T
ijc
i =r g
j for some integerj
0 i.e. ther
-multiple subset ofT
on baseg
. It is obvious that for anyr
, there exists anr
0,c
1=g < r
0c
1, such that gr =rg0. W.l.o.g.,r
can be limited in (c
1=g c
1]. It is easy to see that gr 6= (hence, (gr) 6= 0) if and only ifr
=k
gv, for 1v
u
. Recall that whenC
!fgrgB
, everyc
i inC
is specialized to a numberb
i=r g
blogg(ci=r)c. Ifr
=l
gi (=c
i=g
dlogg(ci=c1)e), we can deriveb
i=c
i. That is, ifr
=l
gi,c
i will be specialized to itself, and hence, the density ofT
i will not increase after specialization. Therefore, ifr
=l
gi =k
gv, for somev
,gr is the set of tasks whose density will not increase afterC
!fgrgB
. To achieve the best schedulability, there must be at least one task whose density will not increase after specialization. So,r
can be chosen only from the special base fk
g1k
2g::: k
gugofT
(see Lemma A.1).Suppose
C
!fgrgB
. For convenience of discussion, letk
0g =c
1=g
. For a taskT
i 2kggv(i.e.,
c
i =k
gvg
j, for some 1v
u
andj
0), there are two possible cbii values due to the relationship betweenk
gv andr
:(a)
Ifr > k
gv, sincer=g < k
gv< r
, we haveb
i =r g
j;1 and cbii = gkrgv.(b)
Ifr
k
gv, sincer
k
gv< gr
, we haveb
i =r g
j and cbii = krgv.From (a) and (b), we know that, if
k
vg;1< r
k
gv, for somev
, 1v
u
, theng
T
(r
) =v;1
X
i=1
gk
gir
(kggi
) +Xu
i=v
k
gir
(kggi
)
:
(A.1)92
In the above, a summation with the higher limit smaller than the lower limit is dened to have a value of 0. For example, if
v
= 1 in Equation (A.1), gT
(r
) =Pui=1 krgi(
kggi).
Moreover, we can prove the following lemma.
Lemma A.1
kg Ifk
vg;1r < k
gv, for somev
, 1v
u
, andr
6=k
0g, then gT
(r
) =rvg
T
(k
gv);(g
;1)(
gr).
Proof: From Equation (A.1), we have, for
k
gv;1< r < k
gv,g
T
(r
) = v;1
X
i=1
gk
gir
(kggi
) +Xu
i=v
k
gir
(kggi
)
=
k
gvr
vX;1 i=1
gk
gik
gv (kggi
) +Xu
i=v
k
gik
gv(kggi
)
!
=
k
gvr
gT
(k
gv)Note that (
g
;1)(gr) = 0, fork
gv;1< r < k
gv. Forr
=k
gv;1, we haveg
T
(k
gv;1) = v;2
X
i=1
gk
igk
gv;1(kggi
) + Xu
i=v;1
k
gik
gv;1(kggi
)
= vX;1
i=1
gk
igk
gv;1(kggi
) +Xu
i=v
k
igk
vg;1(kggi
);(
g
;1)(kggv ;1
)
=
k
gvk
gv;1vX;1 i=1
gk
gik
gv (kggi
) +Xu
i=v
k
igk
gv(kggi
)
!
;(
g
;1)(kggv ;1
)
=
k
gvk
gv;1gT
(k
gv);(g
;1)(
kggv ;1)
2
Recall that
(gr) 6= 0 if and only ifr
=k
gv, for 1v
u
. Therefore, Lemma A.1 implies that gT
(r
)>
gT
(k
gv), for allr
,k
gv;1< r < k
gv. Thus, to nd anr
inSr
g so thatg
T
(r
) = gT
= minc1=g<r c1gT
(r
), we only need to compute gT
(k
gv), for allk
gv in thespecial base of
T
.Proofs of the Lemmas
Lemma B.1 k
vg+1gT
(k
gv+1);k
gvgT
(k
gv) = (g
;1)k
gv(
kgvg), for 1
v < u
.Proof: From Lemma A.1, for 1
v < u
, gT
(k
gv) = kgv +1kgv gT
(k
vg+1);(g
;1)(
kgvg).
Therefore,
k
gv+1gT
(k
vg+1);k
gvgT
(k
gv) = (g
;1)k
gv(
kggv). 2
Lemma B.2
LetT
2U
(d
) such that, for allT
0 2U
(d
), gT
0 gT
= g, and letf
k
g1k
2g::: k
gugbe the special base ofT
based ong
. It must be true that gT
(k
gi) = g, forall
k
gi, 1i
u
.Proof: The lemma is trivially true for
u
= 1. We prove the lemma foru >
1 by contra-diction. Suppose to the contrary that there exists ap
, 1p
u
, gT
(k
gp)>
g. We canshow that there exists a task set
T
0 with the same total density and the same special base asT
, but gT
0>
g. And this contradicts the denition ofT
. To show this, there are two cases to be considered:Case 1:
1< p
u
.Let's change the densities of
kggp andkggp;1
in
T
by changing the execution times of some of the tasks to create another task setT
0.(a)
kgpg is changed so that (kggp) is increased by = minf(gT
(k
gp) ;g)=
(g
;1) (1;"
)(kggp;1
)g, and
(b)
kggp;1
is changed so that
(kggp;1
) is decreased by
,where
"
is a small positive number. Note that (T
) = (T
0), henceT
0 2U
(d
). From Equation (A.1), we know that fork
gv;1< r
k
gv and 1v
u
, gT
(r
) =Pvi=1;1 gkrgi(
kgig)+
94
Pui=vkgi r
(kggi
). From denitions of g,
k
gp and , we know that fork
g0< r
k
gu, gT
(r
)g , for 1
p
u
,k
gp> k
gp;1, and gT
(k
gp);g(g
;1). Therefore, we have:
(i)
ifr
k
gp;1, then gT
0(r
);g gT
0(r
);gT
(r
) =(
k
gp;k
gp;1)=r >
0, i.e., gT
0(r
)>
g
(ii)
ifr
=k
gp, then gT
0(k
gp);g = (gT
0(k
gp);gT
(k
gp)) + (gT
(k
gp) ;g) (1;gk
gp;1=k
gp)+ (g
;1)>
0, i.e., gT
0(r
)>
g(iii)
ifr > k
gp, then gT
0(r
);g gT
0(r
);gT
(r
) =g
(k
gp;k
pg;1)=r >
0, i.e., gT
0(r
)>
g.
So, g
T
0>
gT
, which contradicts the denition ofT
in the lemma.Case 2: p
= 1.In this case, we change the densities of
kgg1
and
kggu to create task setT
0.(a)
kgg1
is changed so that
(kgg1
) is increased by
= minf(gT
(k
1g) ;g)=
(g
;1) (1;"
)(kggu)g, and(b)
kggu is changed so that(kgug) is decreased by .Again, we have
(T
) = (T
0), henceT
0 2U
(d
), and from denition,k
g1> c
1=g
=k
gu=g
. Therefore, we have:(i)
ifr
=k
g1, then gT
0(k
1g);g= (gT
0(k
g1);gT
(k
g1))+(gT
(k
g1);g)(1;k
gu=k
1g)+
(
g
;1)>
0, i.e., gT
0(r
)>
g(ii)
ifr > k
g1, then gT
0(r
);g gT
0(r
);gT
(r
) =(
bk
g1;k
gu)=r >
0, i.e., gT
0(r
)>
g.So, again, g
T
0>
gT
, which contradicts the denition ofT
in the lemma. 2Lemma B.3
Ifk
gv;1< r < r
0k
gv, for somev
, 1v
u
, then gT
(r
)>
gT
(r
0).Proof: From denition of
(gr), ifr
6=k
gv, for somev
,(gr) = 0. Thus, from Lemma A.1, ifk
vg;1< r < k
gv, for anyv
, 1v
u
, gT
(r
) = krgvgT
(k
gv).Therefore, according to Lemma A.1, if
k
gv;1< r < r
0k
gv, for somev
, 1v
u
, theng
T
(r
)>
gT
(r
0). 2Denitions and Algorithms of SLINE Operations
In this appendix, we present the detailed denitions and algorithms of SLINE operations.
h
j is the relative phase on nodesN
j andN
j+1 as dened in Section 4.3.1. Each SLINEW
corresponds to a serrated line functionW
(h
j) dened in X-domain 0w
). In our algorithms, we repeatedly reduce the domain size of a serrated line but keep the minimum value of drop point. To keep track of the originalh
j value, each point in our representation has two domains: the current domain and the original domain.The current domain is the X-domain of the serrated line function
W
represents. The original domain is the original X-domain of each point before any CUT operation. All points used in our discussion are in the current domain unless we specify explicitly. Sometimes, we uset
as a shorthand ofh
j.Denition: An SLINE
W
=fs w
(x y
) fd
1d
2:::
ggwhere1.
s
is the slope, which is the slope of the line segments of the serrated line it represents2.
w
is the width, or the current domain size3. (
x y
) is the origin, wherex
is in the original domain4. The last eld is a set of drop points. Each drop point
d
i has three elds, (p a p
0)p
is the X-coordinate of the drop point in the current domain,a
is the drop amount of the value at the drop point, andp
0 is the X-coordinate of the drop point in the original domain. The drop points are sorted in increasing order onp
.96
5.
W
(t
) returns the value ofW
att
.6.
W
0(t
) returns the X-coordinate in the original domain ofW
att
.2
Given a
W
(t
) and aW
0(t
), we can dene aW
. SupposeF
1::: F
u are delay functions oft
with periodw
. From the denition of delay function in Equation (4.3), they are serrated line functions and have slope equal to 1.Denition: Three operations are dened for SLINE: SUM, MAX and CUT.
1. SUMf
W
g=W
and MAXfW
g=W
.2. SUMf
W F
1::: F
ug is an SLINE,S
, whereS
(t
) =W
(t
) +F
1(W
0(t
))+F
2(W
0(t
)) +:::
+F
u(W
0(t
)) andS
0(t
) =W
0(t
),8t
20w
).3. MAXf
W F
1::: F
ug is an SLINE,S
, whereS
(t
) = maxfW
(t
)F
1(W
0(t
))F
2(W
0(t
))::: F
u(W
0(t
))gandS
0(t
) =W
0(t
), 8t
20w
).4. Let
u
=w=E
k,E
kw
!, andV
Ek(t
) is a function oft
to a set ofu
values, whereV
Ek(t
) =f
t
0jt
0=t
+ (v
;1)E
k 1v
u
g 8t
20E
k)CUTf
W E
kg is an SLINE,S
, whereS
(t
) = minfW
(v
) jv
2V
Ek(t
)g andS
0(t
) = minfW
0(v
)jW
(v
) =S
(t
)g 8t
20E
k).2
Suppose
S
is an SLINE withv
drop points and widthE
k, and there areu
periodic delay functions,F
1::: F
u, with the same periodE
k. Because the period ofF
i isE
k for everyF
i, there is ap
i 20E
k) s.t.F
i(p
i) = 0. W.l.o.g. suppose thep
i's are in increasing order.From the denition of SLINE,
d
iare sorted ond
i:p
in increasing order. For convenience, to insert, delete or append drop points on an SLINES
will not update the original indices of the drop points unless we specify "reindex S
". During the operations of SLINE, we may generate drop points with the samep
value. Before we returnS
, we can reduce these98 drop points to one drop point, called