• 沒有找到結果。

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 using

EDF

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

g

In this appendix we show that to nd an

r

in

Sr

gso that g

T

(

r

) = g

T

 = mincg1<r c1g

T

(

r

),

we only need to compute g

T

(

k

gv), for all

k

gv in the special base of

T

.

Let



gr =

T

ij

c

i =

r g

j for some integer

j

0 i.e. the

r

-multiple subset of

T

on base

g

. It is obvious that for any

r

, there exists an

r

0,

c

1

=g < r

0

c

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 if

r

=

k

gv, for 1

v



u

. Recall that when

C

!fgrg

B

, every

c

i in

C

is specialized to a number

b

i=

r g

blogg(ci=r)c. If

r

=

l

gi (=

c

i

=g

dlogg(ci=c1)e), we can derive

b

i=

c

i. That is, if

r

=

l

gi,

c

i will be specialized to itself, and hence, the density of

T

i will not increase after specialization. Therefore, if

r

=

l

gi =

k

gv, for some

v

,



gr is the set of tasks whose density will not increase after

C

!fgrg

B

. 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 f

k

g1

k

2g

::: k

gugof

T

(see Lemma A.1).

Suppose

C

!fgrg

B

. For convenience of discussion, let

k

0g =

c

1

=g

. For a task

T

i 2



kggv

(i.e.,

c

i =

k

gv

g

j, for some 1 

v



u

and

j

 0), there are two possible cbii values due to the relationship between

k

gv and

r

:

(a)

If

r > k

gv, since

r=g < k

gv

< r

, we have

b

i =

r g

j;1 and cbii = gkrgv.

(b)

If

r



k

gv, since

r



k

gv

< gr

, we have

b

i =

r g

j and cbii = krgv.

From (a) and (b), we know that, if

k

vg;1

< r



k

gv, for some

v

, 1

v



u

, then

g

T

(

r

) =v

;1

X

i=1

gk

gi

r 

(



kgg

i

) +Xu

i=v

k

gi

r 

(



kgg

i

)

:

(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), g

T

(

r

) =Pui=1 krgi



(



kggi).

Moreover, we can prove the following lemma.

Lemma A.1

kg If

k

vg;1 

r < k

gv, for some

v

, 1 

v



u

, and

r

6=

k

0g, then g

T

