58
7 D-147 68 DECENTRALIZED CONTROL OF SCHEDULING IN DISTRIBUTED 1/i I SYSTEMS(U) MASSACHUSETTS UNIV AMHERST DEPT OF U R ELECTRICAL AND COMPUTER ENGINEERING J A STANKOVIC p NCLASSIFIED 14 JUN 84 F/G 9/2 N Ehj hENhhE

Ehj hENhhE - DTIC · U SARY ~tMUNCAI~lSELECTRONICS C HeMAND FORT MONMIOUTH, NEW JERSEY 01103-. HISAF-1566,. S - ~ .-..-- .- ..-- 11.-- - aiT -. T' -. ka* Table of Contents 1.0 Introduction

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Ehj hENhhE - DTIC · U SARY ~tMUNCAI~lSELECTRONICS C HeMAND FORT MONMIOUTH, NEW JERSEY 01103-. HISAF-1566,. S - ~ .-..-- .- ..-- 11.-- - aiT -. T' -. ka* Table of Contents 1.0 Introduction

7 D-147 68 DECENTRALIZED CONTROL OF SCHEDULING IN DISTRIBUTED

1/iI SYSTEMS(U) MASSACHUSETTS UNIV AMHERST DEPT OF

U R ELECTRICAL AND COMPUTER ENGINEERING J A STANKOVICp NCLASSIFIED 14 JUN 84 F/G 9/2 N

Ehj hENhhE

Page 2: Ehj hENhhE - DTIC · U SARY ~tMUNCAI~lSELECTRONICS C HeMAND FORT MONMIOUTH, NEW JERSEY 01103-. HISAF-1566,. S - ~ .-..-- .- ..-- 11.-- - aiT -. T' -. ka* Table of Contents 1.0 Introduction

11111.2

11111125 111.-

MICROCOPY RESOLUTION TEST CHARTNATIONAL JWfMJ O STADARDS-I963-A

.46

Page 3: Ehj hENhhE - DTIC · U SARY ~tMUNCAI~lSELECTRONICS C HeMAND FORT MONMIOUTH, NEW JERSEY 01103-. HISAF-1566,. S - ~ .-..-- .- ..-- 11.-- - aiT -. T' -. ka* Table of Contents 1.0 Introduction

RESEARCH AND DEVELOPMENT TECHNICAL REPORT

DECENTRALIZED CONTROL OF SCHEDULING IN DISTRIBUTED SYSTEMS

John A. StankovicDept. of Electrical &Computer EngineeringUniversity of Massachusetts

1Amherst, MA 01003

IQuarterly Report for the Period 15 MARCH 84 to 14 JUNE 84

Distribution StatementN L CT

'Approved for public release;distribution unlimited

SPrepared forCenter for Communications Systems (C. Graff)

CECOM4U SARY ~tMUNCAI~lSELECTRONICS C HeMAND

FORT MONMIOUTH, NEW JERSEY 01103

-. HISAF-1566,.

Page 4: Ehj hENhhE - DTIC · U SARY ~tMUNCAI~lSELECTRONICS C HeMAND FORT MONMIOUTH, NEW JERSEY 01103-. HISAF-1566,. S - ~ .-..-- .- ..-- 11.-- - aiT -. T' -. ka* Table of Contents 1.0 Introduction

S - ~ .-..-- 11.-- .- ..-- - T' -. -. aiT ka*

Table of Contents

1.0 Introduction 2

2.0 Main Text. 22.1 RealrTime Constraints -Simulations 22.2 Real.-Time Constraints M on Traditional Architectures 112.3 Real-Time Constraints "Resource Requirements 12

3.0 Conclusions and Recommendations 12

4.0 Budget 12

5.0 Appendix A: Scheduling Tasks With Resource RequirementsIn Hard Real-iTime Systems 14

6.0 Distribution List 54

ccesston For

NTTI GPA~i

.P- .

Page 5: Ehj hENhhE - DTIC · U SARY ~tMUNCAI~lSELECTRONICS C HeMAND FORT MONMIOUTH, NEW JERSEY 01103-. HISAF-1566,. S - ~ .-..-- .- ..-- 11.-- - aiT -. T' -. ka* Table of Contents 1.0 Introduction

.- T2

1 .0 Introduction

This report summarizes the work performed during the tenth quarter ofthis contract, from March 15,--1984 to June 14, 1984. The work in thisquarter concentrated in three areas: simulations of our real-time biddingalgorithm, non.-traditional architectures studies for real-time systems, andscheduling tasks with resource requirements in hard real-time systems.Section 2 of this report describes the progress made in each of these areas.

Significant new results were obtained in the area of hard real-timeconstraints and a paper was written describing these results. A copy of thepaper is attached as Appendix A.

2.1 Real-Time Constraints - Simulations 7'

During the past few months, progress has been made in f inKizing thesimulation model of distributed hard realntime systems and q aluating theperformance of a basic bidding algorithm in such a system.'VSignificantresults have been obtained which provides insight into the effectiveness of.the algorithm. An improvement over the basic algorithm has been found. Theimprovement uses the prediction of future surplus time instead of the cur-rent surplus time in modifying bids. This report describes the basicalgorithm and then describes the simulation results.

Each node in the distributed system has a schedui r. A set (possiblynull) of guaranteed periodic tasks exist at each node. Aperiodic tasks mayarrive at any node in the network. When a new task arrives, an attempt willbe made to schedule the task at that node. If this is not possible, thenthe scheduler on the node interacts with the schedulers on other nodes,using a bidding scheme, in order to determine the node on which the task canbe sent to be scheduled. The intent is to guarantee all periodic tasks andas many of the aperiodic tasks as possible, utilizing the resources of theentire network.

The scheduler is decomposed into two major system tasks: a localscheduler task and a bidder task. They may be invoked periodically orasynchronously. The local scheduler task invokes the guarantee routine tocheck to see if a newly arriving task can be guaranteed locally. If yes,the task is linked to the ready queue and is dispatched with an earliestdeadline policy. If not, the task is linked to an outgoing RFB (request-for-bid) queue waiting to be processed by the bidder task. The bidder taskhas three phases. The first phase is to evaluate the tasks in the outgoingRFB queue and send out the RFB messages in behalf of the tasks. The secondphase is to evaluate the incoming RFB message queue and send out the bids.The third phase is to evaluate the queue of returning bids to see if thereis a node where the task can be sent to be scheduled.

In a hard real-time environment, the bidding algorithm must run in-atimely fashion. Each RFB message is attached with a deadline of response.

* If the responding site cannot deliver the bid to the request site on time*no attempt will actually be made. Therefore, only viable bids will reach

V the request site and the communication overhead may be reduced. In reply to

..

Page 6: Ehj hENhhE - DTIC · U SARY ~tMUNCAI~lSELECTRONICS C HeMAND FORT MONMIOUTH, NEW JERSEY 01103-. HISAF-1566,. S - ~ .-..-- .- ..-- 11.-- - aiT -. T' -. ka* Table of Contents 1.0 Introduction

a RFB message, a node estimated the surplus time available for the task be-tween the estimated arrival time and the deadline of the task and sends thesurplus time as the bid to the request site. The estimation is based on theassumption that the surplus time in the near future will be about the sameas that in the recent past. This assumption has been found inadequate in ahard realntime environment and needs to be modified. -

Our simulation has provided some insight into the performance of thebidding algorithm under various conditions (arrival rates, processing powerof system tasks, length of memory accumulation periods). Several baselinealgorithms are simulated to bound the performance of the bidding algorithm.The performance matric used is the number of tasks guaranteed in thenetwork-wide system. Other statistics collected include the utilizationfactors and the turnaround time. The turnaround time is defined .to be thetime interval between the arrival time and the time when a task isguaranteed or found to be impossible to guarantee (locally or at remotesites).

Table 1 illustrates the number of tasks guaranteed under various ar-"-rival rates of aperiodic tasks. The percentage of the total number of tasksguaranteed decreases and the turnaround time at heavily loaded sites in-creases as the arrival rate is increased. This is because the processingpower of the system tasks is limited at the'heavily loaded sites and only acertain number of messages may be processed in time. Also shown in thetable, at rate 3 and 4, the input stream of aperiodic tasks starts tosaturate the processing power of the system tasks to the load factor of theaperiodic tasks.

rate 1 rate 2 rate 3 rate 4

Percentage of TasksGuaranteed 97.6% 89.3% 77.5% 63.7%

Normalized Total No.Tasks Guaranteed 1 1.023 0.966 0.849

Turnaround Timehost 1 1.5 msec 1.1 msec 1.1 msec 1.0 msechost 2 362.0 608.4 916.1 3364.6host 3 1.0 1.0 1.0 1.0host 4 4.3 43.3 96.4 121.8host 5 355.0 662.0 854.4 1112.9

Utilization Factorhost 1 0.69 0.76 0.68 0.50host 2 1;00 1;00 1.00 1.00host 3 0.,66 0.72 0.66 0.145host 4 0.99 1.00 1.00 1.00host 5 1.00 1.00 1.00 1.00

Table 1. Performance of the Basic Bidding Algorithm underDifferent Arrival Rates of Aperiodic Tasks.

%. "' %*% *** *. " . . . . ..* *" .*.*-

Page 7: Ehj hENhhE - DTIC · U SARY ~tMUNCAI~lSELECTRONICS C HeMAND FORT MONMIOUTH, NEW JERSEY 01103-. HISAF-1566,. S - ~ .-..-- .- ..-- 11.-- - aiT -. T' -. ka* Table of Contents 1.0 Introduction

- ~~~ 7 7 . - 7

14

We have also evaluated the effect of changing the seeds of the randomn umber generators on the statistics. Four set of seeds have been used.They only result in 2.6% difference in the total number of guaranteed tasks;This convinces is that 10% improvement over the performance matrics is 7

significant.

The effect of varying the length of the memory accumulation period* (LMAP) is also evaluated. As shown in Figure 1, for three arrival rates the

LIMAP is varied from 500 msec to 3,000 msec. Only a small perturbation inthe percentage of tasks guaranteed (less than-1.9%) is observed. This in-~

* sensitivity to LIMAP is further investigated by analyzing the variation of* the surplus time during the run time.

As shown in Figure 2, the surplus times are recorded and plotted as afunction of the simulation time. Severcit interesting things are observed.

*First, less transient behavior is exhibited by the curves in which higherLIMAP's are used. Second, there is large sinusoidal pattern of surplus times

* at lightly loaded hosts (host 1 and 3). Third, the variations of thesurplus time factor for host 1 and 3 complement each other.

Since the surplus at host I and 3 vary alternatively, they also taketurns in dominating in the bidding process. When the surplus for one host

-Is increased above the cross over point- the host starts to take over the*bidding, while the other ceases to bid. But as long as the dominating host* has enough surplus, viable bids will'be issued and task will be awarded to

