140 likes | 179 Views
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)
E N D
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
t 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
Resource A Resource B Resource C 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 Resource B Resource A t
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
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: foreachu 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 */ }
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
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: foreachu 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 */ }
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
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
Constraint graph Hazard detection / Thd System health check / Thc Heat steer 1 / Ths Heat steer 2 / Ths Heat steer 3 / Ths Heat steer 4 / Ths Steer / Ts thc -ths -(thc + Thc) System health check / Thc Heat wheel 2 / Thw Heat wheel 3 / Thw Heat wheel 5 / Thw Heat wheel 6 / Thw Heat wheel 1 / Thw Heat wheel 4 / Thw Drive / Td - thw
Hazard detection (C) / Thc / Phc_C Hazard detection Health check (C) / Thc / Phc_C Health check Steer (C) / Ts_C / Ps_C Heat steer i (C) / Ths_C / Phs_C thc Heat steer i (T) / Ths_T / Phs_T Steer (M) / Ts_M / Ps_M -(thc + Thc) Heat steer i Steer Health check (C) / Thc / Phc_C -ths + Ths_E Health check Heat wheel j (C) / Thw_C / Phw_C Drive (C) / Td_C / Pd_C Heat wheel j Heat wheel j (T) / Thw_T / Phw_T Drive (M) / Td_M / Pd_M Drive Computation Mechanical -thw + Thw_E Thermal Resource specification
Primary resource: Computation Auxiliary resource: Thermal Auxiliary resource: Mechanical Health check (C) / Thc / Phc_C Hazard detection (C) / Thc / Phc_C thc -(thc + Thc) Steer (C) / Ts_C / Ps_C Heat steer i (C) / Ths_E / Phs_E Heat steer i (T) / Ths_T / Phs_T Steer (M) / Ts_M / Ps_M -ths -ths + Ths_E -Ts_C + Ts_M Heat wheel j (C) / Thw_E / Phw_E Drive (C) / Td_C / Pd_C Heat wheel j (T) / Thw_T / Phw_T Drive (M) / Td_M / Pd_M -thw -thw + Thw_E Scheduling graph