(

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

gi

r 

(



kgg

i

) +Xu

i=v

k

gi

r 

(



kgg

i

)

=

k

gv

r

vX;1 i=1

gk

gi

k

gv



(



kgg

i

) +Xu

i=v

k

gi

k

gv



(



kgg

i

)

!

=

k

gv

r

g

T

(

k

gv)

Note that (

g

;1)



(



gr) = 0, for

k

gv;1

< r < k

gv. For

r

=

k

gv;1, we have

g

T

(

k

gv;1) = v

;2

X

i=1

gk

ig

k

gv;1



(



kgg

i

) + Xu

i=v;1

k

gi

k

gv;1



(



kgg

i

)

= vX;1

i=1

gk

ig

k

gv;1



(



kgg

i

) +Xu

i=v

k

ig

k

vg;1



(



kgg

i

);(

g

;1)



(



kgg

v ;1

)

=

k

gv

k

gv;1

vX;1 i=1

gk

gi

k

gv



(



kgg

i

) +Xu

i=v

k

ig

k

gv



(



kgg

i

)

!

;(

g

;1)



(



kgg

v ;1

)

=

k

gv

k

gv;1g

T

(

k

gv);(

g

;1)



(



kggv ;1)

2

Recall that



(



gr) 6= 0 if and only if

r

=

k

gv, for 1 

v



u

. Therefore, Lemma A.1 implies that g

T

(

r

)

>

g

T

(

k

gv), for all

r

,

k

gv;1

< r < k

gv. Thus, to nd an

r

 in

Sr

g so that

g

T

(

r

) = g

T

 = minc1=g<r c1g

T

(

r

), we only need to compute g

T

(

k

gv), for all

k

gv in the

special base of

T

.

Proofs of the Lemmas

Lemma B.1 k

vg+1g

T

(

k

gv+1);

k

gvg

T

(

k

gv) = (

g

;1)

k

gv



(



kgvg), for 1

v < u

.

Proof: From Lemma A.1, for 1 

v < u

, g

T

(

k

gv) = kgv +1kgv g

T

(

k

vg+1);(

g

;1)



(



kgvg).

Therefore,

k

gv+1g

T

(

k

vg+1);

k

gvg

T

(

k

gv) = (

g

;1)

k

gv



(



kggv). 2

Lemma B.2

Let

T

2

U

(

d

) such that, for all

T

0 2

U

(

d

), g

T

0  g

T

 = g, and let

f

k

g1

k

2g

::: k

gugbe the special base of

T

based on

g

. It must be true that g

T

(

k

gi) = g, for

all

k

gi, 1

i



u

.

Proof: The lemma is trivially true for

u

= 1. We prove the lemma for

u >

1 by contra-diction. Suppose to the contrary that there exists a

p

, 1

p



u

, g

T

(

k

gp)

>

g. We can

show that there exists a task set

T

0 with the same total density and the same special base as

T

, but g

T

0

>

g. And this contradicts the denition of

T

. To show this, there are two cases to be considered:

Case 1:

1

< p



u

.

Let's change the densities of



kggp and



kgg

p;1

in

T

by changing the execution times of some of the tasks to create another task set

T

0.

(a) 

kgpg is changed so that



(



kggp) is increased by

= minf(g

T

(

k

gp) ;g)

=

(

g

;1) (1;

"

)



(



kgg

p;1

)g, and

(b) 

kgg

p;1

is changed so that



(



kgg

p;1

) is decreased by

,

where

"

is a small positive number. Note that



(

T

) =



(

T

0), hence

T

0 2

U

(

d

). From Equation (A.1), we know that for

k

gv;1

< r



k

gv and 1

v



u

, g

T

(

r

) =Pvi=1;1 gkrgi



(



kgig)+

94

Pui=vkgi r



(



kgg

i

). From denitions of g,

k

gp and

, we know that for

k

g0

< r



k

gu, g

T

(

r

)

g , for 1

p



u

,

k

gp

> k

gp;1, and g

T

(

k

gp);g(

g

;1)

. Therefore, we have:

(i)

if

r



k

gp;1, then g

T

0(

r

);g g

T

0(

r

);g

T

(

r

) =

(

k

gp;

k

gp;1)

=r >

0, i.e., g

T

0(

r

)

>

g

(ii)

if

r

=

k

gp, then g

T

0(

k

gp);g = (g

T

0(

k

gp);g

T

(

k

gp)) + (g

T

(

k

gp) ;g)  (1;

gk

gp;1

=k

gp)

+ (

g

;1)

>

0, i.e., g

T

0(

r

)

>

g

(iii)

if

r > k

gp, then g

T

0(

r

);g g

T

0(

r

);g

T

(

r

) =

g

(

k

gp;

k

pg;1)

=r >

0, i.e., g

T

0(

r

)

>

g.

So, g

T

0

>

g

T

, which contradicts the denition of

T

in the lemma.

Case 2: p

= 1.

In this case, we change the densities of



kgg

1

and



kggu to create task set

T

0.

(a) 

kgg

1

is changed so that



(



kgg

1

) is increased by

= minf(g

T

(

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), hence

T

0 2

U

(

d

), and from denition,

k

g1

> c

1

=g

=

k

gu

=g

. Therefore, we have:

(i)

if

r

=

k

g1, then g

T

0(

k

1g);g= (g

T

0(

k

g1);g

T

(

k

g1))+(g

T

(

k

g1);g)(1;

k

gu

=k

1g)

+

(

g

;1)

>

0, i.e., g

T

0(

r

)

>

g

(ii)

if

r > k

g1, then g

T

0(

r

);g g

T

0(

r

);g

T

(

r

) =

(

bk

g1;

k

gu)

=r >

0, i.e., g

T

0(

r

)

>

g.

So, again, g

T

0

>

g

T

, which contradicts the denition of

T

in the lemma. 2

Lemma B.3

If

k

gv;1

< r < r

0

k

gv, for some

v

, 1

v



u

, then g

T

(

r

)

>

g

T

(

r

0).

Proof: From denition of



(



gr), if

r

6=

k

gv, for some

v

,



(



gr) = 0. Thus, from Lemma A.1, if

k

vg;1

< r < k

gv, for any

v

, 1

v



u

, g

T

(

r

) = krgvg

T

(

k

gv).

Therefore, according to Lemma A.1, if

k

gv;1

< r < r

0

k

gv, for some

v

, 1

v



u

, then

g

T

(

r

)

>

g

T

(

r

0). 2

Denitions 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 nodes

N

j and

N

j+1 as dened in Section 4.3.1. Each SLINE

W

corresponds to a serrated line function

W

(

h

j) dened in X-domain 0

w

). 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 original

h

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 use

t

as a shorthand of

h

j.

Denition: An SLINE

W

=f

s w

(

x y

) f

d

1

d

2

:::

ggwhere

1.

s

is the slope, which is the slope of the line segments of the serrated line it represents

2.

w

is the width, or the current domain size

3. (

x y

) is the origin, where

x

is in the original domain

4. 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, and

p

0 is the X-coordinate of the drop point in the original domain. The drop points are sorted in increasing order on

p

.

96

5.

W

(

t

) returns the value of

W

at

t

.

6.

W

0(

t

) returns the X-coordinate in the original domain of

W

at

t

.

2

Given a

W

(

t

) and a

W

0(

t

), we can dene a

W

. Suppose

F

1

::: F

u are delay functions of

t

with period

w

. 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 MAXf

W

g=

W

.

2. SUMf

W F

1

::: F

ug is an SLINE,

S

, where

S

(

t

) =

W

(

t

) +

F

1(

W

0(

t

))+

F

2(

W

0(

t

)) +

:::

+

F

u(

W

0(

t

)) and

S

0(

t

) =

W

0(

t

),8

t

20

w

).

