Title: Generators for Synthesis of QoS Adaptation in Distributed Real-time Embedded Systems
1Generators for Synthesis of QoS Adaptation in
Distributed Real-time Embedded Systems
- Sandeep Neema,
- Ted Bapty, Aniruddha Gokhale
- Institute for Software Integrated Systems,
Vanderbilt University - Jeff Gray
- University of Alabama, Birmingham
- http//www.isis.vanderbilt.edu/projects/pces
GPCE-02, Pittsburgh, PA, October 6-8, 2002
2Roadmap
- Model Integrated Computing (MIC)
- Motivation
- Adaptive QoS Modeling Language (AQML)
- Simulation of QoS adaptation
- Synthesis of QoS adaptation
- Conclusions/Future Work
3Model Integrated Computing (MIC)
- Resulting from 15 years of research on
computer-based embedded systems in aerospace,
instrumentation, manufacturing and robotics. - Common challenges
- Software and environment are inseparable
- Need for adaptability to changing environment
- and end-user needs
- Complex, heterogeneous applications
- Stringent reliability and dependability
requirements
4Model Integrated Computing (MIC)
- Represent the information that directly or
- indirectly determines the structure of
computations - using domain-specific modeling paradigms
- Capture the relationship between domain models,
- analysis models and executable models
- Validate, analyze the domain models using
generic - tools
-
- Synthesize computations from the domain models
5MultiGraph Architecture
DSDE Domain-Specific Design Environments DSME
Domain-Specific Modeling Environments
6Generic Modeling Environment (GME)
Meta-modeling Environment
Domain-specific Modeling Environment
http//www.isis.vanderbilt.edu/Projects/gme/defaul
t.html
7Roadmap
- Model Integrated Computing (MIC)
- Motivation
- Adaptive QoS Modeling Language (AQML)
- Simulation of QoS adaptation
- Synthesis of QoS adaptation
- Conclusions/Future Work
8Motivation
- RT Middleware solutions enable highly-complex
Distributed Real-time Embedded (DRE) systems - QoS adaptive frameworks (QuO) enable abstraction
of QoS parameters and QoS adaptation - Low-level of abstraction for specification of
adaptation - Difficult to validate/verify
- System behavior not apparent in specification of
adaptation - QoS adaptation software is equivalent to a
discrete controller for a highly non-linear
system - Could result in instability
- Need to simulate/verify
- Need Specifications of behavior separated from
software concerns
QuO Quality Objects (BBN Tech.)
9QoS Adaptation A Control Systems Perspective
QuO Contract
SysConds
10MIC Approach
Adaptive QoS Modeling Language (AQML)
G
G
G
Symbolic Model Verifier (SMV) Model Checking
BBN Contract Definition Language
Matlab Simulink/Stateflow Simulation
11Roadmap
- Model Integrated Computing (MIC)
- Motivation
- Adaptive QoS Modeling Language (AQML)
- Adaptive Behavior, Computation, Middleware
- Simulation of QoS adaptation
- Synthesis of QoS adaptation
- Conclusions/Future Work
12Adaptive Quality Modeling Language (AQML)
- QoS Adaptation Modeling
- Hierarchical, parallel, finite state machine
representation - States capture system-wide QoS configurations
- Transitions represent cause and effect of change
in operating conditions - Data/Event variables represent the interface to
the operating environment
13Adaptive Quality Modeling Language (AQML) (2)
- Computation Modeling
- Hierarchical dataflow representation
- Compounds, primitives
- Parameters for component instrumentation and
customization
14Adaptive Quality Modeling Language (AQML) (3)
- Middleware Modeling
- Services and system condition objects
- Parameters for middleware instrumentation and
customization
15Adaptive Quality Modeling Language (AQML) (4)
- Interaction Modeling
- Interaction of controller (adaptation
state-machine) with sensors/actuators (parameters
in middleware/computation modeling), captured
with Control connection - References for cross-hierarchy connection
16AQML Example ModelCase Study
- Dataflow model of the UAV video-streaming
application - Sender, Distributor, and Receiver, ? distributed
application components - ActualFrameRate, TimeInRegion, ? middleware
syscond (parameter) objects - ResvWithDropping ? reference the adaptation
behavior
17AQML Example Model (2)Case Study
- NormalLoad, HighLoad, and ExcessLoad ? states
within the QoS parameter space - actualFrameRate, frameRate, ? data variables
within state machine interface with the syscond
objects
- Duty, Test ? sub-states of HighLoad state
- Transition from duty to test enabled when time in
duty exceeds 30 ticks - frameRate variable set to 30 when transitioning
from duty to test state
18Roadmap
- Model Integrated Computing (MIC)
- Motivation
- Adaptive QoS Modeling Language (AQML)
- Simulation of QoS adaptation
- Synthesis of QoS adaptation
- Conclusions/Future Work
19Simulation of QoS adaptation
- Matlab Simulink/Stateflow used as the
simulation engine - Model interpreters generate Matlab M-code to
construct Simulink/Stateflow representation - User provides a network simulation (plant) model,
that can simulate various load conditions in the
network
20Simulation Generator
- Stateflow represents hierarchy through graphical
containment on a single diagram - bounding rectangle of a sub-state is enclosed by
the bounding rectangle of a super-state - Phase 1 traverses the AQML model-object
hierarchy to compute the bounding rectangles for
states - Phase 2 traverses the AQML model-object
hierarchy, and emits Matlab M-script code to
construct Stateflow objects using the
Matlab-Stateflow API
21Generated M-script
create transitions t Stateflow.Transition
(chart) t.Source s4 t.Destination
s5 l sprintf('s\ns','timeInRegion gt
30/frameRate30','timeInRegion_w0')
t.LabelString l t.SourceOClock 9
t.DestinationOClock 9 t.MidPoint 151
190
Matlab script for creation of a Stateflow Model
generated Friday, October 04, 2002
sfnew('UAV') root sfroot mach
root.find('-isa', 'Stateflow.Machine') chart
mach.find('-isa', 'Stateflow.Chart')
chart.Name 'Controller' set_param(gcbh,'Posit
ion',120 40 300 160) create states s0
Stateflow.State(chart) s0.Name
'ResvWithDropping' s0.LabelString
'ResvWithDropping' s0.Decomposition
'EXCLUSIVE_OR' s0.Position 0 0 490 440
s1 Stateflow.State(chart) s1.Name
'NoReservation' s1.LabelString
'NoReservation' s1.Decomposition
'EXCLUSIVE_OR' s1.Position 20 40 450 280
create data d Stateflow.Data(chart)
d.Name 'frameRate' d.DataType 'int32'
d.Scope 'OUTPUT_DATA' d.Name
'actualFrameRate' d.DataType 'int32'
d.Scope 'INPUT_DATA'
22Matlab-Simulink Models
23Simulation Results
Desired frame rate
Actual frame rate
- Results depicts variation in the desired frame
rate and the actual frame rate observed on the
simulated network - Results are obtained against a simulated
sinusoidal loading profile on the network - Results can be used to fine-tune the adaptation
policy against different loading profiles
(bursty, sharp transients, gradual persistent, ) - Benefit ? Rapid prototyping and visualization of
the responsiveness and behavior of the QoS
adaptation policy
24Roadmap
- Model Integrated Computing (MIC)
- Motivation
- Adaptive QoS Modeling Language (AQML)
- Simulation of QoS adaptation
- Synthesis of QoS adaptation
- Conclusions/Future Work
25QuO Contract Generation
- AQME models translated to QuO contracts
represented in Contract Definition Language (CDL)
26Quo Contract (CDL) Generator
- CDL Contracts are expressed in flat finite-state
machine like representation - Guards, and actions in transitions are method
calls over middleware objects - Phase 1 translates the hierarchical parallel FSM
representation to a flat FSM representation - Phase 2 traverses the flattened FSM object-graph
and emits CDL code - parse guards, triggers, and action expressions,
- traverse Abstract Syntax Tree, and emit code
- for any reference to a data or event variable in
the expression, emit the get/set method call on
the middleware object
27Case Study CDL
- Complex CDL contract synthesized from models
- CDL output is post-processed by the BBN QuoGen
compiler to generate code for the BBN QuO
adaptation framework - Generated Adaptation code monitors the QoS state
of the distributed real-time system, and execute
transitions and actions to bring the system in a
desired operational state
- contract UAVsplitContract (
- callback UAVCallbacksSender_Control_Callbac
k senderControl, - syscond nowatch quoValueSC
quo_scValueSCImpl currentRegion, - syscond nowatch quoValueSC
quo_scValueSCImpl negotiatedFrameRate, - syscond nowatch quoValueSC
quo_scValueSCImpl actualFrameRate, - syscond quoValueSC
quo_scValueSCImpl timeInRegion ) -
- state state_6 (
- (((long) timeInRegion ) gt 3) -gt state_5,
- (((long) actualFrameRate ) lt 27 and ((long)
actualFrameRate ) gt 8) -gt state_3, - (((long) actualFrameRate ) gt 27) -gt state_2
) -
-
-
- transition state_5 -gt state_6
- synchronous
-
- senderControl.setFrameRate( 10 )
- negotiatedFrameRate.longValue( 10 )
28Roadmap
- Model Integrated Computing (MIC)
- Motivation
- Adaptive QoS Modeling Language (AQML)
- Simulation of QoS adaptation
- Synthesis of QoS adaptation
- Conclusions/Future Work
29Conclusions
- MIC enables better design and synthesis of highly
complex QoS adaptation contracts by providing a
domain-specific, higher level of abstraction - The approach shortens the design, implement,
test, and iterate cycle by providing early
simulation, and analysis capabilities - The approach facilitates change maintenance and
evolution as minimal changes in the models effect
large changes in the low-level (textual,
code-base) CDL specification
30Future Work
- Investigating results from control-theory for
synthesizing adaptation behaviors - Extending the QoS adaptation modeling from a
single centralized adaptation strategy, to
several distributed local adaptation strategies,
and their coordination and synchronization - Enhancement of the middleware and dataflow
modeling aspects of the AQME
31Extra Slides
32Conceptual structure
Domain Modeling
Development Platform
Mapping/Synthesis
Components
12/15/97
Integration Platform
33Typical System Development
Specs, Drawings, Diagrams, Equations etc.
Specifications
End-users Specify their systems
Synthesis
Simulation and/or analysis data
Applications
Programmers Implement Code
Domain-specific software apps
Configuration scripts
34The MultiGraph Solution
Specifications
End-users model their systems
Graphical Modeling Environment
Synthesis
Model Interpreter
Simulation and/or analysis data
Applications
Domain-specific software apps
Configuration scripts
35MIC Approach
- Creation of a Domain-Specific Modeling Language
- QoS Adaptive Behavior
- Middleware Interfaces
- Application QoS parameters
- Generation of QoS adaptation code
- Contract Definition Language (CDL) output
- Generation of Simulations
- Verify behavior over points in the envelope of
operation, using same models - Analysis of system
- Model Checking over full operational envelope,
using same models
36Adaptive QoS Modeling Environment (AQME)
- QoS Specification and Adaptation modeling
- Hierarchical, parallel, finite state machine
representation - States capture system-wide QoS configurations
- Transitions represent cause and effect of change
in operating conditions - Data/Event variables represent the interface to
the operating environment
37Adaptive QoS Modeling Environment (AQME)
- Software modeling
- Hierarchical dataflow representation
- Compounds, primitives
- Parameters for component instrumentation and
customization - Middleware modeling
- Services and system condition objects
- Parameters for middleware instrumentation and
customization