the oasis model for developpement of deterministic safety
play

The OASIS model for developpement of deterministic safety-critical - PowerPoint PPT Presentation

The OASIS model for developpement of deterministic safety-critical multitask real-time systems Matthieu Lemerre CEA LIST LaSTRE (V. David) Synchron08 Aussois, December 5th, 2008 Matthieu Lemerre (CEA LIST) The OASIS model Synchron08


  1. The OASIS model for developpement of deterministic safety-critical multitask real-time systems Matthieu Lemerre CEA LIST LaSTRE (V. David) Synchron’08 Aussois, December 5th, 2008 Matthieu Lemerre (CEA LIST) The OASIS model Synchron’08 1 / 35

  2. Introduction OASIS is an industrialized toolchain (compiler, runtime kernel...) based on a time-triggered model of computation OASIS model : computations take time (no zero-time abstraction) Computations happens during intervals of time (not point in time) Use results of past computations (not that of parallel ones) Model still independent of execution time (used only for scheduling) Matthieu Lemerre (CEA LIST) The OASIS model Synchron’08 2 / 35

  3. Introduction OASIS is an industrialized toolchain (compiler, runtime kernel...) based on a time-triggered model of computation OASIS model : computations take time (no zero-time abstraction) Computations happens during intervals of time (not point in time) Use results of past computations (not that of parallel ones) Model still independent of execution time (used only for scheduling) Ψ is a language extension for expressing the time-triggered constraints of the model in a procedural language (e.g. C or Ada) Matthieu Lemerre (CEA LIST) The OASIS model Synchron’08 2 / 35

  4. Outline Timing Model 1 Specifying time-triggered constraints Example uses and use in OASIS Simple example uses Use in OASIS Scheduling semantics 2 Scheduling of chains Scheduling of trees Scheduling of automata Implementation 3 Communication primitives Implementation Conclusion 4 Matthieu Lemerre (CEA LIST) The OASIS model Synchron’08 3 / 35

  5. Outline Timing Model 1 Specifying time-triggered constraints Example uses and use in OASIS Simple example uses Use in OASIS Scheduling semantics 2 Scheduling of chains Scheduling of trees Scheduling of automata Implementation 3 Communication primitives Implementation Conclusion 4 Matthieu Lemerre (CEA LIST) The OASIS model Synchron’08 4 / 35

  6. Chains Notions Block Sequence of instructions, a b represented by an arc. Nodes Separates 2 blocks Chain Sequence of blocks and nodes. b runs after a . Matthieu Lemerre (CEA LIST) The OASIS model Synchron’08 5 / 35

  7. Temporal constraints Goal: to specify temporal constraints on a block 2 possibilities: to make it start after a certain date OR to make it end before another date b b b Matthieu Lemerre (CEA LIST) The OASIS model Synchron’08 6 / 35

  8. Temporal constraints Goal: to specify temporal constraints on a block 2 possibilities: to make it start after a certain date OR to make it end before another date We chose to make the adjascent b nodes bear the constraints: “before” nodes constraint the 5 preceding block b Matthieu Lemerre (CEA LIST) The OASIS model Synchron’08 6 / 35

  9. Temporal constraints Goal: to specify temporal constraints on a block 2 possibilities: to make it start after a certain date OR to make it end before another date We chose to make the adjascent b nodes bear the constraints: “before” nodes constraint the 2 preceding block b “after” nodes constraint the succeeding block Matthieu Lemerre (CEA LIST) The OASIS model Synchron’08 6 / 35

  10. Temporal constraints Goal: to specify temporal constraints on a block 2 possibilities: to make it start after a certain date OR to make it end before another date We chose to make the adjascent b nodes bear the constraints: “before” nodes constraint the 2 5 preceding block b “after” nodes constraint the succeeding block Matthieu Lemerre (CEA LIST) The OASIS model Synchron’08 6 / 35

  11. Temporal constraints Goal: to specify temporal constraints on a block 2 possibilities: to make it start after a certain date OR to make it end before another date We chose to make the adjascent a b c nodes bear the constraints: “before” nodes constraint the 1 5 7 preceding block a c b b “after” nodes constraint the succeeding block Lemma: constraint extension A block b is implicitly constrained by all preceding “after” nodes, and by all following “before” nodes Matthieu Lemerre (CEA LIST) The OASIS model Synchron’08 6 / 35

  12. Combining constraints a b c a b c = ⇒ Some constraints can d ′ ≤ d d ′ d be simplified 0 1 4 a b c Matthieu Lemerre (CEA LIST) The OASIS model Synchron’08 7 / 35

  13. Combining constraints a b c a b c = ⇒ Some constraints can d ′ ≤ d d d be simplified 0 1 4 a b c Matthieu Lemerre (CEA LIST) The OASIS model Synchron’08 7 / 35

  14. Combining constraints b = ⇒ Impossible or d ′ ≤ d d d = d ′ Some constraints can be simplified 0 1 4 b 2 3 0.5 Matthieu Lemerre (CEA LIST) The OASIS model Synchron’08 7 / 35

  15. Combining constraints a b c OK d ′ ≤ d Some constraints can d be simplified 0 1 7 a b c a b c Matthieu Lemerre (CEA LIST) The OASIS model Synchron’08 7 / 35

  16. Combining constraints = ⇒ d ′ ≤ d d d ′ Some constraints can = ⇒ (a) be simplified d ′ ≤ d d d Reductions ( a ) and = ⇒ Impossible or (b) ( b ) allows for relative d ′ ≤ d d d = d ′ labeling of constraints: OK d ′ ≤ d d Lemma (relative labeling) All constraints can be expressed as a stricly positive increment from the last “after” node. (In an equivalent, simplified automaton) Matthieu Lemerre (CEA LIST) The OASIS model Synchron’08 7 / 35

  17. From chains to trees: Handling choices either b or c will be executed. a b a → b has 3 unit of times to if complete 1 4 c a → c only has 2. 3 Important: Choice between b and c is done dynamicallly 0 1 4 And is known only after a ’s a b execution → Both choices must be doable until a finishes a c This is reflected in scheduling semantics (later) Matthieu Lemerre (CEA LIST) The OASIS model Synchron’08 8 / 35

  18. From trees to automata: Handling loops and joins b a Semantic of unfolding : “copy” of the traversed 1 1 c 2 tree = Must use relative a b c b c labeling to be useful 1 1 1 2 2 0 1 8 a b c b c Matthieu Lemerre (CEA LIST) The OASIS model Synchron’08 9 / 35

  19. From trees to automata: Handling loops and joins b d Semantic of unfolding : a c “copy” of the traversed = tree c d c d Must use relative labeling to be useful a a When both loops and choices: unfolding gives b b c d an infinite tree! Execution trace a = path in the tree = chain b Matthieu Lemerre (CEA LIST) The OASIS model Synchron’08 9 / 35

  20. Example uses a b 3 1 2 c 2 (a) Implicit-deadline periodic task (b) A periodic task (period 5). b is constrained with of period 2 fine-grained jitter specification (maximum jitter 1) ǫ ǫ 1 1 2 1 a b 2 2 (c) Two constrained-deadline periodic tasks of period 2 and deadline 1, with respective phase 1 and 2. a and b are in mutual exclusion Matthieu Lemerre (CEA LIST) The OASIS model Synchron’08 10 / 35

  21. Generation of the automaton from Ψ C code while(1) { after(1); if(...) { while after(2); for(i=0;i<10;i++) after(1) { advance(1); } } if else before(2); after(2) advance(5); for } before(2) The CFG defines the automaton. advance(1); Tasks define sequential advance(5) execution Multiple tasks to get parallel execution Matthieu Lemerre (CEA LIST) The OASIS model Synchron’08 11 / 35

  22. Outline Timing Model 1 Specifying time-triggered constraints Example uses and use in OASIS Simple example uses Use in OASIS Scheduling semantics 2 Scheduling of chains Scheduling of trees Scheduling of automata Implementation 3 Communication primitives Implementation Conclusion 4 Matthieu Lemerre (CEA LIST) The OASIS model Synchron’08 12 / 35

  23. Semantics for scheduling chains Conditions for a correct schedule for a chain: To respect the “before” and “after” constraints Blocks must be executed in order Blocks must be executed for their required execution time || b || a b || a || = 2 1 3 6 || b || = 1 7 0 1 a a b b Matthieu Lemerre (CEA LIST) The OASIS model Synchron’08 13 / 35

  24. Optimal scheduling with EDF-dyn In conventional scheduling models, tasks dynamically release fix jobs (i.e. 1 starttime, 1 deadline, 1 execution time) In the OASIS task model, a task is one job that changes dynamically → cannot use conventional scheduling algorithms “as is” Definition EDF-Dyn: EDF with dynamic change of deadlines Matthieu Lemerre (CEA LIST) The OASIS model Synchron’08 14 / 35

  25. Optimal scheduling with EDF-dyn Theorem EDF-Dyn is optimal for scheduling OASIS tasks. a c T 1 || a || = 1 . 5 1 3 6 b T 2 || b || = 2 2 5 || c || = 1 0 1 7 Dynamic deadline a b c T 1 deadline=3 a c b T 1 deadline=6 a b a c Matthieu Lemerre (CEA LIST) The OASIS model Synchron’08 14 / 35

  26. Implementation Scheduling decisions have to be made only when The date of an after node is reached An after node is reached A before node is reached Scheduler implementation: Deletion of useless constraints Translation into system calls to the scheduler a b c d e 2 3 4 5 1 a b c d e s = 1 s = 4 e = 2 e = 3 e = 5 e = ... Matthieu Lemerre (CEA LIST) The OASIS model Synchron’08 15 / 35

Recommend


More recommend