Scheduling and Memory requirements analysis with AADL F

  • Slides: 20
Download presentation
Scheduling and Memory requirements analysis with AADL F. Singhoff, J. Legrand, L. Nana, L.

Scheduling and Memory requirements analysis with AADL F. Singhoff, J. Legrand, L. Nana, L. Marcé University of Brest, France LISYC/EA 3883 SIGAda, Atlanta, nov’ 05 1/20

Introduction and motivations (1/2) q The Architecture Analysis & Design Language (AADL) : •

Introduction and motivations (1/2) q The Architecture Analysis & Design Language (AADL) : • SAE standard published in november 2004 (AS 5506 document). • Allows a high level specification of real time systems in order to perform analysis, source code/documentation generation, … q An AADL specification is q A set of components such as : • Thread : flow of control that executes a program (eg. Ada Task). • Data : any data structure in a program (eg. Ada tagged record). • Processor : part of the execution environment. q Connections between components : model component relationships. q Component properties : component information/characteristic (behavior, Ada package file name, Ada task stack requirement, …) SIGAda, Atlanta, nov'05 2/20

Introduction and motivations (2/2) q Existing AADL toolsets : OSATE, STOOD, TOPCASED, ADe. S

Introduction and motivations (2/2) q Existing AADL toolsets : OSATE, STOOD, TOPCASED, ADe. S … but there is currently few open-source performance analysis tools. q Since 2002, at Brest, we’re investigating : • How to extend real time system analysis methods to take distribution into account ? • How to provide tools to help system designers to predict distributed real time system performances ? • Cheddar, an Ada framework designed to real time applications performance analysis. q How Cheddar can be applied to AADL specifications ? SIGAda, Atlanta, nov'05 3/20

Talk overview q. Introduction and project motivations q. Usual performance analysis methods q. Cheddar

Talk overview q. Introduction and project motivations q. Usual performance analysis methods q. Cheddar : a performance analyzer framework q. Examples of AADL analysis : • AADL threads scheduling analysis • AADL event data port memory analysis q. Conclusion and ongoing works SIGAda, Atlanta, nov'05 4/20

Usual performance analysis methods : real time scheduling (1/2) q. Periodic task model :

Usual performance analysis methods : real time scheduling (1/2) q. Periodic task model : a bound on execution time (capacity, Ci), a fixed delay between two wake-up times (period, Pi), a temporal constraint to meet (deadline, Di). q. Choose a real time scheduling algorithms (eg. Rate Monotonic). q. Perform simulation analysis : compute and analyze time lines q. Perform Analytical/Feasibility test analysis : no scheduling required SIGAda, Atlanta, nov'05 5/20

Usual performance analysis methods : queueing systems (2/2) Customer arrivals Queue Server Outgoing customers

Usual performance analysis methods : queueing systems (2/2) Customer arrivals Queue Server Outgoing customers q. Queueing system Kendall's notation : X/Y/n. • • X : customer arrival rate (M, G, D). Y : service time rate (M, G, D). n : number of servers. Examples : M/M/1, M/D/1, M/G/1, … q. Goal : From a given customer arrival/service time rate, compute analytical criteria such as customer waiting time and number of waiting customers in the queue. SIGAda, Atlanta, nov'05 6/20

Talk overview q. Introduction and project motivations q. Usual performance analysis methods q. Cheddar

Talk overview q. Introduction and project motivations q. Usual performance analysis methods q. Cheddar : a performance analyzer framework q. Examples of AADL analysis : • AADL threads scheduling analysis • AADL event data port memory analysis q. Conclusion and ongoing works SIGAda, Atlanta, nov'05 7/20

Cheddar : a performance analyzer framework q. Cheddar provides Ada 95 packages implementing both:

Cheddar : a performance analyzer framework q. Cheddar provides Ada 95 packages implementing both: • Analytical and simulation queueing systems tools (see proceedings of SIGAda 2005). • Analytical and simulation real time scheduling analysis tools (see proceedings of SIGAda 2004). q. Example of computed criteria : • Processors/tasks : worst/best/average response time, number of context switches/preemptions, missed deadlines, processor utilization factor test, . . . • Shared resources & buffers : worst/best/average shared resource blocking task, priority inversion, maximum/average message waiting time, maximum/average number of messages. . . • … SIGAda, Atlanta, nov'05 8/20

Cheddar and AADL q. Cheddar was not originally designed to work with AADL. How

Cheddar and AADL q. Cheddar was not originally designed to work with AADL. How such kind of tool may be applied to AADL ? q. In the sequel, we consider the following examples : • AADL threads scheduling analysis. • Buffer/Memory requirements of AADL event data ports. SIGAda, Atlanta, nov'05 9/20

Talk overview q. Introduction and project motivations q. Usual performance analysis methods q. Cheddar

Talk overview q. Introduction and project motivations q. Usual performance analysis methods q. Cheddar : a performance analyzer framework q. Examples of AADL analysis : • AADL threads scheduling analysis • AADL event data port memory analysis q. Conclusion and ongoing works SIGAda, Atlanta, nov'05 10/20

AADL threads scheduling analysis (1/3) q. AADL includes most of the features used in

AADL threads scheduling analysis (1/3) q. AADL includes most of the features used in the context of real time scheduling analysis. q. Nevertheless, the following questions have to be investigated : • Can we model any built-in Cheddar's schedulers or task models ? • Are standard properties enough to perform analytical/feasibility tests on any resources ? • How to express new schedulers or task models ? => we need some new AADL properties related to thread, data and processor SIGAda, Atlanta, nov'05 11/20

AADL threads scheduling analysis (2/3) q. Example : a set of periodic/aperiodic threads scheduled