t~hi~s site. Therefore, performance depends in whether there is a host withhigh surplus most of the time. When all the hosts are low in surplus, few

* viable bids are issued resulting in few guaranteed tasks due to bidding.

*From the sinusoidal pattern of surplus time, we infer there is an over-* bidding and an underbidding effect in the peak area and the valley area of

the curves, respectively. In the peak area, because of the high currentsurplus and the unawareness~ of the outcome of the bidding, the number ofbids issued may be more than that can be accomodated by the host. As aresult, conflicts are more likely to occur among task with the same hard

*realatime constraints. In the valley area, because of the low current-. surplus and the unawareness of the shrinking set of local guaranteed tasks,

the host may withdraw itself from bidding and stay idle too long until itfinds out that it has high surplus again. Because of the delay, the hostwill waste cpu time in waiting for tasks to be awarded. The underbidding

* * effect will result in the low utilization of the system.*

Page 8: Ehj hENhhE - DTIC · U SARY ~tMUNCAI~lSELECTRONICS C HeMAND FORT MONMIOUTH, NEW JERSEY 01103-. HISAF-1566,. S - ~ .-..-- .- ..-- 11.-- - aiT -. T' -. ka* Table of Contents 1.0 Introduction

.. ~ ~ ~ ~ ~ % V- ..- .. - -- N- . - - . . --

5

X3 91 .. 0

97.6B

9 6.13809.

t

JOS.-

Page 9: Ehj hENhhE - DTIC · U SARY ~tMUNCAI~lSELECTRONICS C HeMAND FORT MONMIOUTH, NEW JERSEY 01103-. HISAF-1566,. S - ~ .-..-- .- ..-- 11.-- - aiT -. T' -. ka* Table of Contents 1.0 Introduction

7. 77 77 - r-

Figure 26

p 1.004

t eo'; li

4 O

p ' I I I

201 V

Sxrriulati.cn Tirrxe (1000 rmec)

p 801

c 701tN

U 401j

T 10m

S1mula4 .. aoz TiEzn- 11D mxec)

(bI.WAP -1000 ma o.

Page 10: Ehj hENhhE - DTIC · U SARY ~tMUNCAI~lSELECTRONICS C HeMAND FORT MONMIOUTH, NEW JERSEY 01103-. HISAF-1566,. S - ~ .-..-- .- ..-- 11.-- - aiT -. T' -. ka* Table of Contents 1.0 Introduction

Figure 2 (Continued)

70.

I'I

p r p

p 201

T 101

0758.76Cm ltcnTme(DOzwc

Cd MF P-0 O*

8V,

£2

Page 11: Ehj hENhhE - DTIC · U SARY ~tMUNCAI~lSELECTRONICS C HeMAND FORT MONMIOUTH, NEW JERSEY 01103-. HISAF-1566,. S - ~ .-..-- .- ..-- 11.-- - aiT -. T' -. ka* Table of Contents 1.0 Introduction

Figure 2 (Continued)

r

a~70-

U

p 30.V TT 10.

Srilatioxi Timox- (m0O rmec)

Le LAP 4500 mseo.

C

t

0ao

U

40

3000 m.c

*5 5.*5 .. * . .5 .. ,. .5 .. .

Page 12: Ehj hENhhE - DTIC · U SARY ~tMUNCAI~lSELECTRONICS C HeMAND FORT MONMIOUTH, NEW JERSEY 01103-. HISAF-1566,. S - ~ .-..-- .- ..-- 11.-- - aiT -. T' -. ka* Table of Contents 1.0 Introduction

89.

58.

f BT 86.?

U.lo 65.5

4e

d50 l

LrIZ~ 119e (t ize2O 1.33

Figure 3. BDcdding and baseline algoritarrts.

Page 13: Ehj hENhhE - DTIC · U SARY ~tMUNCAI~lSELECTRONICS C HeMAND FORT MONMIOUTH, NEW JERSEY 01103-. HISAF-1566,. S - ~ .-..-- .- ..-- 11.-- - aiT -. T' -. ka* Table of Contents 1.0 Introduction

10

From the overbidding and underbidding effects, we conclude that theoriginal algorithm wlfch based the estimation of surplus in the near futureon the surplus in the recent past is not adequate for the bidding algorithmin distributed hard realrtime systems. The estimation should be based inthe prediction of the future task load instead. As a result, the bidsissued by the hosts are more accurate which hopefully will result in moreuniform utilization of the system. A proposed approach is described asfollows: Let FTIME be the maximum free time available in each LCM of theperiods of the periodic tasks, i.e., FTIME is equal to LCM minus CPU timereserved for the periodic tasks. The surplus time available for a task ofwhich the estimated arrival time and the deadline are ART and D, respec"tively, is equal to

D.-ART* FTIME re CPU time needed for future tasks,

LCM

where the future tasks include guaranteed tasks of which the deadlines arebetween ART and D, and the tasks which will be arriving and guaranteed as aresult of the bidding. The estimation of the number of tasks which will bearriving and guaranteed may be a heuristic function of the number of outmstanding bids and the surplus time ratio between local host and other hosts.We expect that this approach will eliminate the sinusoidal pattern andachieve higher utilization of the system resources. This new approach iscurrently under investigation.

We have also made a simulation runs to bound the performance of thebidding algorithm. Several baseline algorithms were conceived: 1) Perfectstate information algorithm (PSA) - Each node is assumed to have perfectstate information about every other nodes so that the local schedular iscapable of determining whether a task can be guaranteed at any other site ornot. 2) Current utilization information algorithm (CUA) " Each node is asAsumed to have up-to-date CPU utilization information about every other nodesall the time, and the decision of choosing the node to send the task isbased on utilization. 3) Random scheduling algorithm (RSA) - Each node ranndomly chooses a node whenever a task cannot be guaranteed locally. 4) Non-cooperative algorithm (NCA) - No cooperation among nodes is assumed. If atask cannot be guaranteed locally, it simply fails. PSA and CUA impose up"per bounds on the percentage of tasks guaranteed, while RSA and NCA imposelower bounds.

The simulation are run for various arrival rates of aperiodic tasks.At rate 1 and 2, the numbers of tasks arriving in each least common multipleof periods of periodic tasks are 84.5% and 94% of the maximum number oftasks guaranteeable, respectively. As shown in Figure 3, the bidding algo-rithm outperforms the lower bound algorithms significantly at rate 1 and 2,which are pretty high arrival rates of tasks.

From the simulation results described above, we conclude that the bid-ding algorithm is effective in scheduling tasks in the distributed hardreal-time systems and even with a basic bidding algorithm, it yields satis-factory performance under heavy loads. The improvement needed for the basic

N" • - ," . ',*% *,"",-'.

Page 14: Ehj hENhhE - DTIC · U SARY ~tMUNCAI~lSELECTRONICS C HeMAND FORT MONMIOUTH, NEW JERSEY 01103-. HISAF-1566,. S - ~ .-..-- .- ..-- 11.-- - aiT -. T' -. ka* Table of Contents 1.0 Introduction

bidding algorithm is to use the prediction of the arriving tasks in the nearfuture in the estimation of the future surplus time so that the overbiddingand the underbidding effects may be eliminated. Under saturation condition,the performance degrades which should be avoided by adjusting the processingpower of the system tasks if there is surplus time available.

2.2 Real=Time Constraints ri Non-traditional Architectures

Under this contract we have developed a flexible scheduling algorithmfor distributed real- time systems. This approach is based on a localguarantee algorithm and a networkvwide bidding algorithm. A task thatenters a host is scheduled to run on it if it can be guaranteed to executeby its deadline. If not, the local scheduler calls a bidder routine whichinteracts with- the other hosts to determine if the task can be elsewhere.Thus the other hosts "bid" for the task in response to the "request for bid"initiated by the local host.

In this scheme, every host posses a group of interacting processes:the local guarantee routine, the bidder, the scheduler and user tasks.Because of the logical separation of these processes, we feel that the hostscan be designed as multiple processor systems, with each of the aboveprocesses mappings onto separate processors. The two main advantages ofthis scheme are those of increased performance and fault tolerance.Performance improvements are possible because the CPU is relieved of theoverhead of the bidder, scheduler etc. Because of the proliferation ofprocessors at each node, it is now also feasible to provide some degree offault tolerance.

Preliminary studies indicate that a feasible host architecture mightincorporate multiple microprocessors interacting through some communicationsmedium, We are currently studying various architecture that seemappropriate. These studies include queueing models as well as simulationsystems of these architectures. Because our algorithm might generate a

" large number of messages in the subnets, we are also planning to studyvarious network architectures which provide good connectivity and alsoreduce the number of messages in the subnet.

Many real-time systems also have another requirement, i.e., robustness.We are beginning to investigate the possibilities of fault tolerance in oursystem at two level:

1 1. Because of the availability of more than one processor at the host, we

feel that it is possible to incorporate tolerance to failures at a

processor by dynamic allocation of its tasks among the fault-free ones.The key factor here is how to decide if a processor is faulty. We areinvestigating alternative schemes to do this.

2. At the network level, we would like to be able to switch tasks between* hosts in the event of a total failure at a host.

.4

..4<

Page 15: Ehj hENhhE - DTIC · U SARY ~tMUNCAI~lSELECTRONICS C HeMAND FORT MONMIOUTH, NEW JERSEY 01103-. HISAF-1566,. S - ~ .-..-- .- ..-- 11.-- - aiT -. T' -. ka* Table of Contents 1.0 Introduction

-- ~ t - t. w..- - ,

09-.

12

2.3 Real.bTime Constraints r Resource Requirements

We have developed a heuristic approach for solving the problem ofscheduling tasks with deadlines and general resource requirements. This isan extension of the basic algorithm we developed, and whose simulationresults were presented in Section 2.1. The crux of our approach lies in theheuristic function we developed. This function weighs three factors. Thesefactors quantify a task's requirements (deadlines, CPU execution'time reAquirement and resource requirements) in such a way as to help develop afeasible schedule quickly. If a feasible schedule is found then the set oftasks are guaranteeable. *We have done extensive simulation to show that ourapproach works. We believe that the results we have developed in this areaare significant. The results have been fully described in a paper writtenduring this quarter and attached as Appendix A.

3.0 Conclusions and Recommendations

In this quarter we have concentrated in scheduling tasks with hardrealstime constraints and made significant progress. We will continue toaggressively pursue all research areas described in this report. Further,we will begin to spend more time on scheduling tasks with soft real-,timeconstraints. The immediate problems In this area are a full understandingand modeling of clusters of processes and distributed groups of processes.

* 4.0 Budget

Spent prior to the months listed below $66,464.62.

Planned Actually Spent

December (83) $4000.00 $3319.21January (84) 4000;00 2336.68February 4000.00 7323.58March 4000.00 5376.75April 4000.00 4513.36May 4000.00June 7000.00July 7000.00August 7000.00September 5000;00October 5000.00November 5000.00 .* ..December 4365.38

