Kĩ thuật lập trình - Chapter 13: Components in real - Time systems

Is the most central part of any CBSE system as it contains binaries of components and their descriptions. A component library containing real-time components should provide the following: Memory requirements WCET test cases Dependencies Environment assumptions

ppt34 trang | Chia sẻ: huyhoang44 | Lượt xem: 574 | Lượt tải: 0download
Bạn đang xem trước 20 trang tài liệu Kĩ thuật lập trình - Chapter 13: Components in real - Time systems, để xem tài liệu hoàn chỉnh bạn click vào nút DOWNLOAD ở trên
Chapter 13Components in Real-Time Systems Page Building Reliable Component-based Systems Chapter 13 -Components in Real-Time SystemsOverviewIntroduction Characteristics and challenges of real-time systems Real-time component models Designing component-based real-time systems Composition of components Example: RT components in Rubus OS Page Building Reliable Component-based Systems Chapter 13 -Components in Real-Time SystemsIntroductionEmbedded computersMedical control equipment, mobile phones, and vehicle control systems. Most of such embedded systems can also be characterized as real-time systems.They must usually meet stringent specifications for safety, reliability, limited hardware capacity etc Page Building Reliable Component-based Systems Chapter 13 -Components in Real-Time SystemsCharacteristics and Challenges of RTSReal-time systems are computing systems in which the meeting of timing constraints is essential to correctness.If the system delivers the correct answer, but after a certain deadline, it could be regarded as having failed.Page Building Reliable Component-based Systems Chapter 13 -Components in Real-Time SystemsTasksReal-time systems can be constructed of sequential programs, but typically they are built of concurrent programs, called tasks. Tasks are usually divided into:Periodic tasks: consist of an infinite sequence of identical activities, called instances, which are invoked within regular time periods. Non-periodic : are invoked by the occurrence of an event.Page Building Reliable Component-based Systems Chapter 13 -Components in Real-Time SystemsSchedulingOffline scheduling: The scheduler has complete knowledge of the task set and its constraints. Online scheduling: Make their scheduling decisions during run-time. Deadline: Is the maximum time within which the task must complete its execution with respect to an event. Real-time systems are divided into two classes, hard and soft real-time systems Page Building Reliable Component-based Systems Chapter 13 -Components in Real-Time SystemsLimited ResourcesCommon CBSE technologies (JavaBeans, CORBA and COM) are seldom used as they:Require excessive processing requirements Require excessive memory requirements Provide unpredictable timing characteristicsPage Building Reliable Component-based Systems Chapter 13 -Components in Real-Time SystemsSystem Level AnalysisAt system level we analyze to determine if the system composed fulfils the timing requirements. Several different mature analysis methods exist, for example, analysis for priority-based systems and pre-run-time scheduling techniques Page Building Reliable Component-based Systems Chapter 13 -Components in Real-Time SystemsReal-time Component ModelsUsing a standard operating system in a real-time application, such as windows NT must be done carefully, as it was designed to be used so.Page Building Reliable Component-based Systems Chapter 13 -Components in Real-Time SystemsApplication-specific Component Models Maintain a component library which the application engineer can use when developing an application.In addition to infrastructure components, domain specific component models, which in fact have been used for many years for certain domains must be considered. Page Building Reliable Component-based Systems Chapter 13 -Components in Real-Time SystemsIEC 61131-3 Application Structure Global and direct variablesAccess pathExecutioncontrol pathVariableaccess pathFBTaskProgramProgramFBFBTaskProgramTaskProgramFBFBTaskResourceResourceConfigurationCommunication FunctionFunctionBlockVariablePage Building Reliable Component-based Systems Chapter 13 -Components in Real-Time SystemsA Configuration in IEC 61131-3Encapsulates all software for an application and consists of one or several resources which provide the computational mechanisms. Page Building Reliable Component-based Systems Chapter 13 -Components in Real-Time SystemsA Program in IEC 61131-3A program is written in any of the languages proposed in the standard, for example: Instruction listsAssembly languagesStructured textA high level language similar to PascalLadder diagrams Function block diagrams (FBD)Page Building Reliable Component-based Systems Chapter 13 -Components in Real-Time SystemsFunction Block Diagram A simple function block diagram representing a feedback control loop. FB1 FB2Page Building Reliable Component-based Systems Chapter 13 -Components in Real-Time SystemsA Port-based Object ApproachThe model is based upon the development of domain-specific components which maximize usability, flexibility and predictable temporal behavior. Independent tasks are the bases for the PBO model.Whenever a PBO needs data for its computation, it reads the most recent information from its in-ports, irrespective of its producer.The PBOs are in their nature periodic and the system can be analyzed using traditional schedulability analysis.Page Building Reliable Component-based Systems Chapter 13 -Components in Real-Time SystemsA Port-based Object Port-based objectVariable input portsVariable output portsResource ports for communication with sensors and actuatorsConfiguration parametersPage Building Reliable Component-based Systems Chapter 13 -Components in Real-Time SystemsDesigning Component-based RTSSystem specificationTop-level designDetailed designScheduling / interface checkObtain components timing behavior on target platformSystem verificationFinal productComponent libraryCreate specifications for the new componentsImplement and verify new components using classical development methodsAdd new components to libraryArchitecture analysisPage Building Reliable Component-based Systems Chapter 13 -Components in Real-Time SystemsTop-level Design The first stage of the development process involves de-composition of the system into manageable components Page Building Reliable Component-based Systems Chapter 13 -Components in Real-Time SystemsDetailed Design At this stage a detailed component design is performed, by selecting components to be used from the candidate set. Page Building Reliable Component-based Systems Chapter 13 -Components in Real-Time SystemsArchitecture Analysis At this stage it is time to check that the system under development satisfies extra-functional requirements such as:MaintainabilityReusabilityModifiabilityTestabilityPage Building Reliable Component-based Systems Chapter 13 -Components in Real-Time SystemsScheduling At this point we must check that the temporal requirements of the system can be satisfied, assuming time budgets assigned in the detailed design stage.In other words, we need to make a schedulability analysis of the system based on the temporal requirements of each component Page Building Reliable Component-based Systems Chapter 13 -Components in Real-Time SystemsWCET Verification Performing a worst-case analysis can either be based on measurements or on a static analysis of the source code.What is more interesting in the test cases is the execution time behavior shown as a function of input parameters as shown in the following slide. Page Building Reliable Component-based Systems Chapter 13 -Components in Real-Time SystemsAn Execution Time Graph Execution time Input domain 1 domain 2 domain 3 The execution time shows different values for the different input sub-domains.Page Building Reliable Component-based Systems Chapter 13 -Components in Real-Time SystemsMaximum execution time per sub-domain Execution time Input domain 1 domain 2 domain 3 Page Building Reliable Component-based Systems Chapter 13 -Components in Real-Time SystemsImplementation of New Components New components; Those not already in the library must be implemented. The designer of the component has two requirements:The functional requirementsThe assigned time budgetPage Building Reliable Component-based Systems Chapter 13 -Components in Real-Time SystemsSystem Build and Test Finally, we build the system using old and new components.We must now verify the functional and temporal properties of the system obtained. If the verification test fails, we must return to the relevant stage of the development process and correct the error. Page Building Reliable Component-based Systems Chapter 13 -Components in Real-Time SystemsComponent Library Is the most central part of any CBSE system as it contains binaries of components and their descriptions.A component library containing real-time components should provide the following:Memory requirements WCET test cases Dependencies Environment assumptionsPage Building Reliable Component-based Systems Chapter 13 -Components in Real-Time SystemsComposition of ComponentsPage Building Reliable Component-based Systems Chapter 13 -Components in Real-Time SystemsEnd-To-End DeadlinesEnd-to-end deadlines Are set such that the system requirements are fulfilled in the same way as the time budgets are setShould be specified for the input to and output from the component since the WCET cannot be computed since its parts may be executing with different periods. Page Building Reliable Component-based Systems Chapter 13 -Components in Real-Time SystemsSpecification Of Timing Attributes We specify virtual timing attributes of the composed component, which are used to compute the timing attributes of sub-components, ie:IF virtual period is set to P, THEN the period of a sub-component A should be fA * P AND the period of B is fB * P, WHERE fA and fB are constants for the composed component, which are stored in the component library Page Building Reliable Component-based Systems Chapter 13 -Components in Real-Time SystemsRT Components in Rubus OSRubus:Is one of a few real-time operating systems currently available which have some concept of components. Is a hybrid operating system, in the sense that it supports both pre-emptive static scheduling and fixed priority scheduling.Page Building Reliable Component-based Systems Chapter 13 -Components in Real-Time SystemsA Task and Its InterfacesThe timing requirements are specified by release-time, deadline, WCET and period Page Building Reliable Component-based Systems Chapter 13 -Components in Real-Time SystemsA Composed System in the Red Model of RubusThe task depicted below is required to execute before the outputBrakeValues task, (i.E. Task BrakeLeftRight precedes task outputBrakeValues). Page Building Reliable Component-based Systems Chapter 13 -Components in Real-Time SystemsComposition of Components in Rubus Page Building Reliable Component-based Systems Chapter 13 -Components in Real-Time Systems

Các file đính kèm theo tài liệu này:

  • ppt13_chapterwc_6561.ppt