AADL threads scheduling analysis (2/3) q. Example : a set of periodic/aperiodic threads scheduled with POSIX 1003. 1 b and Rate Monotonic schedulers. thread implementation T 3 properties Dispatch_Protocol => Periodic; processor implementation cpu 0 properties Compute_Execution_Time => 1 ms. . 2 ms; Scheduling_Protocol => RATE_MONOTONIC; Deadline => 10 ms; Cheddar_Properties: : Preemptive_Scheduler => true; Period => 10 ms; Cheddar_Properties: : Scheduler_Quantum => 0 ms; end T 3; end cpu 0; thread implementation fifo 2 processor implementation cpu 1 properties Dispatch_Protocol => Background; Scheduling_Protocol => POSIX_SCHEDULER; Compute_Execution_Time => 1 ms. . 3 ms; Cheddar_Properties: : Preemptive_Scheduler => true; Cheddar_Properties: : POSIX_Scheduling_Policy => SCHED_FIFO; Cheddar_Properties: : Scheduler_Quantum => 2 ms; Cheddar_Properties: : Fixed_Priority => 5; end cpu 1; Deadline => 100 ms; end fifo 2; SIGAda, Atlanta, nov'05 12/20

AADL threads scheduling analysis (3/3) Compute simulation Analysis (eg. deadlines, response times) SIGAda, Atlanta,

AADL threads scheduling analysis (3/3) Compute simulation Analysis (eg. deadlines, response times) SIGAda, Atlanta, nov'05 13/20

Talk overview q. Introduction and project motivations q. Usual performance analysis methods q. Cheddar

Talk overview q. Introduction and project motivations q. Usual performance analysis methods q. Cheddar : a performance analyzer framework q. Examples of AADL analysis : • AADL threads scheduling analysis • AADL event data port memory analysis q. Conclusion and ongoing works SIGAda, Atlanta, nov'05 14/20

Event data ports memory requirement analysis (1/4) q Event data ports are AADL features

Event data ports memory requirement analysis (1/4) q Event data ports are AADL features used for asynchronous message transmission between threads. Events/messages are queued. q Queueing systems may be able to predict event data port me mory requirement. . But we have to answer two questions : • How to take into account AADL thread dispatching (eg. periodic) ? • How to take into account AADL thread scheduling (eg. RM) ? q As for the other AADL features, Cheddar provides : • Simulation tools. • Feasibility tests (based on queueing systems, J. Legrand, F. Singhoff, L. Nana & L. Marcé 2004). SIGAda, Atlanta, nov'05 15/20

Event data ports memory requirement analysis (2/4) q Queueing systems for AADL event data

Event data ports memory requirement analysis (2/4) q Queueing systems for AADL event data ports : • Define a new customer arrival/service time rate : the P rate. • Define new queueing systems based on the P rate. • Define new feasibility tests. q Worst case analytical analysis based on P/P/1 : • Consumer/Producer threads are periodic. • Ex. Feasibility test : the maximum number of messages in an event data port shared by N periodic producers and 1 periodic consumer is : • 2. N (harmonic AADL thread set) • 2. N+1 (other cases) q Average case analytical analysis based on M/P/1 : • See the SIGAda 2005 proceedings for the feasibility tests. SIGAda, Atlanta, nov'05 16/20

Event data ports memory requirement analysis (3/4) q. Example 2 : event data port

Event data ports memory requirement analysis (3/4) q. Example 2 : event data port connections processor implementation cpu_rm. i properties Scheduling_Protocol => Rate_Monotonic; . . . end cpu_rm. i; process implementation p 0. i subcomponents Producer 1 : thread Producer. i; thread Producer Features Data_Source : out event data port; end Producer; thread Consumer features Data_Sink : in event data port; end Consumer; thread implementation Producer. i properties Producer 2 : thread Producer. i; Dispatch_Protocol=>Periodic; Consumer 1 : thread Consumer. i; . . . connections event data port Producer 1. Data_Source -> Consumer 1. Data_Sink; event data port Producer 2. Data_Source -> Consumer 1. Data_Sink; end p 0. i; SIGAda, Atlanta, nov'05 end Producer. i; thread implementation Consumer. i properties Dispatch_Protocol=>Periodic; . . . end Consumer. i; 17/20

Event data ports memory requirement analysis (4/4) Buffer simulation Analysis from simulation Analytical worst

Event data ports memory requirement analysis (4/4) Buffer simulation Analysis from simulation Analytical worst case queueing system analysis (based on P/P/1) SIGAda, Atlanta, nov'05 18/20

Talk overview q. Introduction and project motivations q. Usual performance analysis methods q. Cheddar

Talk overview q. Introduction and project motivations q. Usual performance analysis methods q. Cheddar : a performance analyzer framework q. Examples of AADL analysis : • AADL threads scheduling analysis • AADL event data port memory analysis q. Conclusion and ongoing works SIGAda, Atlanta, nov'05 19/20

Conclusion and ongoing works q. The Cheddar AADL performance analyzer : • Provides performance

Conclusion and ongoing works q. The Cheddar AADL performance analyzer : • Provides performance analysis tools for different AADL features, based on real time scheduling and queueing systems analysis. • This AADL analyzer is distributed since the end of october (http: //beru. univ-brest. fr/~singhoff/cheddar). . . but has to be tested ! • Implementation based on Ocarina (ENST’s AADL Ada 95 parser). • Cheddar can be run as a Stood plug-in, the TNI-Europe CASE tool (Thanks to AADL !). q. Ongoing works : • Related to thread precedency relationships (AADL connections). • Related to hierarchical schedulers (eg. ARINC 653 scheduler). SIGAda, Atlanta, nov'05 20/20