Total: Planned and $130,830.00 Total Spent: $17,842.86 .'

Spent Priorto MonthsListed Above.

1. .

.1Z "-

.. %

Page 16: Ehj hENhhE - DTIC · U SARY ~tMUNCAI~lSELECTRONICS C HeMAND FORT MONMIOUTH, NEW JERSEY 01103-. HISAF-1566,. S - ~ .-..-- .- ..-- 11.-- - aiT -. T' -. ka* Table of Contents 1.0 Introduction

[ - -. . ." . - V" .. .

13

Modified Budget

Planned

May (84) 4000.00"-June 8ooo.ooJuly 8000.00August 7000.0September 5000.00October 5000;00November 500000December 4522.52

Total Planned $46,522.52

Total Spent 814,307.48

Total $130,830.00

I,%

Page 17: Ehj hENhhE - DTIC · U SARY ~tMUNCAI~lSELECTRONICS C HeMAND FORT MONMIOUTH, NEW JERSEY 01103-. HISAF-1566,. S - ~ .-..-- .- ..-- 11.-- - aiT -. T' -. ka* Table of Contents 1.0 Introduction

'i-~b 47 -i-

5.0 Appendix A

SCHEDULING TASKS WiTH RESOURCE REQUIEEMEN

IN HARD REAL-TIME SYSTEMS1

Wei• .

K~aRamaummm:'-

Computer and Jnfaton s,.ence

John A. Stmkovic

Elccai and Computer Eqneering

Univeniy of Mamachusem-

Amherst MA MO0M

May 1984

do,

1. This work wa uzppa ind In pan by the US Aumy CECOM, CENCOM une pantDAABON-N4O15 and by the NSF under pant MCS 8.(-l52

Page 18: Ehj hENhhE - DTIC · U SARY ~tMUNCAI~lSELECTRONICS C HeMAND FORT MONMIOUTH, NEW JERSEY 01103-. HISAF-1566,. S - ~ .-..-- .- ..-- 11.-- - aiT -. T' -. ka* Table of Contents 1.0 Introduction

SCHE-FIDULING TASKS WITH RESOURCE REQUUUEMENTS

IN HARD REAL-TBIE SYSTEM_ _

ABSTRACr

This pape describes a heuristic approach for sohving the problem of scheduling task

with deadlines and general resourc requirements in a dynamic real-ime system. The cru

of out approach lies in the heuristic function used to select the task to be scheduled next.

The heuristic function is weighted three factors. Each factor explicitly considers information

about real-time constraints of tasks and utilization of resources Simulation, studies, show

* ~that the weights for the variou fatr in the heuristic function have to be fine-tuned in

order to obtain a degree of success comparable to that obtained via exhaustive search. In

* ~addition, moifying the heuristic to use limited backtracking improves the degree of acs

,,I tatially. This mpoeetis observed even when the initial set of weights are not

tailored for a particular uet of tasks. Simulation studies also, show that in most cases the VL

* schedule determined by the heuristic algorithm, a optimal or close to optimal.

-W-.

Page 19: Ehj hENhhE - DTIC · U SARY ~tMUNCAI~lSELECTRONICS C HeMAND FORT MONMIOUTH, NEW JERSEY 01103-. HISAF-1566,. S - ~ .-..-- .- ..-- 11.-- - aiT -. T' -. ka* Table of Contents 1.0 Introduction

CtI..

Laosely coupled, us~kime disriuted systemas are becong are prealent in

applications sach as nucleux power plants and pyoem control MMCOS4]. Theme systms

contain many tasks which have severe reakim. constraints. in fact, then applications

require that theme tasks hav execution deadfine thaz must be mat and aethus said, to

hav herd iwf-aw cotants. In practice, mnany solutions used today asinie conm

and prior knowledge of the task sets, incuding thei deadlines, worst case comnputation.

tims, precedence relations and resource reuirments. Incopo-tin all this knowledge in a

static way makes the systm inflexible and costly (ct systm is unique) Mlm, mast

ern n research In this are is restricted to mullpacfi g ems, is compute bound and

does na adap to the dynamics of the sgatms. Or goal, is to develop a acexble

scheduling algorithm fmr loosy coupled disatWue s~ems that does nor require coiplete

and prio knowledge, is not comute bound, and quickly adapits to the dynmic of the

Ilentre system. Gar basic algorithm and approach hav bee reported in [RAMAS4J. Tis

* . paper report n a sophisticated ectension to owr basic algorithm. In the remaide of this

section, we briefly describe our basic approach and ident exactly how this pape

simifcantly armands the basic algorithm.

Out basi approach [DUMAN]J assumes that each node of a loosely coupld]

disaftted system contains a local scheduler, a bidde and a dispatcher. The local

vcheW&e at a node is invoked when a new task arrive at that node. It decides If the new

task can be guuawaud at this node. The guarantee means that no mnate what happens

(ecept failures) this task will execute by its deadline, and that all previously guaranteed

tak will also still, meat their deadlines. If the new task cannot be guaranteed locally, then

the new task is eithe terminated (without atecuting) or is sent to anothe node chomen on

Page 20: Ehj hENhhE - DTIC · U SARY ~tMUNCAI~lSELECTRONICS C HeMAND FORT MONMIOUTH, NEW JERSEY 01103-. HISAF-1566,. S - ~ .-..-- .- ..-- 11.-- - aiT -. T' -. ka* Table of Contents 1.0 Introduction

-2-

the badis ad a MAWdi xheue. The Mddw on a nods is responsible for 1) sending out

requet for bids for a task that cannot be guaranteed localy, 2) evaluating bids frm other

nodes, ad3) sending the task to the best bidder. Italso, nkes bids n repmpto

requests fom other nodes. The diaptclw is the system program that actually schedules the

guaranteed tasks. It should be pointed out that when a node bids for a task, it does not

rem Ye CPU time for that task. Reserving CPU time ties up too many resources for too

long a time. Consequently, when a bidding task finally arrives at a bidder node, the node

* will again try to guarantee it. In case this guarantee fails, the task may be reobided again,

or declared as not "'urnt *be. In our approach, each of the functions of the local

scheduler, bidder, and dispatcher is carefully controlled in order to handl! real-time

on, s traints.

In our basic algorithm [RAMA34], a task is hactredby a computation time and

a deadline. Tasks are ssumed to be ineedn.We also assuine that resources are

always available to the executing task. In this paper, we relax this assumption. We now

allow a task to request any number of resources, including CPU, 1/0 devices, files, Se.

This means that our local scheduling algorithm most be modified to consider not only

computation time and deadlines of task but also their resource requirements. This is a

significant extension to the previous scheduling algorithm. This paper focuses on the local

* scheduler portion of the scheme. In partcular, we describe a technique for deciding

whether a set of tasks on a node can be guaranteed to execute on that node.

The work described in this paper is not only an extension to our owu work, but also

to work in the field in general. Most related work on scheduling tasks with hard real-time

onraint. is restricted to uiniptacesboir and mutpoesrsystems (M NT70, L1U73

DRT74 IOWH474, GARE7S, M0K78, and TEIX7S and typically do not take tasks-

Page 21: Ehj hENhhE - DTIC · U SARY ~tMUNCAI~lSELECTRONICS C HeMAND FORT MONMIOUTH, NEW JERSEY 01103-. HISAF-1566,. S - ~ .-..-- .- ..-- 11.-- - aiT -. T' -. ka* Table of Contents 1.0 Introduction

03.

VNoDe jreqirmeM into accouL In his workI Leibaugh (LENSO and LEMN] deaft

with resourcet requirementa. He developed anlynls algorithms which, when Slvy= the

f eouInre requirements of each task, determine an upper bound an the raigtime of

ecb task. While hiis approach Is useful at systm deepg time to statically determine the

*upper bounds on rsponsel times, there is no attempt at guaranteeing that a new task will

* meet its deadline.

On the other hand, because of the difficulty of the problem, hmeuri approaches

have been taken for related scheduling problems MY=E and MAUL] that is, heuristics noe

