ModelBased Fault Adaptive RealTime Scheduler Ben Abbott Jeremy
Model-Based Fault Adaptive Real-Time Scheduler Ben Abbott, Jeremy Price -- Southwest Research Institute (Sw. RI) Sandeep Neema, Gabor Karsai -- ISIS/ Vanderbilt Work partially funded by DARPA PCA contract # F 30602 -01 -C-0078 DARPA Mo. BIES contract # F 33615 -01 -C-1909 Contact: BAbbott@Sw. RI. org Neema. SK@. vuse. vanderbilt. edu
Outline • Objective • Background – Real-time Scheduling – ASC scheduler – Model Integrated Computing • Examples – Mo. BIES inspired – Avionics • Extension including Communication Scheduling – PCA inspired -- Signal Exploitation • Conclusion
Objective • Provide a composable framework for real-time scheduler synthesis – Support Runtime Adaptation based on: • Scheduler objectives integrated with overall system objectives • Modeled performance tradeoffs • System state changes: faults, objectives, resource changes – Transition smoothly to/from classic scheduling paradigms • Provable • Extensible
Generic Real-Time Scheduler State Selector Scheduling Policy ……… Perform Task contextswitch Rea dy, R ate, etc. Task N State choose highest ity Static – RMS Dynamic – EDF etc. Prior Task 1 State • Real-Time –Allocation of time and resources to tasks such that timing constraints are met –Timing constraints range from Soft to Hard
Scheduling Policy Rate Monotonic (RMS) • • Always schedules the (ready) task with the highest arrival rate Priorities are static Optimal for static priorities (with conditions) Sufficient condition: • Graph of task priority Pa ra ste m X Sy Priority m X Rate • Ignores additional system parameters • Starves lowest rate task in overload (regardless of importance)
Scheduling Policy Earliest Deadline First (EDF) • • Always schedules the (ready) task with the earliest deadline Priorities are dynamic Optimal for dynamic priorities (with conditions) Several similar dynamic approaches -- example least slack ra Pa ste m Sy Priority m Deadline • Graph of task priority Deadline closeness • Ignores additional system parameters • Misses all task deadlines in overload (regardless of importance) • Various policies for missed deadlines might help, but which one?
• Want scheduling policy that incorporates system parameters – Adaptive Service Coordination (ASC) Scheduler • Describe scheduler coordination using generic information in the form of: – equations, state machines, and rules – include application specific system parameters • Synthesize domain specific real-time schedulers for distributed systems from models • Support provable and heuristic-based schedulers • Utilize a model-based approach for scheduling policy integration
ASC Scheduler
ASC Scheduler Characteristics • Implements classic schedulers – RMS, LS, EDF, etc. • Transitions from deterministic to heuristic or stochastic solutions • Provides a powerful interface for automatic program generator specialization
Model Integrated Computing From Models to Systems via Generation (ISIS technology) Model-Based Generators Two methods of programming: Requirements Manual Domain-Specific Modeling Languages Requirements Manual High-level multiple aspect models Matlab Model-Based Generator Matlab Config. Code-Gen. Technology Code-Gen. Generator Source code In general-purpose language - Modeling of generators - Generating generators - Provably correct generators - Embeddable generators Systemsource System source usingframework using framework abstractions if ( inactive. Interval != -1) { int this. Interval = ( int)(System. current. Time. Millis () last. Accessed ) / 1000; if ( this. Interval > inactive. Interval ) { invalidate(); Compile Implementation Conventional Server. Session. Manager ssm = Server. Session. Manager. get. Manager (); ssm. remove. Session (this); } } } private long last. Accessed. Time Framework + Implementation Configurable Components Model-Based = creation. Time ; /** * Return the last time the client sent a request associated with this * session, as the number of milliseconds since midnight, January 1, 1970 * GMT. Actions that your application takes, such as getting or setting * a value associated with the session, do not affect the access time. */ public long get. Last. Accessed. Time () { return (this. last. Accessed. Time ); } this. last. Accessed. Time = time; /** * Update the accessed time information for this session. This method * should be called by the context when a request comes in for a particular * session, even if the application does not reference it. */ public void access() { this. last. Accessed. Time this. New =false; = this. Accessed. Time ; = System. current. Time. Millis (); } last. Accessed. Time = 0 L; last. Accessed. Time = ((Long) stream. read. Object ()). long. Value (); max. Inactive. Interval = ((Integer) stream. read. Object ()). int. Value (); is. New = ((Boolean) stream. read. Object ()). boolean. Value (); Configuration Specification Code Analysis Tool
Meta-programmable Modeling Tool: Generic Modeling Environment (ISIS technology) Using the same core modeling tools for everything: METAMODELER’S TOOLS Metaprogrammable Graphical Modeling Tool Meta - Modeling Environment Implemented by creates Meta. Model of Domain configures DOMAIN MODELER’S TOOLS Domain - Modeling Environment creates Implemented by Domain. Specific Model Database Engine Implemented by Models (MS Repository, XML) Efficient AND Affordable Modeling • Model databases, graphical modeling tools are extremely expensive to develop (20 -30+ man-year) • GME use COTS and metaprogrammable solutions: domain-specific customization takes only hours • Opens up new opportunities: “Design your domain specific modeling language for your R&D program and configure the modeling and model repository tools using libraries. ”
MIC - Applied to Embedded Systems Analysis and Verification Tools Multiple-Aspect Domain/Target-Specific Generators (including ASC scheduler) SW Execution Environment
• ASC-ESML – Enables modeling of scheduling policy state machine: • • State definitions Scheduling policies for each state (per component) State transitions Templates supplied for standard schedulers (RMS, EDF, …) – Integrated with Matlab fuzzy logic toolbox as GUI editor for developing specific scheduling policies – Input: ESML model, ASC model – Output: Scheduler Parameters – Metamodel defines paradigm
• ASC-Scheduler – Utilizes ASC-ESML synthesized priority calculation model • Supports dynamic and adaptive scheduling policies • Coordinates state transitions based on modeled triggers – Integrated with CORBA • Supports preemptive scheduling of component execution • Future version will support scheduling of network communication – Instrumented • Current tool to convert to Vx. Works Windview format • Future tools possible based on the analysis interchange format – Input: • Scheduler generated by ASC-ESML – Outputs: • Scheduled system • Instrumentation
ASC additional GME components • Four new components added to GME – ASC: Interpreter to generate scheduler parameters based on the scheduler modeled – BUILD: Compiles and links the specialized ASC scheduler with the modeled OEP scenario – FIS: Utilizes matlab fuzzy toolbox as an integrated editor for the ASC scheduler model. – RUN: Executes the OEP scenario, collects timing (performance statistics) and displays summary information.
ASC Modeling Aspect in GME • Integrated with GME releases • Functional Interpreter • Integrated with Matlab for fuzzy portion of the model
Best Effort Membership Function • GME model used to seed Matlab fuzzy toolbox interface • Matlab additions to the model verified and integrated within the overall GME model
Schedule Rules & Priority Surface
ASC Scenario Execution • After finishing a set of models, the ASC and Build buttons are pushed to automatically generate the executable. • Pushing the Run button starts an instrumented run of the OEP for a user specified amount of time.
ASC Execution Results • Timing results of the instrumented run can be shown in a variety of ways – Wind. River’s Tornado/Vx. Works tool Windview timelines – Textual summary files – Other tools possible based on the instrumentation interface metamodel
Signal Exploitation Fault Adaptive (dataflow)
Signal Exploitation Fault Adaptive (processor assignment)
Signal Exploitation Fault Adaptive (scheduler assignment)
Signal Exploitation Fault Adaptive (scheduler state machine)
Signal Exploitation Fault Adaptive (Surface for Failed. Display. Processor)
ASC Communication Scheduler • Work in progress… • Integrated with ASC CPU scheduler • Implements classic schedulers – TTP, PDP, GRMS (proofs available) • Allows for use and transmission of imprecise global state through the fuzzy reasoning
Communication Scheduler Runtime Support LV Cache Get_lv() LV client LV server ASC Control Channel Get_lv() LV client LV server Get_lv() LV Cache Get_lv() Receive Handler Comm. Scheduler Msg. Send. Table ASC Data Channel eg. , Set. Data(), Internalize. State(), Push. Event() Receive Handler Comm. Scheduler Msg. Receive. Table Details • LV = linguistic variables same set available for both CPU and Comm scheduler • Core scheduler priority evaluation code same as CPU scheduler
Summary • Fault Adaptation – Allows system parameters to be considered – Can change policy state or position within scheduling policy surface • Performance – Slight additional cost for the ASC – Adjusted for domain specific scenarios • Timing guarantees – Traditional techniques are still valid – Provides possibility for synthesis or runtime to choose technique • Complexity of design time modeling – Increased, but allows more precision • Analysis tasks – Runtime verification can be automated – Allows for runtime deviation
- Slides: 28