MAST: A Timing Behavior Model for Embedded Systems Design Processes By: Michael González Harbour, José Javier Gutiérrez, José Carlos Palencia, José María Drake, Julio Medina, Patricia López Universidad de Cantabria, Spain http://mast.unican.es/ ARTIST workshop on Models of Computation and Communication MoCC, Zurich, November 2006 GRUPO DE COMPUTADORES Y TIEMPO REAL Michael González Harbour 1
1. Introduction: Background Many real-time systems are now distributed Cyclic executives being replaced by run-time schedulers Fixed priority and EDF scheduling are most popular among the run-time scheduling policies Schedulability analysis techniques have evolved a lot in the last decade Originally RM and DM priority assignment techniques, together with response-time analysis Extended to distributed systems (holistic analysis, HOPA) Offset-based analysis introduced (FP and EDF) Multiple-event synchronization handled GRUPO DE COMPUTADORES Y TIEMPO REAL Michael González Harbour 2
Motivation The latest schedulability analysis techniques are difficult to apply by hand Need for a rich and flexible model of the real-time system: distributed, multiprocessor, or single processor composable software modules separation of architecture, platform, and software modules rich set of event-driven patterns; e.g.: e 1 t 1 m 2 t 5 e 7 + t 7 m 8 t 3 m 4 + t 6 GRUPO DE COMPUTADORES Y TIEMPO REAL Michael González Harbour 3
Objectives Develop a model for describing the timing behavior of eventdriven distributed real-time systems Open model that may evolve to include new characteristics or points of view of the system Develop a set of tools for analyzing the timing behavior of the application: - Schedulability analysis (hard real-time requirements) - Synchronization blocking calculation - Discrete-event simulation (soft real-time) - Priority assignment - Sensitivity analysis GRUPO DE COMPUTADORES Y TIEMPO REAL Michael González Harbour 4
MAST: A timing behavior model 1. Introduction: Background, Motivation and Objectives 2. Overview of the Real-Time Model 3. Elements of the MAST Model 4. Integration into design processes 5. The MAST tool suite 6. Conclusions and Future Work GRUPO DE COMPUTADORES Y TIEMPO REAL Michael González Harbour 5
2. Real-Time Model: Overview Software Modules Processing Resource Shared Resources Scheduler Operation Scheduling Server Platform Event Activity Event Scheduling Parameters Real-time situation Event Handler Timing Requirement Event Reference GRUPO DE COMPUTADORES Y TIEMPO REAL Michael González Harbour 6
Real-Time Situation Transaction External Event Activity Activity Multicast Internal Event Event Handler Transaction Event Handler Timing Requirement... Event Handler Event Handlers GRUPO DE COMPUTADORES Y TIEMPO REAL Michael González Harbour 7
3. Elements of the MAST model: Example RMT: Teleoperated Robot Command Message Ethernet Network Status Message Remote Station Local Controller 1sec GUI 50ms Trajectory Planner Command Manager 5ms Servo Control Reporter Data Sender GRUPO DE COMPUTADORES Y TIEMPO REAL Michael González Harbour 8
Processing resources, schedulers, drivers, and timers packet driver ethernet packet-based network packet driver remote_station primary scheduler remote_station regular processor ethernet primary scheduler local_controller regular processor local_controller primary scheduler GRUPO DE COMPUTADORES Y TIEMPO REAL Michael González Harbour 9
Scheduling servers priority trajectory planner data sender reporter gui command manager servo control ethernet driver1 message stream ethernet driver2 remote_station primary scheduler ethernet primary scheduler local_controller primary scheduler GRUPO DE COMPUTADORES Y TIEMPO REAL Michael González Harbour 10
Shared resources Name Shared_Resource Immediate_Ceiling_Resource Priority_Inheritance_Resource Ceiling Preassigned SRP_Resource Preemption_Level Preassigned GRUPO DE COMPUTADORES Y TIEMPO REAL Michael González Harbour 11
Logical Operations Model Overridden_- Sched_Parameters 0..1 Overridden_Sched_Parameters Name Operation Composite_Operations_List 1..* Composite_Operation Simple_Operation Execution_Times 0..* 0..* To_Lock To_Unlock Shared_Resource Message_Transmission Transmission_Times Enclosing_Operation Execution_Times GRUPO DE COMPUTADORES Y TIEMPO REAL Michael González Harbour 12
GUI operation in the example includes set_command simple operation gui enclosing operation includes read_status simple operation command uses uses status immediate ceiling resource immediate ceiling resource GRUPO DE COMPUTADORES Y TIEMPO REAL Michael González Harbour 13
Transactions: Distributed transaction in the example timed activity activity activity e1 event pattern timing reqs. o1 Op: tr_planning Srv: tr_planning activity Op: reporter Srv: reporter e2 e6 Op: command Srv: msg_stream activity Op: status Srv: msg_stream e3 e5 Op: Comm_mgmt Srv: Comm_mgmt activity e4 Op: data_sender Srv: data_sender GRUPO DE COMPUTADORES Y TIEMPO REAL Michael González Harbour 14
External Events External_Event Periodic_Event Period Max_Jitter Phase Aperiodic_Event Avg_Interarrival Distribution Singular_Event Phase Sporadic_Event Min_Interarrival Unbounded_Event Bursty_Event Bound_Interval Max_Arrivals GRUPO DE COMPUTADORES Y TIEMPO REAL Michael González Harbour 15
Event Handlers Activity / Rate Divisor / Delay / Offset Concentrator (Merge) Barrier (Join)... +.... Delivery Server (Branch) Multicast (Fork) +....... GRUPO DE COMPUTADORES Y TIEMPO REAL Michael González Harbour 16
Timing requirements Timing_Requirement Composite_Timing_Requirement Simple_Timing_Requirement 1..* Requirements_List Deadline_Timing_Requirement Deadline Event 1 Referenced_Event Max_Output_Jitter_Req Max_Output_Jitter GRUPO DE COMPUTADORES Y TIEMPO REAL Michael González Harbour 17
4. Integration into the design process Components built with their own timing behavior model passive components: operations and shared resources active components: single or multithreaded, distributed,... The model is parameterized i.e., actual data for WCETS Deployment tool instantiates the parameterized component models provides the platform model integrates them with the real time situation model Automatic schedulability analysis is then made GRUPO DE COMPUTADORES Y TIEMPO REAL Michael González Harbour 18
Integration into the design process Architectural real-time models Scheduling policies WCET evaluation Translation Design Detailed Design Mechanism Design Coding Architectural Design Unit Testing Concurrency patterns Synchronization patterns Generation of detailed realtime models Object analysis Integration and Test Testing Validation System Engineering Party Requirements Analysis Analysis Mapping real-time properties to subsystems High-level real-time analysis Schedulability analysis Priority Assignment Sensitivity analysis Identification of realtime situations: - Transactions - Timing requirements - Work loads GRUPO DE COMPUTADORES Y TIEMPO REAL Michael González Harbour 19
5. The MAST Environment Model Building Tools Component Profile Ada Profile UML Profile Data handling Tools Results viewer Graphical editor XML converter RT Model Data Model description Results description Trace log Tool launcher Tools Simulator Sensitivity Prio. assignment Schedulability analysis GRUPO DE COMPUTADORES Y TIEMPO REAL Michael González Harbour 20
6. Conclusions MAST defines a model for describing real-time systems distributed and multiprocessor complex synchronization and event-driven schemes composable software modules independence of architecture, platform and modules MAST provides an open set of tools hard and soft real-time analysis automatic blocking times, priority assignment, sensitivity analysis... XML specification language allows easy integration with other tools (i.e., UML tools) GRUPO DE COMPUTADORES Y TIEMPO REAL Michael González Harbour 21
Future Work Finish current tools: graphical editor integrate simulator Implement missing tools: Multiple-Event Analysis Full support for EDF Speed up the response time analysis GRUPO DE COMPUTADORES Y TIEMPO REAL Michael González Harbour 22
URL http://mast.unican.es GRUPO DE COMPUTADORES Y TIEMPO REAL Michael González Harbour 23