msed in their systems. According to Last [EN and LEN83J, heuristics are informal,

Judgmental rules of thumb which come in two types: those that .cdv.y guide the sstm

towad plausible paths to foflow and those that guide the system awy haom implausible

* ~on.. bb and Efe use heuristics which guide their sytms away frm implausible paths.

This approach of only using the second type of heuristic is limited beoous in the w-ot

case, the exponential problem cannot be avdod W=~f and MAS41. Ta our heuristc

algorithm, we use both types of heuristics. We develop a heuristic function which

* ~synthesizes the various factors of realtm sheduling colstosto actively direct the

scheduling piress to a platusible: path. We also ctan the muach Wowc by kxcug y

at artroy feasibl, paths, prevnting as from looking at implausible paths. As a result,

* evenm in the worst case, our scheduling algorithm Is not ezpomential. Moreover, simulation

results show that our heuristic algoim. can guarantee an arbitrary Me of feasible tasks

almot all the dme. It isamshown that inmowncases the scedules found by our

heuristic scheduling algorithm, arn optimal at close to optimal

Page 22: Ehj hENhhE - DTIC · U SARY ~tMUNCAI~lSELECTRONICS C HeMAND FORT MONMIOUTH, NEW JERSEY 01103-. HISAF-1566,. S - ~ .-..-- .- ..-- 11.-- - aiT -. T' -. ka* Table of Contents 1.0 Introduction

.4-

In th urmander cd this paper, Section 2 pmvId an ovesview at corbulc

aproach for lacpoa ms resmue requireomn int dynamic hard nres&m =hedoft

while Section 3 pmein the algai for the local schduler, and duma. thmsb

functon in detil. An evalation of the algoithm, in SectIon 4, hm that the algrithm

iS effective. However, this initial cevaluation afm sugtm 1m; omet that ane pesntd

* ~and evaluate in Section S. Analme of the compledty and optimality of the algorithm arn

made in Secbio 6& Section 7 conckldes the paper with dlucuulou of the ac~vmnsand

meMai ons of this etud.

Page 23: Ehj hENhhE - DTIC · U SARY ~tMUNCAI~lSELECTRONICS C HeMAND FORT MONMIOUTH, NEW JERSEY 01103-. HISAF-1566,. S - ~ .-..-- .- ..-- 11.-- - aiT -. T' -. ka* Table of Contents 1.0 Introduction

%~*%..* .~ 's .7- .** 77 7. . 1-7 .7 -

e.

2. Statg and Fucta o the Scheduile,

This scdo first defines and discusses the baesic tms needed to understand our

scheduling alsotm. It den outinm the ateg followed by the scheduler, and finally

discusses an analog between schedulig and weatching.

2.1 Resources md Tadsk

Let each made of a mooe* coupled dsrbted systom contain a sat of resources, 1,

R2 , Rr, A resource ca be serially shared by tasks. The tMme of rsuc include

CPU, physical deAces, and fes. A resource is acdv if it has proce,,ian power, otherwise,

it i paiW. For mampe, a CPU or a physical device is active, but a fe is passive.

tus, a passive resource must be used with some actve resource.

A teAk is a scheduling entity. The fMflowing of a task, T, are suined

knmown when it antves

L The ws an computaton dme, C(T);

2. The dedline, D(I'), by which the task must comple.e

3. The resouce mrequiremens of the task. R is assumed that a task needs its

[esource throughut its ecutiom.

A Uask wil request at WOas one active resource and zero or more passive resources.

~% '~.ZJ~jt~.2

P.~S\ ~ ~'' ~ ~ .. .. ~-~.v ~ .....

Page 24: Ehj hENhhE - DTIC · U SARY ~tMUNCAI~lSELECTRONICS C HeMAND FORT MONMIOUTH, NEW JERSEY 01103-. HISAF-1566,. S - ~ .-..-- .- ..-- 11.-- - aiT -. T' -. ka* Table of Contents 1.0 Introduction

- . . ..- .. .. W

Atk is d to be sritmnd, if the schedul an d a nd a sun tme, so that

ai the resources needed by the task arn available by that time, and the task will meet its

deadline. A fumbe. whedua a a list of tasks that have been guaranteed. With res.e-t to

a iof ads, a schedule is fu, if it contalns all asks in the sfotherwise it is panL.

A shedul (T, T2.. , T+) is an bmnedkfat of the schedule (,, T,. T )

2.2 Statep of the Scheduler

The basic sategy we employ to determine whether or not a new task can be

guaranteed on a node is as follow=

L On each node, ther is always a se of guaranteed tasks, say n, n - O, and a

current full feasie schedule for thm tasks.

2. When a new task arives, it can be guaranteed if a new full feasible schedule

eists for the n+I tasks. That is, the a tasks in the current feasble schedule main

a and the deadline of the new task also can be met.

3. If the new task is guaranteed, then the new feasible schedule, containing the

ew task and the n old tasks, replae the current one. This feasible schedule

determines all the start times for the tasks currently on the node, and will not be

altered until another new task is guaranteed.

4. If the new task cannot be guaranteed, that is, the local scheduler cannot find a

full feasible schedule for all n+1 tasks, bidding is invoked RAMAN4]. The new task is

sent to the node offering the best bid. The original current feasible schedule for the

tubk previousl guaranteed on the sending node remains unchanged.

. -

Page 25: Ehj hENhhE - DTIC · U SARY ~tMUNCAI~lSELECTRONICS C HeMAND FORT MONMIOUTH, NEW JERSEY 01103-. HISAF-1566,. S - ~ .-..-- .- ..-- 11.-- - aiT -. T' -. ka* Table of Contents 1.0 Introduction

-

In the discusion of our heuristic in this paper, we assme that the current runnaing

task is preemptable on all its resousces. A minor modification is required to deal with the

situation where the currently running task is not preemptable. We discus this modification

in Section3.I.

In the rest of this paper, we will focus on the algorithm for determining whether a

full feasible schedule exists, for a piven set of tAs.

2.3 S Hedlng and Searchin

The scheduler determines, a full feasible schedule for a given set of tasks in the

following way: It begins with an empty schedule and tries to extend it with one task at a

time until a full feasible schedule is derived. This is, in fact, a search problem. The

structure of the search space is a seach tree. The ramt of the search tree is the empty

schedule. An imntered late vetx of the search tree is a partial schedule. A descendam of

a vertex is an immediate extension of the schedule corspning to the vertex. A lef, a

terminal vertex, is a full schedule. Note that not all leaves will correspond to feasible

schedules. Ile goal of our algorithm is to search for a leaf that corresponds to a full

feasible schedule.

Page 26: Ehj hENhhE - DTIC · U SARY ~tMUNCAI~lSELECTRONICS C HeMAND FORT MONMIOUTH, NEW JERSEY 01103-. HISAF-1566,. S - ~ .-..-- .- ..-- 11.-- - aiT -. T' -. ka* Table of Contents 1.0 Introduction

.A s - ,e.=S.' -

s.8

T 3 lb Sd adu Agthm ei =eun ea rl dm ,

uzzz,

3.1 Data Structurme

TM. aorithm mainains a vector EAT, to indicate the EZlks Avdksbk TIni. of

EAT - (EAT, EAT2, ... , EAT,)

where EATI is the earlies time when eourc R1 will become avaljablo. Inial values of

EAT, for all i will be 0 if the manis task is empable Oth&,aw , EAT will be the

time when the running task finishes using it. Each time the patal schedule Is

EAT will be updated takin nto account the newly added task's resource quanb and

-IOlm dmI&

At each levd of the warch tree, the scheduler computes ESrM and NewEAT)

for each task T that remains to be scheduled. EST indicates the ZLartk Strt Twm of

task T if it is scheduled oect. Since a task T can rnm only when all resources it needs are

* avail".ewe deftn MMT as

- EMM MAX(EAT, where T needs R).-.

'.-., , , -_- -,,. .-,-.-...._--' .o' .°. _.. -.-. ...-.--. " ° .N ' ' ..-"-.o ..'" -',. ..,-',.'-" ,

Page 27: Ehj hENhhE - DTIC · U SARY ~tMUNCAI~lSELECTRONICS C HeMAND FORT MONMIOUTH, NEW JERSEY 01103-. HISAF-1566,. S - ~ .-..-- .- ..-- 11.-- - aiT -. T' -. ka* Table of Contents 1.0 Introduction

-9-

New-EATM is a vector with the same size as EAT and contains the EAT values if

task T is scheduled next. In other words, New-EATM will replace the current EAT if task

T is scheduled. The computation of New-EATM is illustrated by the following example.

EXAMPLE Assume we have 7 resources R1i, F.2, ., 7,and among them R, R2. R3, and

R4 are active resources. Let current EAT be

(1) EAT -(EAT,, EAT2, EAT3, EAT4, EATS, EAT6, EAT7)

- 5, 10, 25, 15, 10, 15, 5 )and

let task T with computation time C -10, and with reource requirements R2, R~ and R,

be one of the tasks that remain to be scheduled.

First, the ESr, the Emblest Start Time for T is

(2) ESTMT MAX(EATI, EAT2, EAT5)-MAX( 5, 10, 10)-1.

Then New-EATM should be

(3) New-EATM- (20, 20, 25, 25, 20, 25.,5)

* becaus T is assumed to start at its EST and it - 10 units of computation time while

holding 1 , R2 , and R,. R2 will be idle fom time 5 to 10. Our scheduling algorithm

is designed to mienimiz such idle times.

New-EATMT may be further refined if we distinguish active resources from passive

ones. Because a passive resource must be used with active ones, no task can use them

* until

time NIIN(New-EAT1 where P1 is an active resource)KWN(New-EAT2, New-EAT2, New-EAT3, New-EAT 4) - .

* 7 .

Page 28: Ehj hENhhE - DTIC · U SARY ~tMUNCAI~lSELECTRONICS C HeMAND FORT MONMIOUTH, NEW JERSEY 01103-. HISAF-1566,. S - ~ .-..-- .- ..-- 11.-- - aiT -. T' -. ka* Table of Contents 1.0 Introduction

. 1 0 . o" °

Thus, (3) should be further updated as

(4) New-EAT) - (20. 20, 25, 15, 20, 15, 5)

That is, all New-EATOs for psive rewuce should not be less than (therefore must be

updated to be equal to) the minimum New-EAT for active resources.

AtM each level of the search, the scheduler also calculates a vector called DRUR,

the Dywdc Remme U.hi m Rado, which indicates the degree to which tasks that

remain to be scheduled will use resources:

DRUR -(DRUR 2, DRUE, .. DRUR,)

where DRUI 1 is defined as

C, T remains to be scheduled and us RDRUR 1 -

MAX(D(T), T remains to be scheduled and uses ) - EAT

where i - 1, .. , r.

Note that all DRUR of a DRUR associan with a partial feasible schedule should

be less than or equal to I for the remaining tasks to be scheduled. EAT, New-EATs and

DRUR are updated each time the partial schedule is extended.

3.2 A Costraint on the Search

Using the data structures, EAT and DRUR, described above, we can state a

ant on the search for a full feasible schedule.

...-..-...

