1 scheduling mapping of tasks to time slots computation communication mapping of power usage to...

13
1 Scheduling Mapping of tasks to time slots Computation Communication Mapping of power usage to time slots Mechanical devices Thermal subsystems Other electronics subsystems Constraints Real-time deadlines, periods, min/max separation Power budget, power surge (min/max) Potentially scenario-driven

Post on 20-Dec-2015

214 views

Category:

Documents


0 download

TRANSCRIPT

1

Scheduling

Mapping of tasks to time slots Computation Communication

Mapping of power usage to time slots Mechanical devices Thermal subsystems Other electronics subsystems

Constraints Real-time deadlines, periods, min/max separation Power budget, power surge (min/max) Potentially scenario-driven

2

Existing techniques

Deadline based real-time scheduling on single execution resource

Rate-monotonic scheduling Periodic events on single processor No event can overlap with others

Timing constraint graph scheduling Events bounded by timing constraints Serialize event sequences in a single

execution resource

t

3

Challenges

Schedule events on multiple execution resources

Rate-monotonic scheduling Events on multiple resources with

dependencies across resources Event on different resources can overlap

Timing constraint graph scheduling Multiple resources to execute events Timing constraints across different

resources Multiple serializable execution paths on

execution resources

t

Resource A

Resource B

Resource A Resource B Resource C

4

Constraint graph

Graph G = (V, E) Vertexes: v / (v)

Name: v, event identifier Weight: (v), execution time

Edges: v w / ev,w Positive edge v w, weight ev,w: min

constraint Negative edge v w, weight -ew,v: max

constraint

Scheduling algorithm Traverse all nodes in sequence -

serialize events on single processor Satisfy timing constraints - no positive

loop is allowed

5

Algorithm

Serialize(Graph G, anchor a, candidate c) {

La := Single source longest paths (G, a);

if positive cycle found,

return Fail ;

C := topological successors of candidate c;

if (C is empty )

return schedule with (v) = longest path from a;

D := C;

while (D not empty) {

v := SelectSuccessor(D);

B: foreach u C - {v} {

add edge (v, u) to G, with weight

evu = Max((v), La(u) - La(v)); /* delay all successors by at least (v) */

}

Serialize(G, a, v);

if (schedule found) return schedule;

Undo step B; /* else - positive cycle or backtrack */

} /* while */

return Fail ; /* no more candidates */

}

6

Extended constraint graph

Graph G = (V, E) Vertexes: v / r / (v)

Name: v, event identifier Resource: r, execution resource of the event Weight: (v), execution time

Edges: v w / ev,w Positive edge v w, weight ev,w: min

constraint Negative edge v w, weight -ew,v: max

constraint

Scheduling algorithm Traverse nodes of each resource in

sequence - serialize events on each execution resource

Satisfy timing constraints - no positive loop is allowed

7

Algorithm

Serialize(Graph G, anchor a, candidate c) {

La := Single source longest paths (G, a);

if positive cycle found,

return Fail ;

C := topological successors of candidate c;

if (C is empty )

return schedule with (v) = longest path from a;

D := C;

while (D not empty) {

v := SelectSuccessor(D);

B: foreach u C - {v} {

if (Rv = Ru) { /* add edge to events on same execution resource */

add edge (v, u) to G, with weight

evu = Max((v), La(u) - La(v));

}

}

Serialize(G, a, v);

if (schedule found) return schedule;

Undo step B; /* else - positive cycle or backtrack */

} /* while */

return Fail ; /* no more candidates */

}

8

Example revisited – Mars Rover

System specification 6 wheel motors 4 steering motors System health check Hazard detection

Power supply Battery (non-rechargeable) Solar panel

Power consumption Digital

Computation, imaging, communication, control Mechanical

Driving, steering Thermal

Motors must be heated in low-temperature environment

9

Timing constraints – Mars Rover

Operation Duration Timing constraintsHealth check 10 s Once in every 10-minute intervalHeating steering motors 5 sHeating wheel motors 5 sHazard detection 10 s Before steering

Steering 5 sBefore driving ALL four steering motors must be heated during the 50-second period prior to steering.

Driving 10 s ALL six wheel motors must be heated during the 50-second period prior to driving.

10

Scheduling method

Constraint graph construction Nodes: operations Edges: precedence relationship between operations

Resource specification Resource: an executing unit that can perform operations independently

Six thermal resources for wheel heating Four thermal resources for steer motor heating One mechanical resource for driving One mechanical resource for steering One computation resource for control

Operations on one resource must be serialized

Scheduling Primary resource selection Schedule primary resource by applying graph algorithms Auxiliary resources and power requirement are considered as scheduling

constraints

11

Constraint graph

System health check /

Thc

System health check /

Thc

thc -(thc + Thc)

Heat wheel 1 / Thw

Heat wheel 2 / Thw

Heat wheel 3 / Thw

Heat wheel 4 / Thw

Heat wheel 5 / Thw

Heat wheel 6 / Thw

Heat steer 2 / Ths

Heat steer 3 / Ths

Heat steer 4 / Ths

Hazard detection / Thd

Steer / Ts

Drive / Td

- thw

-ths

Heat steer 1 / Ths

12

-ths + Ths_E

-thw + Thw_E

thc -(thc + Thc)

Resource specification

Hazard detection (C) /

Thc / Phc_CHealth check (C) /

Thc / Phc_C

Heat steer i (C) / Ths_C /

Phs_C

Heat steer i

(T) / Ths_T /

Phs_T

Heat wheel j

(C) / Thw_C

/ Phw_CHeat

wheel j (T) / Thw_T /

Phw_T

Steer (C) / Ts_C /

Ps_CSteer

(M) / Ts_M /

Ps_M

Drive (C) / Td_C /

Pd_C

Drive (M) / Td_M /

Pd_M

Health check (C) /

Thc / Phc_C

Computation

Mechanical

Thermal

Heat steer i

Heat wheel j

Health check

Health check

Steer

Drive

Hazard detection

13

Scheduling graph

Hazard detection (C) /

Thc / Phc_C

Heat steer i (C) / Ths_E /

Phs_E

Heat steer i

(T) / Ths_T /

Phs_T

Heat wheel j

(C) / Thw_E

/ Phw_E

Heat wheel j

(T) / Thw_T /

Phw_T

Steer (C) / Ts_C /

Ps_CSteer

(M) / Ts_M /

Ps_M

Drive (C) / Td_C /

Pd_CDrive

(M) / Td_M /

Pd_M

-ths + Ths_E

-thw

Primary resource: Computation

Auxiliary resource: Mechanical

Auxiliary resource: Thermal

Health check (C) /

Thc / Phc_C

thc -(thc + Thc)

-ths

-thw + Thw_E

-Ts_C + Ts_M