3. MAXf

W F

1

::: F

ug is an SLINE,

S

, where

S

(

t

) = maxf

W

(

t

)

F

1(

W

0(

t

))

F

2(

W

0(

t

))

::: F

u(

W

0(

t

))gand

S

0(

t

) =

W

0(

t

), 8

t

20

w

).

4. Let

u

=

w=E

k,

E

k

w

!, and

V

Ek(

t

) is a function of

t

to a set of

u

values, where

V

Ek(

t

) =

f

t

0j

t

0=

t

+ (

v

;1)

E

k 1

v



u

g 8

t

20

E

k)

CUTf

W E

kg is an SLINE,

S

, where

S

(

t

) = minf

W

(

v

) j

v

2

V

Ek(

t

)g and

S

0(

t

) = minf

W

0(

v

)j

W

(

v

) =

S

(

t

)g 8

t

20

E

k).

2

Suppose

S

is an SLINE with

v

drop points and width

E

k, and there are

u

periodic delay functions,

F

1

::: F

u, with the same period

E

k. Because the period of

F

i is

E

k for every

F

i, there is a

p

i 20

E

k) s.t.

F

i(

p

i) = 0. W.l.o.g. suppose the

p

i's are in increasing order.

From the denition of SLINE,

d

iare sorted on

d

i

:p

in increasing order. For convenience, to insert, delete or append drop points on an SLINE

S

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 same

p

value. Before we return

S

, we can reduce these

98 drop points to one drop point, called

compact

. For example, if there are two drop points

d

i and

d

j,

i < j

and

d

i

:p

=

d

j

:p

. After compacting, only

d

i will be kept while

d

i

:a

changes to

d

i

:a

+

d

j

:a

and

d

i

:p

0changes to minf

d

i

:p

0

d

j

:p

0g.

相關文件