~ ~L~iL/*/*. . : .* . .. -

Page 29: Ehj hENhhE - DTIC · U SARY ~tMUNCAI~lSELECTRONICS C HeMAND FORT MONMIOUTH, NEW JERSEY 01103-. HISAF-1566,. S - ~ .-..-- .- ..-- 11.-- - aiT -. T' -. ka* Table of Contents 1.0 Introduction

we dMines a feasibl Parial schedule to be mmrqly feasgib f

LC DRU soitd wt euules DRta Sforl-1 and

.9 ~2. all of its imnmediazeetension an feasible

* ~A full feasible schedule is defined to be strongl feasible.

If a schedul is not strongl feasible becus condition 1 or 2 falls, then thle failed

Condition will also fail for all descenidants of the non-srongly feasible schedule. Hence,

nowe of the descendants of a non-strongl feasible schedule an be strongly feasible. On the

* ~other hand, the anestor of a full feasible schedule must be strongl feaslible, odhewis the

*full schedule itself will not be feasible. Therefore, only strongl feasible schedules an lead

*to a full feasible schedule. Considering this fact, a costaint on thle search for a full

feasible schedule is:

Far a pedal scheduleo be eueiibl to a full feasibe

schedule, she palW schedule shou be are qly feaible.

Fromn the viewpoint of the algorithm, this means, that it is ntnecessary to Mearch -

* through a vert coreponding to anon-strongl feasible schedule, becaus a non-strongl

feasible schedule wil not lead to a full feasible schedule.

By the above constraint, the search is confined onl to thou vertice with Strongly

feasible schedules. However, in the worst cmn an exhaustive search may Still be required,

which is c rm;uat!o l intractable. In order to mke the alorim coPutationaly

tratable, eve in the wort ase, we choose only one of the vertice at each level to

expand the search tree. The vere chose is the one which appean to be most cap"bl of

leading to a ful feasible schedul. It is in this choice that ouralorthm poides a way of

aISVely guiding the search toward a plausible path a feature that distinguises our

.5 . .*Z.k.*% **.. *. . .. .- ',-. % . *.* %- *11

Page 30: Ehj hENhhE - DTIC · U SARY ~tMUNCAI~lSELECTRONICS C HeMAND FORT MONMIOUTH, NEW JERSEY 01103-. HISAF-1566,. S - ~ .-..-- .- ..-- 11.-- - aiT -. T' -. ka* Table of Contents 1.0 Introduction

apnaoah from thoe of others. In the next mibection, we discuss our algorithm that

incoIporat h te heuristics necessary to make this choice.

3.3 Mle Scheduiing Mgothm

The pineudo code for. our heuristic scheduling algorithm is given in Fig 1. Beginnng

with the empty schedule, the algorithm searches the nect level by expanding the cu-rent

vertx (a partial strongly feasible schedule) to only one of its immediate descendants. If the

-immediate descendant s also a strongly feasible schedule, the search continues until a full

feasibe schedule is met. At this point, the searching procs (La., the scheduling process)

succeeds and all the tasks are known to be guaranteed. If at any level, a non-strongly

feastibe schedule is met, the algorithm announces that the searching (scheduling) process

fails and that not all the tasks can be guaranteed. It is possibk to extend the algorithm

to continue the search even after a failure is found, and this extension is discussed in

Section 5.

.- o .

'*e. * .* ' - ~ ' * ' *

Page 31: Ehj hENhhE - DTIC · U SARY ~tMUNCAI~lSELECTRONICS C HeMAND FORT MONMIOUTH, NEW JERSEY 01103-. HISAF-1566,. S - ~ .-..-- .- ..-- 11.-- - aiT -. T' -. ka* Table of Contents 1.0 Introduction

* PRCEDURE dh~aks t tk-type; VAR schedule schedul..tYPe);

(Yarameter task-set is the given set of tusk to be schedule 0)* (sFunction H is the heuristic function being discussd in 3A*)

BEGINschedule: empty;WKlLS NOT empty(task-Me) DO

BEGINcalculate EST7 and New-EAT for each task in task-set;calculat DRUR;IF not strongly-feadileschedule) THEN

returu(not guaranteed)ELSEBEGIN -

apply function H to each task in the task-set;let T be the task with the minimum value of function H;-task-set: task-set T { T)schedule :-schedule + {T 1;EAT :-New-EATT)

*END;

Fig I1 he Heuristic Scheduling Algorithm

Clearly, at each level of the search, effectively and correctly identifying the

Immeiatedescendant is important for the mcca of the algouithmn. This is the core of

the algoithm. We construct a heuristic function named H to help in the selection poes

* At each level, function H is applied to all the tasks remaining to be scheduled. The task

* with the minimum value returned by function H is selected to extend the schedule. The

nam subsction dcussfunction H in deta

".

-..---. :.:Vr. - - td-tp, A Id * *%* : .dul.ty '); *_= .

Page 32: Ehj hENhhE - DTIC · U SARY ~tMUNCAI~lSELECTRONICS C HeMAND FORT MONMIOUTH, NEW JERSEY 01103-. HISAF-1566,. S - ~ .-..-- .- ..-- 11.-- - aiT -. T' -. ka* Table of Contents 1.0 Introduction

.14-

3A The Heuristic Function

Funoction H is defined as follows:

HM )W XM + W 2 X 2 )+ W 3 X3M)

where T is a task, W19 W2 and W3 are weights and

L. X, takes into account the resource: requirements of T as well a the resnoce

utilizaios we will further develop X, later.

2. X2equas thelaxity of task T, and henceis given by

i~ i

-.CI DM - (E-M.+ C

Now, e furter elaborteo th•irtpat'ffn-in-.--idfne s

whaes. t wnds frqe ud Cro T) Di s the Dtnmi ouf c UtTzainRai

3.

Not dim if W• and +W2 ar zer an W3 1, the the -ihth es

lhmJis bu Wask ad, W3 and zero the taskan:"

nete of ia ~on the sceuigplcsa rop.reqHoweern df t d= weigts ae pouly

.

choseiwe ind tha fcion H deves efect setetio. inforat.on

Now we etrhua eloat the fis a of hk T. iod hence is define am

where 0.TT mods ' for dtv Tour DRU b the avani aore:Uilaities Raof -'

reo wcsith wtnheqm~m y he€mnmio im f

aputati time C wil bepstial heir s efine- In sctio nd 3.1 DRP bo the ts.:'-.,

Aftvwm dk Peaw

Page 33: Ehj hENhhE - DTIC · U SARY ~tMUNCAI~lSELECTRONICS C HeMAND FORT MONMIOUTH, NEW JERSEY 01103-. HISAF-1566,. S - ~ .-..-- .- ..-- 11.-- - aiT -. T' -. ka* Table of Contents 1.0 Introduction

The Dynmw Resource Idle Facto, DRE, is a function of the task being considered

for epanding the cmoen feasible schedule. It Mcic the amount of dine each resuce

would remain Wle if the task is selected nut.

Bde formally definin DRIF, we disms three different types of ldlem Consider

the zmpl in 31 aga: In that example, EAT (5, 10, 25, 15, 10, 15, 5); a task T

remnaining to be scheduled has C(T) -10 and ned R,. R.. and R,. Therefowe, ESrM~

-10 and N -EAT- (20,20,25,1,20, 15, 1 We use a grap show in Fig 2 to

indicate EAT, New-EATM as well as different idle time:

R Ra 4 R5

nmm10 UUUU - NNNN NNNN - NNNN U=

UUUU UUTUU NNN NNNN UUUU NNNN nflIUUUU UUUU t'NNrN NNNN UUUU NNNN mm

15 UUUU UUUU NNNN - UUUU -N -

UUUU UUUU NNNN Q00 UJUU 0000 0000UUUU UU'U NNNN 000 UUUU Q0 0000

20

25

%V

EAT New-EAT

Fig 2 : EAT, New-EATM and Idle Times

Page 34: Ehj hENhhE - DTIC · U SARY ~tMUNCAI~lSELECTRONICS C HeMAND FORT MONMIOUTH, NEW JERSEY 01103-. HISAF-1566,. S - ~ .-..-- .- ..-- 11.-- - aiT -. T' -. ka* Table of Contents 1.0 Introduction

.16-T

Task T uses , R2, ad ts In the area marked MU'". T oe dae thu - marked

Or, "Q" and "N indicat three different types of idle dme.

L Tw am marked "r is the idle time oft 1amd 1r No ask =a utlsis im

in the fture if T is scheduled naL. Therefore ddsindicates d. dt is wuaad If

T is scheduled next.

2. The area marked "W is the time task T may nn in parullel with some oher

task. For example, snce R3 becomes available ol at due 25 then some task my be

usin until that time. Hece by sheduln T ,eat, ther is possible parallelism

betwe T and the task using R3 . That is,the area indicated by "N" is, in omie

sense, nqadw idle time.

3. The Idle time indicated by 'Q could be used or waed depending on the

asks selected later. For example, if the next task needs R4 and R11 then the time ,-','...

areas marked by 'SQ under R, and R. will be used. However If the next task needs

It, 4 and 1t then the areas marked by 'Q' will be wasted idle time.

By the above example, it is cear that the three different idle times should be taken into

account differently because they have a different impact on the system. We define

DRW(F) DRIF .IM) + DRT.NM + DRUF-Om

where DRIF-1, DRXF-N, and DRIF-Q represent the thre types of idle times on resouces.

DRW-I corsponds to the "r' idle time on each resource, and is defined as

IDRW.1(T) I

tDDR..I , .

.,',. ; .. , .. . .-.. . .:. . . ,•. ./-."*.. ..- _, .,.. .•.*'.*. ; _._..". _*..--*.

Page 35: Ehj hENhhE - DTIC · U SARY ~tMUNCAI~lSELECTRONICS C HeMAND FORT MONMIOUTH, NEW JERSEY 01103-. HISAF-1566,. S - ~ .-..-- .- ..-- 11.-- - aiT -. T' -. ka* Table of Contents 1.0 Introduction

m~orl-1,,r

where frI - 1, ..,_r

DRIW;T) -I"

New-EATIM - EAT 6199.

Recall that ESTT is the time Task T can begin to use RI, and that EAT tells us when

Rt is available. Then the difference between ESr(T) and EAT, is the wased il time on

1t if T eeds R. Howev, evm if T does not need a resoce 1 , R, may be idle if R

is pasive and its EAT, is Iess than that of any active resource, such as R,7 in the example

of Fig 2. The secod case of the formula computes this wasted idle time.

DRIF-N indicates the negadve idle times on resources, and is defined as

DRIF.N2(T)

I DW-Nm I

LDRW-NmJ

where for i - 1, _., r

f 0 if T needsRi,I or EAT < ESTM,

DRWF-Njm -

- M(EAT, - sM(T), C) etse;

The firs case indicates that there is no nqave idle time for a resource if T needs it, or

if it is available before T runs. The second case computes the negative idle times for a

resource which is not available at the time T executes. Its negative idle times is defined to

be the portim of time, in which the resource is not available while T is running. For

ezample, in FI' 2,R R and R. have the followingnegative idle times:

DRIP-N 3 - MW4(EAT3 - ESTCI') CMI) - -M(l, 10) -- 10, and

DRIF-N4 - - MIN(EAT 4 - ESTm, C(M)) - - MIN(5, 10) - - S.

.,..4.*.* i . ,". . ."*,""*"d ,l -""* "P ", " "*"."°,"* o *""-.,, ,° 4 """. . "' "*.°"" -" ."-" .r - ' .""" . -,""* -%- - -""* - *',4. *'.-" * " - - .%.

Page 36: Ehj hENhhE - DTIC · U SARY ~tMUNCAI~lSELECTRONICS C HeMAND FORT MONMIOUTH, NEW JERSEY 01103-. HISAF-1566,. S - ~ .-..-- .- ..-- 11.-- - aiT -. T' -. ka* Table of Contents 1.0 Introduction

- 18-

DRI-Q is deigned to reflect the "Q' Idle times:

fDRIF-Q1CI)IDR DRW-Q 2 ( M

DRW.QDR)-j :

where for i -1, -, r

0 N Tne s 1 ,oatEAT > ESTr) +CM

DRW-( - IW,( EST(T) + CM - New-EAT(T) ) else.

Th h i no *Q* dle time for a resource f it needed by T, or f it unavaable

during the execution of T. This is the first case in the above formula. In the example of

Fig 2, RI, R2, R3 and R a have idle times equal to zero. The second case deals

with resources that are available during the execution of task T. The time duration

between the time the resource is available, New-EAT, and the time T completes, (ESTr()

+ CMI)), is the NQ idle time. Because it is not certain whether in this duration the

resource will be used or wasted, we multiply it by a factor W. which we choose between 0

and 1. For all the tWks presented here WO -0.5.

Then DRIF for task T in Fig 2 is Sives by

DRIFF) - DRI-I") + DRI-NM + DR1IF-Q(')

0 0 0 00 -10 0 -10

- 0 + -5 + 2.5 - -2.50 0 0 00 - 5 2.5 -2.5

t 10 0 2.5)1 2.5)

Page 37: Ehj hENhhE - DTIC · U SARY ~tMUNCAI~lSELECTRONICS C HeMAND FORT MONMIOUTH, NEW JERSEY 01103-. HISAF-1566,. S - ~ .-..-- .- ..-- 11.-- - aiT -. T' -. ka* Table of Contents 1.0 Introduction

Rom"l that X, DRUR 0 DRWF, and DRUR reflecthe doere of rsuc

utilization by the tasks remaining to be scheduled. The dot product means that we weight

* each DRIF1 by DRUR1i, and sum them. Therefore, X, acrually is a sum of weighWe

reswc Wde duies.

To smammuize, the heuristi function has been designed to incorporate not only the

necessary timing cormiderations but also reource utilizatloaL The simulation remits shown

* in the next section indicate that it does work quite well if the appropriate weights W,, W2

and W3 are used.

Page 38: Ehj hENhhE - DTIC · U SARY ~tMUNCAI~lSELECTRONICS C HeMAND FORT MONMIOUTH, NEW JERSEY 01103-. HISAF-1566,. S - ~ .-..-- .- ..-- 11.-- - aiT -. T' -. ka* Table of Contents 1.0 Introduction

ZT-2U ZF W-. W .- 77- V7-. - i.

The purpose of the simulation Is to tont the performance of the algoritm. Recall

ht the besic futon of the algorithim, as deecribed in Secd=o 2, is to determine: a funl

feasbla schedules for a give set of tasks. In each imulation, we input a number of anw of

tasks to the local scheduler program. For each of the input task sets iz is known emctly

bow nmn feasible schedulaesist and that each in has at lea one feasibkle shedule

because we pesfaim a separate ezhaustive search procedure on each sat of tasks. We then

obme the percentage of task sew guaranteed by our heuristic scheduling algorithm. MWi

L permmgais called the acew ratio of the algorithm.

4.1 TSAs Generator

U.MTh Task, Generator is a program that generates tasks for our simulation, study. it

uses thre generating parameters

* 1L PL- minimum computation time,

2.P2: maximum computation time, and

3. 7S: maximum laxity.

L The computation time of a task is randomly chosen between PI and P2. The deadline

of a task is rndomly chosen between iws computation time and the computation tim Plus

P3. Itis clear thtdifferent application domains will require different generating parameters.

L0

Page 39: Ehj hENhhE - DTIC · U SARY ~tMUNCAI~lSELECTRONICS C HeMAND FORT MONMIOUTH, NEW JERSEY 01103-. HISAF-1566,. S - ~ .-..-- .- ..-- 11.-- - aiT -. T' -. ka* Table of Contents 1.0 Introduction

L ..21 ..

We assume there as 5 resources, two active resources, and three pamlve remurces.

The resource equirements of a task are also chosen randomly with the condition that a

task uses at least one active resource.

In the current simulation, we collect 6 independent tasks to form a set. An

eshaustive search is made for each set to see how many full feasible schedules eist. For

a set of 6 tasks, there are 720 permutations, each of which may or may o repsent a

full feasible schedule for that task set. We purposly set up the generating parameters

used by the Task Generator so that the number of feasible schedules among 720

Spermutat~ons ually is very naun, maigit fairly difficult to find a feasible schedules.

Table 0 gives the distribution of number of feasible schedules for a typical group of 200

se of tasks. It dhws that among 200 task ets, hpt to the scheduler simulation program,

more than 55% of the task sets (14 + 103 - 117 out of 200) have at most 25 full feasible

schedule. And leo than 5% of the task sets (6 + 3 9 out of 200), have more than 100

full feasible Schedules.

NumberI I I I I IFeauibe Schedules 1 - 101 U- 25 26- S 51 - 100 101 -200 201 -720

NumberofTakS e 14 I10 I 561 1S 6 3

ftr, n of Se % 7.0 51 2..0I 9.0 3.0 1.

L - 30, P2 - 50, 3 - 100

Table 0 : The Distribution of Number of Feasible Schedules among a Group of 200 Sets

p.-o

5o,

* % % % " '% "% % % • % 5. ' .V **% * **-* *..' "'% " ""'.. . . . . .-. .-.. .L. -'." . . . . .. . . .. . . . . .."" "- " " .% " " "

Page 40: Ehj hENhhE - DTIC · U SARY ~tMUNCAI~lSELECTRONICS C HeMAND FORT MONMIOUTH, NEW JERSEY 01103-. HISAF-1566,. S - ~ .-..-- .- ..-- 11.-- - aiT -. T' -. ka* Table of Contents 1.0 Introduction

i .. %s.. V,'

-22-

4.2 Is rm Resuts and Observations

ThW famms of th heuristic algorithm is studied with the sets of tasks for which

the trek g..uawo has found at lea one full feasible schedule. Each simulation is done

with a Vmp of 200 task se. In the simulations, we study how the uJccua rato, ie., the

pum p ofguaranteed set, changes with the weights of the heuristic function H, as wen:

as Siuo. We bein Iy studying the performanc if onl one of the three factors in the

heuristi function is und in scheduling.

roup Number 1 (no chane)

Wh of

function H

W 0 0 1WZ0 1 0W31 0 0

Guaranteedson 24 29 25

SuccessRato% 22.0 145 125

P1-20, -40, PS-80

Table I : Simulation of an H Function with one Factor

Table I shows that, for a g v roup (group number 1), the scheduling polices --

coywaupomndang to the 'minimum oniputation time first, "least la3it Bm~ and "least

weighted moMCe idle time fi" are not effective. That is, when (W, W2, W3) - (0 0 1),

(0, 1, 0), o (, 0, 0), the success rato is lower than 20%. However, for the same group

a in Table 1, if we tue all three weights and popery tune them, the mm ratios can

be a high as 80%. This nult is shown in Table 2.

Page 41: Ehj hENhhE - DTIC · U SARY ~tMUNCAI~lSELECTRONICS C HeMAND FORT MONMIOUTH, NEW JERSEY 01103-. HISAF-1566,. S - ~ .-..-- .- ..-- 11.-- - aiT -. T' -. ka* Table of Contents 1.0 Introduction

-23-

Group Number 1 (no change)

Weights offunction H

W 0.20 0.20 032W2 0.26 0.20 0.21 .

3 020 020 0.16

GuaateedSets 148 152 162

success P

'Ratio % 74.0 76.0 81.0

P1-20, P2-40, P3-80

Table 2 : Simulation of Full H Function

Group Number 2 3 4 5 6 7 8 9Claranteed"-."

Sets 170 164 157 174 167 156 176 165

Ratio 850% 82.0% 78.5% 7.0% 83.5% 78.0% 88.0% 82.5%

PI-10 P2-30 P3-70WI"0"0 WM 0'36 W3 02t

Table 3 : 8 props with fixed generauing parameters and fixed weights

Table 3 indiates that with the fixed generating parameters, (PI, P2, P3) - (10, 30

70),and the fixed weights of fum iom H, (WI, W2, V)- (0, 036, 025), the success

ratio ,aries among 8 specific op tested from a low of 78% to a high 88%. The range

of percentages is due to the randomness of the task generaton, but the s=all standard

deviation of about 3%, indicates the stability of the scheduling algorithm. We believe that

78% . 88% is quite a good suces ratio. As we will see in Section 5, with some_I-

r..- .- .';../,,- -. ,. ,.- .- -.---. .. ,..,.........,.,....- .. , .-..... ,.... -.... -...... •..... . -,- . ,_.. . . .. ,.,.,'-,-.

Page 42: Ehj hENhhE - DTIC · U SARY ~tMUNCAI~lSELECTRONICS C HeMAND FORT MONMIOUTH, NEW JERSEY 01103-. HISAF-1566,. S - ~ .-..-- .- ..-- 11.-- - aiT -. T' -. ka* Table of Contents 1.0 Introduction

-24-

- entthe succes ratio can be increased.

Group Number 10 11 12 13 14 15

ParametersP1 30 20 10 20 20 10P2 50 60 160 40 100 30P3 100 120 300 7010 50

Weights offunction H

W, 035 0.28 030 0.32 0.24 0.260.25 0.8 0.9 025 0.18 0.20

w 3 0.10 0.23 0.10 0.16 0.14 0.14

Guaranteedes1"72 160 176 162 164 162

SumRatio% 86.0 80.0 88.0 81.0 82.0 81.0

Table 4 Good Weights for 6 Groups

Table 4 lists the best mcc ratios for an additional 6 groups, each of which is

generated by different parameters. e bet meca ratio for each group is achieved by

tuning the weights of function H. We see that in order to achieve the ben mxce ratio,

the weights vary with groups, Le., WI varies between 0.24 and 0.35, W2 varies between 0.18

and 025, and W3 varies between 0.10 and 0.16. It is dear that a set of universaly best

weights do not exist. However, we see that the range of the weights is not very large,

g m gsting that there may be a set of feasible weights which can cover adequately many

groups with different generating perameter. To substantiate this point, we average the

weights W , W2, and W, in Table 4, and re-use them for the same 6 groups shown in

Table 4. Table 5 presents the results:," *

Page 43: Ehj hENhhE - DTIC · U SARY ~tMUNCAI~lSELECTRONICS C HeMAND FORT MONMIOUTH, NEW JERSEY 01103-. HISAF-1566,. S - ~ .-..-- .- ..-- 11.-- - aiT -. T' -. ka* Table of Contents 1.0 Introduction

-25 -

Group Number 10 U 1n 1n 14 z

Pi 30 20 10 20 20 10

P3 100 120 300 70 100 50

Weights offunction H

0. 029W2 021 no change)

W3 0.32

Guaranteedsea 1O 160 170 4M 160 161

Ratio% 85.0 80.0 85.0 795 10. 80.5

Table 5 .Using the avenged weights

With a fixed set of avenage weights we obtain an avenage success ratio of more than

80% with a standard deviation of only 2.50/. Tlie results imply that though a set of the

universally best weights do not e.st, omoft of feasible weights may over many diffent

* pgoups; with different generating parameters Therefore it nems that the weights are not

too sensitive to the generating parameter

Although the simulation results presented in this section are only for a limited

number of gops with a limited number of different genering parameters, we have tested

many other groups with many different generating parameters. In all cases, the results are

* quite similar. Due to the lack of space, we are unable to present these additional

simulation results hers. We would, however, like to point out that them simulation results

were in consonance with the observations made above.

... * ".'*.in,".- *~s*****, *,* .<-'.::. . " N..:..: .'L

Page 44: Ehj hENhhE - DTIC · U SARY ~tMUNCAI~lSELECTRONICS C HeMAND FORT MONMIOUTH, NEW JERSEY 01103-. HISAF-1566,. S - ~ .-..-- .- ..-- 11.-- - aiT -. T' -. ka* Table of Contents 1.0 Introduction

026-

5. Exteon on the Basic Algorithm

In this section we describ, an extemision to the basic heuristic scheduling algorithm

disettsed and evaluated in the preious sections

5.1 Extended Al-ithm

The amnptiozs, underlying the we of the heurinic function m. the basic algorithm

are

1. At each level of the search, there is. certain ardar among the tasks to beselected-

my -

hough the first amumption is definitely true, the second may noe always hold, so

* out original algorithm cannot always guarantee a set of tasks for which there is at lam

on. ful feasible schedubl To improve the aicmratio, the following Means were

L add some non-linear components to functio H;

2. change the weights of function. H dynamically;

3. whenever a partial non-suong feasible schedule is met while scheduling, try to .-

backtrack.

Though the first two alternatives are mor mathematical than the third, we did not adopt

them the fim increas the computation cost on every computation of function H,

., ; .... *.**.. °*.*:*t,

Page 45: Ehj hENhhE - DTIC · U SARY ~tMUNCAI~lSELECTRONICS C HeMAND FORT MONMIOUTH, NEW JERSEY 01103-. HISAF-1566,. S - ~ .-..-- .- ..-- 11.-- - aiT -. T' -. ka* Table of Contents 1.0 Introduction

.. .- .. .~ . . . . . -

-"27-o;-.oo

and the second could make the algorithm too complu. rhe third method was adopted

becam we made an interesft observation from the log files of the primary algorithm

rum If, at the point where a non-strong feasible schedule as met, the task with the

second minimum value of the function H was selected instead of the minimum one, more .

than half of the task sets that were not scheduled by the primary algorithm become

scbedulabie. Moreover, a majority of the remaining task sets failing to be scheduled

become schedulable if we backtrack to an ancestor and select the task with the second

minimum value of function H at that level, instead of the minimum one. That is,

function H not only tells us which is the best task to be selected, but also gives .

information about which one is the next bes if the best does not work.

With this obseraon, the primary algorithm, given in Fig 1, is eended in the

following way: Each scheduled task has a pointer to the task with the second minimum

value of function H, and it also records the old EAT values before it is scheduled. This is .*.

done so that the "second pointer" and old EAT values may be used by possible future

backtracks without re.calculations at that level. Each time a non-smgly feasible schedule

is found, a subroutine, called the Limited-Backtracker, is invoked to

L withdraw the task just selected and added in the schedule, 1 and instead attempt

to schedule the task with the second minimum value of function H;

2. if the first stop does not succeed, that is, the schedule is still non-suogly

feasible, recursively backtrack to the immediate ancestor and attemTr " schedule the

task with the second value of function H at the ancestor level. Whenever a strongly

1. Note that the schedule Is feasible, but not strongly feasible, therefore the task ,..*withdrawn can be guaranteed, but some others will not.

Y? ; -o5

Page 46: Ehj hENhhE - DTIC · U SARY ~tMUNCAI~lSELECTRONICS C HeMAND FORT MONMIOUTH, NEW JERSEY 01103-. HISAF-1566,. S - ~ .-..-- .- ..-- 11.-- - aiT -. T' -. ka* Table of Contents 1.0 Introduction

. ..,..

o28- __.

feasible schedule is found, the Limited-Backtracker Ietus "cce" to the caller, the

sheduler priogam. Otherwise, it continua the recursive backra un ither it has

backtracked to the root of the search tree - the empty schedule, indicating that all

the ancestors have been tried; or until a counter, which counts the number of

backtracks in scheduling this task set, reaches a preset upper bound. In these cases,

the Limited-Backtrac returns "failed". -

The pseudo code of the algorithm for the Limited..Backtracker is shown in Fig 3.

We call the first step in the Limited-Backtracker a pseUd backtrack because it happens at

the current search level and function H is not recalculated. The snd ste Is cale re

backxrack. Real backtracks do increase the computation cost because they reuires the

recalculations of function H at (all) the level(s) (n search three) immediately below the

vertex in which the real backtrack succeeds.

Note that, if in the Limited-Backtracker we did not limit the number of real

backtracks, then in the worst case, the search process might eventually expand two vertices

from each ancestor, resulting in a computation time proportional to 2, where n is the

number of tasks.

. 4. .. . .

Page 47: Ehj hENhhE - DTIC · U SARY ~tMUNCAI~lSELECTRONICS C HeMAND FORT MONMIOUTH, NEW JERSEY 01103-. HISAF-1566,. S - ~ .-..-- .- ..-- 11.-- - aiT -. T' -. ka* Table of Contents 1.0 Introduction

K. 29- H

P rcedure Uinintd.B ,ktracker(VAR. tak-M task-sype; VAR schedule duletpe); -

T (' e-Bcmce is called by the schedule when the (partial) schedule bs foundnon.trY fesibdb. T-skut contains the tasks remaining to be scheduled.cheu is the non-sroag l a d e. schedule

BEGIN

(*firs, we dothe psuobw&k*k)le T1 be the lan task in the schedule,remove T from the schedule;let 12 be the task with the second H value pointed toby the ecod pointm" of Tl;task-u :- task-u + fT1" - {'2;put 12 at the eand of the schedule;IF ,toly-feasible(scbedule) THEN

('the real backuack starts*)WHILE NOT empty(schedule) and counter < max-count DO

BEGIN(*withdraw from the end of the schedule all the tasks

with a second minimum value of function H.This kind of tasks have their -second pointer- nil).*

REPEATlet TI be the last task in the schedule;remove T1 from the schedule;,task- .'- task-u + { TI };

UNTIL Tis "second pointer" < nil;

EAT - old-EAT stored with T1;

let 72 be the task pointed by Ti's "second pointes";task-et - task-st - '2);put 72 at the end of the schedule;

if sogly.f shedue) then

counter .- counter + 1; ;-:

END(WHH.Ej;.

Fig 3 : The Algorithm of the Limited-Backracker

• .'o

Page 48: Ehj hENhhE - DTIC · U SARY ~tMUNCAI~lSELECTRONICS C HeMAND FORT MONMIOUTH, NEW JERSEY 01103-. HISAF-1566,. S - ~ .-..-- .- ..-- 11.-- - aiT -. T' -. ka* Table of Contents 1.0 Introduction

5.2 S~mlatomStudioa n the ExtendedAiotbL.

The resuso iumuations for tne uanamo umeoulig algorithm are shown in Table 6

ad 7.

Group Number 20 (no chang)

PI 30 (nochang)kP2 60Ps 100

Weights offunction H

0.20 0.26 024W0.28 0.20 0.20

-020 0.16 0.14

ate% 72.5 77.0 81A0at, % 90.0 94.5 9535SR2 % 95.0 98. 993

Miz Redl6 7 6

SR% : the basic sauccs ratio without any backtrackSR2 : the success ratio without any real backtrakSR2 : the succsm ratio with and real bac.tracks

Table 6 Simulation imulats of the Scheduling Algorthm with Limited aracking

From Table 6, first, we can see that though the success ratios without backtracks

* (SRO) vaie with different set of weits from 72.5% to 81%, usimi pseudo backtacksa

M= rio (S) of betwme 90% and 95% milts. Te final =cc= ratio with peudo:

and backtrac ( ) is no 1mm than 95% and ca be a high a 993%. Thus, though

he scheduling costs Inese with the uoe of backtrackng, the smcm ratio inamus

mhoadal-.

mslO:'

Page 49: Ehj hENhhE - DTIC · U SARY ~tMUNCAI~lSELECTRONICS C HeMAND FORT MONMIOUTH, NEW JERSEY 01103-. HISAF-1566,. S - ~ .-..-- .- ..-- 11.-- - aiT -. T' -. ka* Table of Contents 1.0 Introduction

-31 -

Secondly, we may notice that this simulation is oam group with thre fairly differet

set of weights. In all thum case, the final meccea ratios are surprisingly high. This

indicates that with backtaking, tuning of weights is law imortant than in the primary

algorithm. This ta because backtrackting is more resilient in the sense of allowing wrong

* choices to be rectified.

Table 7 lisa the results of simulation with a set of fixed weights for 5 differet

groups over a range of generating parameters We observe that with limited backtracking, a

* -et f cmmonweihtsis nt oly easble, but is also sufficient. The succes ratio is

higher than 96% if limited backtacks use allowed.

Group Number 21 22 23 24 25

GeneratingParameters

PI 20 30 20 20 s0P20s 50 60 120 200

P3 70 100 80 150 300

SRO % 81.5 75.0 82.5 77.5 72.05R1 % 96.5 90.0 91-5 94.0 '92.5SR% 99.5 97.5 96.0 99.5 98.0

Max ReaBacktrack 2 7 II 5 5

SR, SR ,and SR2 have the sme meaninsas inTable 6W =0261 ' 2 =0.20, W 3 -=0.14

Table 7 :On. Set of Weights for Different Groups

Tables 6 and 7 also lit the maximum numbers of real backtracks used for each

Stou of 200 task sets. Note that usually no more than 10% of task sets, (SR2 . SL

'use real backtracks The numbers of real backtracks used by those task sets often an very

sm.alL Tables 6 and 7 indicatie that eve the maximum number of real backtracks for a

Page 50: Ehj hENhhE - DTIC · U SARY ~tMUNCAI~lSELECTRONICS C HeMAND FORT MONMIOUTH, NEW JERSEY 01103-. HISAF-1566,. S - ~ .-..-- .- ..-- 11.-- - aiT -. T' -. ka* Table of Contents 1.0 Introduction

.32-

p~ap usually ii hum thaa 10. Thus, the use of the extmded algoilthm with limiteddoes ww~ inifease thA uchednilno ~g annr~nhIv

backtracking ~ - -

~:-

* V

4

a.

-a

* *1*

a.

-a

'I

'IN

I, AI *

S.

'I

Page 51: Ehj hENhhE - DTIC · U SARY ~tMUNCAI~lSELECTRONICS C HeMAND FORT MONMIOUTH, NEW JERSEY 01103-. HISAF-1566,. S - ~ .-..-- .- ..-- 11.-- - aiT -. T' -. ka* Table of Contents 1.0 Introduction

*- 677.- Wim.z~ 71n Od7 7t

In this secton we disuss the dm ccmplnity of the algorfthm, propose several

metrics of aptimality, and Molstrate bow weal our algrthm performs in teMM of thes

6.1 Time Cmlzt

The major computation happens at the calculations of function H. Each calculation of_

function H takes time proportional to r. Function H is invoked (2 1 (1-1. .. , a)) times,

resulting in the total time comnplexity of mn2 . Pseudo, backtracks do not increase the

comuttioalcomplexity. However, the computation coan increased by ral bwAktcks

cannot effect the total complexity, so long as the upper bound of real backtracks is pre-set

to lees than n2. Out siuluation results in Section 5 showed that the number of real

backtracks was usually quits low. The time complexit n2 of our heuristic scheduling

algorithm is fairl low compared to that of a exhaustive swatch algorithmn which takes

tie proportional to rnL

6.2 Opd=aity

Belove dlscuulag optimality, we need to chose some metrics suited for hard real-ime

enviroummnts. For a full feasiblie schedule we proos the following metrics:

L. Took Set Cop~au Th..: This is the tim when, according to the full feasible

siedmals, all tWks ca be completed. Thus it reflects the Wsst respose time.

Page 52: Ehj hENhhE - DTIC · U SARY ~tMUNCAI~lSELECTRONICS C HeMAND FORT MONMIOUTH, NEW JERSEY 01103-. HISAF-1566,. S - ~ .-..-- .- ..-- 11.-- - aiT -. T' -. ka* Table of Contents 1.0 Introduction

.34-

2. Amq wWen ifredo o resmwcor This is the aerage of resource utilization

rtos o the tu In the fogi feasible schedule. This Is one of the traditional metrics

* ~of opemaliy for sebedulilag algoris.

3. Amq.p Lmby : I& is defind as the average of the differences between

deadlines and schedule completion times of all tasks In the full feasible schedule. This

is a metric indicating the &arage la3it of completed tasks.

1. 4. Mirdmur lexisy IlTe mainimum of differences between deadlines and scheduld

completion times of all taks in the full feasible schedule. We can postpone executing

tasks by this amount so that a newly arriving task may be executed before them.

For each set of tasks input to the scheduler simulation program, using exhaustive

search, we calculat the fllowing:

L. the values of the four metrics for each permutation that represents a feasible

* ~ F Wihde; and

2. the optimal, average, and worsn values of each metric among all permutations

*representing fealAs e~ues.

With reipect to each metric, the full feasible schedule determined by our exteded

* heuristic algorithm is ranked. as follows:

L. qibua, if its performance under that metric is equal to the optimal one found

abK

2. Sood, Nif ts performance Is worse than the optimal but bette than or equal to

the average value

Page 53: Ehj hENhhE - DTIC · U SARY ~tMUNCAI~lSELECTRONICS C HeMAND FORT MONMIOUTH, NEW JERSEY 01103-. HISAF-1566,. S - ~ .-..-- .- ..-- 11.-- - aiT -. T' -. ka* Table of Contents 1.0 Introduction

- . o . .o,

.35.

3. pow, if its performance is wors than the average, but bmtr than the wont;

4. w , it its performance is equal to the worst

In som cases, the optimal and wonst values of a metric for a sat of tasks am equaL

Then, I the scheduler guarantem the set of tasks, tie full famie schedule will have the

sme value of the metric as the optimal as well as the wot one. Such a full feasible

schedule is, termed opma,.

Simulation results for one group of 200 st of tasks are shown in Table 8. In that

simulatlon, the final sccem ratio is 9U%, therefore total 197 sm of asks are paranteed

and their full feasible schedules are ranked accordmg to the optimality metrics above.

opimal optimal good poor worntSetCanpletinme 137 25 6 7 22Average Utilization 97 15 80 4 1Average Laxity 42 37 45 45 28Minimum Laxity 94 85 3 6 9

P1- 10 W -0.36 Inputsetsoftasks -200P2- 30 W2 - 0.25 Success Ratio% -98.5PS - 70 WC0. Compa sdM oft M s 197

Table 8 : Comparisons of Optimal-ties

Frmm Table 8, we see that the full feasible schedules found by the scheduler are

optimal or close to optimal most of the time. For ample, using average resource

utilizadon a metric, we found that in 97 + 15 - 112 Icas out of197, our alo.r.hm-.-'. .

found the optimal solutions, and anothe 80 out of 197 are dos to optimal (dia is, god).* ,S..,. .

Simulations and "compaisons made for many other groups had simifar isult. We believe

that e resulmt indate that by developing a good heuristic function and tuning the

War=w poely one can upset atrumely good results from this approach.

*................,

Page 54: Ehj hENhhE - DTIC · U SARY ~tMUNCAI~lSELECTRONICS C HeMAND FORT MONMIOUTH, NEW JERSEY 01103-. HISAF-1566,. S - ~ .-..-- .- ..-- 11.-- - aiT -. T' -. ka* Table of Contents 1.0 Introduction

.36-

The problem of determinn an optimal schedule is known to be NP-ard (GRAH79J

and is hence: impractical lfo reakimO task scheduling. 1-AS problem is further compliated

when, in addition to computation times and deadlines of tasks, their resource requirements

are also, accounted for.

In this paper, we described a heuristic approach to solving this problem. The crux of

our approach Haes in the heuristic function used to select the task to be scheduled next. It

uses information about tasksr real-time constraints and resource utilizations Simulation

studies showed dian the weights for the various factors that affect the scheduling decisions

have to be fine-tuned in order to obtain a degree of mcescomparable to that obtained

via exhaustive search. However, use of limited backtracking, whereby in case of a failure,

previous scheduling decisions are rescinded and new decisions are made, was observed to

improve the degree of success substantially. This improvement was observed even, when the

initial set of weights were not tailored for a particular set of tasks. Simulation studies also,

showed that in mg cases the full feasible schedule determined by the heuristic algorithm

was optimal or close to optimal

Given that the heuristic approach to task scheduling with resource constraints has

been highly successful, we plan to incorporate it in our distributed scheduling algorithm.

This will involve extensions to the basic bidding technique [RAMAS4]. In particular,

modifications have to be made regarding the information that is sent on bids so that a

requesting node can evaluate bids and determine the best bidder.

Page 55: Ehj hENhhE - DTIC · U SARY ~tMUNCAI~lSELECTRONICS C HeMAND FORT MONMIOUTH, NEW JERSEY 01103-. HISAF-1566,. S - ~ .-..-- .- ..-- 11.-- - aiT -. T' -. ka* Table of Contents 1.0 Introduction

-37-

8. Rdefeces

[DER'r741 D rn~zu M., "Control Roboics The Procedural Control of Physical Procm"e,Proc. of dke IFIP Coviren, 1974.

[EFE] E.fe, Kemal, "Heuristic Models of Task Assignment Sche&ng in DistnibutedSys s, IEEE Cmaper, June 1982.

[GARE75] Garay, MIL and Jhnson, DS., "Compledty results for MultirocsorScheduling under Resource Constraints, StA Journ of Cmepiing, 4, 1975.

[GRAH79] Graham, RL. at al, "Optimbation and Ap iin Detemi.,-Sequencing and Se ng, a Sunr , Annals of Dcrete Mathematics, 5, 1979.

[OHN74] Johnson, H. H. and Madison, MS., "Deadline Scheduling for a Real-Tune._ MultIro~~cessor", NTIS (N7&..43), Springfield, VA, May 1974.

[LEINS0] Leinbaugh, D. W., "Guaranteed Response Tmes in a Hard Real-TuneEnvironment," IEEE Trwisact ion on Saf 'ware Engnerlng Vol. SE-6, Jan. 1M8.

[LEIN21 Leinbaugh, D.W. and Yamini, M., "Guaranteed Response Times in aDistbuted Hard-Real-Time Envionment", Proc. of the &.I-Th.. Systems Sypsiuw, Dec.

[LEN82] LeAnt, Douglas B., "Te Nature of Heurisic, Arhi" l Inteigece, 19 (1982).

[LENS3] Lenat, Douglas B., "Taeory Formation by Heuristic Search - le Nature ofHeuristics h- Background and Examples", Ardflcla Intellige e, 21 (1983).

[LU73] Uu, C. L, and Layland, ., "Scheduling Algorithms for Multiprogramming ina Hard Real-Time Environment," Journl of the ACM, Vol. 20, No. 1, Jan. 1973.

[WU]Z Ma, Richard P., Lee, Edward Y.S., and Tsuchiya, Masahiro, "A TaskAllocaion Model for Distmbuted Computing Systems", IEEE Trnsacdo on Compwers, VotC-31, No. 1, Jan IM8...--

.9'.

[MA84] Ma, Richard P., "A Model to Solve Timing-Critical Application Problems inDistributed Computr Sysem", IEEE Compiter, Jan. 1984.

[MOK78] Mok, AX. and Dertmo, Mi.., "Multiprocessor Scheduling in a HardRel-T Environment", Proc. of the Seeh Teas C*erewe on Conputing Systems, NovV97&

MU O Muntz, R. R., and Coffman, E. G., "Preemptive Scheduling of Real-TimeTLtPasks an ipcs Systems" Jo l of Mie ACM, Vol. 17, No. 2, April 1970.

PLAMAN4 Ramamrin , dW.thvan, and Stankovic, John A., "ynamic Task Schedulingin DilbUtmd Hard Real-Time Systm", Prceeding of t*h Intwena Caowfre mDisihuted Cavwwae Systems, May 194.

.'.* .. .. ..

%__. -. % .% '.% :..-....% .% *~%***% - %** * * %"~ %" ; %'-. .. *' . .... .,.,... h., ,. _

Page 56: Ehj hENhhE - DTIC · U SARY ~tMUNCAI~lSELECTRONICS C HeMAND FORT MONMIOUTH, NEW JERSEY 01103-. HISAF-1566,. S - ~ .-..-- .- ..-- 11.-- - aiT -. T' -. ka* Table of Contents 1.0 Introduction

-38 -

[SHOS41 Schoefflor, ID., "DistriUte Computer System for Industrial Procs Control,IEEE Computer, Vol 17, No. 2, Feb. M96.

DMEX78 Tebidra. T., "Static Priority Interupt Scheduling, Prof. of the Sevemh Tw* ~C.9erence on Computing Systema, Nov. 1978

Page 57: Ehj hENhhE - DTIC · U SARY ~tMUNCAI~lSELECTRONICS C HeMAND FORT MONMIOUTH, NEW JERSEY 01103-. HISAF-1566,. S - ~ .-..-- .- ..-- 11.-- - aiT -. T' -. ka* Table of Contents 1.0 Introduction

T -77 77- -

* 6.0 Distribution List

Defense Technical Information Center 2 copiesCameron StationAlexandria, VA 22314

Commander 2 copiesUSLERADCOMATTN: DELSDI-!Ln~SFort Monmouth, NJ 07703

Commander 1 copyUSACECOMATTN: DRSELrCOM-RF (Dr. Klein)Fort Monmouth, NJ 07703

Commander 1 copyUSACECOM ...ATTN: DRSEL-C0M--D (E. Famolari)Fort Monmouth, NJ 07703

Commander 10 copiesUSACECOMATTN: DRSEL-CM-RF-2 (C. Graff')Fort Monmouth, NJ 07703'

k.

da

Page 58: Ehj hENhhE - DTIC · U SARY ~tMUNCAI~lSELECTRONICS C HeMAND FORT MONMIOUTH, NEW JERSEY 01103-. HISAF-1566,. S - ~ .-..-- .- ..-- 11.-- - aiT -. T' -. ka* Table of Contents 1.0 Introduction

ytl I

.4~ M., ED<Y1, 4.'k.

r -

4 } ,, .

~At7

117

A71At-