Presentation is loading. Please wait.

Presentation is loading. Please wait.

Page 1 Building Reliable Component-based Systems Chapter 13 -Components in Real-Time Systems Chapter 13 Components in Real-Time Systems.

Similar presentations


Presentation on theme: "Page 1 Building Reliable Component-based Systems Chapter 13 -Components in Real-Time Systems Chapter 13 Components in Real-Time Systems."— Presentation transcript:

1 Page 1 Building Reliable Component-based Systems Chapter 13 -Components in Real-Time Systems Chapter 13 Components in Real-Time Systems

2 Page 2 Building Reliable Component-based Systems Chapter 13 -Components in Real-Time Systems Overview qIntroduction qCharacteristics and challenges of real-time systems qReal-time component models qDesigning component-based real-time systems qComposition of components qExample: RT components in Rubus OS

3 Page 3 Building Reliable Component-based Systems Chapter 13 -Components in Real-Time Systems Introduction q Embedded computers l Medical control equipment, mobile phones, and vehicle control systems. l Most of such embedded systems can also be characterized as real-time systems. l They must usually meet stringent specifications for safety, reliability, limited hardware capacity etc

4 Page 4 Building Reliable Component-based Systems Chapter 13 -Components in Real-Time Systems Characteristics and Challenges of RTS q Real-time systems are computing systems in which the meeting of timing constraints is essential to correctness. q If the system delivers the correct answer, but after a certain deadline, it could be regarded as having failed.

5 Page 5 Building Reliable Component-based Systems Chapter 13 -Components in Real-Time Systems Tasks q Real-time systems can be constructed of sequential programs, but typically they are built of concurrent programs, called tasks. q Tasks are usually divided into: l Periodic tasks: consist of an infinite sequence of identical activities, called instances, which are invoked within regular time periods. l Non-periodic : are invoked by the occurrence of an event.

6 Page 6 Building Reliable Component-based Systems Chapter 13 -Components in Real-Time Systems Scheduling q Offline scheduling: l The scheduler has complete knowledge of the task set and its constraints. q Online scheduling: l Make their scheduling decisions during run-time. q Deadline: l Is the maximum time within which the task must complete its execution with respect to an event. l Real-time systems are divided into two classes, hard and soft real-time systems

7 Page 7 Building Reliable Component-based Systems Chapter 13 -Components in Real-Time Systems Limited Resources qCommon CBSE technologies (JavaBeans, CORBA and COM) are seldom used as they: l Require excessive processing requirements l Require excessive memory requirements l Provide unpredictable timing characteristics

8 Page 8 Building Reliable Component-based Systems Chapter 13 -Components in Real-Time Systems System Level Analysis q At system level we analyze to determine if the system composed fulfils the timing requirements. l Several different mature analysis methods exist, for example, analysis for priority-based systems and pre- run-time scheduling techniques

9 Page 9 Building Reliable Component-based Systems Chapter 13 -Components in Real-Time Systems Real-time Component Models q Using 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.

10 Page 10 Building Reliable Component-based Systems Chapter 13 -Components in Real-Time Systems Application-specific Component Models q Maintain a component library which the application engineer can use when developing an application. qIn addition to infrastructure components, domain specific component models, which in fact have been used for many years for certain domains must be considered.

11 Page 11 Building Reliable Component-based Systems Chapter 13 -Components in Real-Time Systems IEC 61131-3 Application Structure Global anddirectvariables Accesspath Execution controlpath Variable accesspath FB Task Program FB Task Program Task Program FB Task Resource Configuration CommunicationFunction Block Variable

12 Page 12 Building Reliable Component-based Systems Chapter 13 -Components in Real-Time Systems A Configuration in IEC 61131-3 qEncapsulates all software for an application and consists of one or several resources which provide the computational mechanisms.

13 Page 13 Building Reliable Component-based Systems Chapter 13 -Components in Real-Time Systems A Program in IEC 61131-3 q A program is written in any of the languages proposed in the standard, for example: l Instruction lists l Assembly languages l Structured text l A high level language similar to Pascal l Ladder diagrams l Function block diagrams (FBD)

14 Page 14 Building Reliable Component-based Systems Chapter 13 -Components in Real-Time Systems Function Block Diagram A simple function block diagram representing a feedback control loop. FB 1 FB 2

15 Page 15 Building Reliable Component-based Systems Chapter 13 -Components in Real-Time Systems A Port-based Object Approach q The model is based upon the development of domain- specific components which maximize usability, flexibility and predictable temporal behavior. l Independent tasks are the bases for the PBO model. l Whenever a PBO needs data for its computation, it reads the most recent information from its in-ports, irrespective of its producer. l The PBOs are in their nature periodic and the system can be analyzed using traditional schedulability analysis.

16 Page 16 Building Reliable Component-based Systems Chapter 13 -Components in Real-Time Systems A Port-based Object Port-basedobject Variable input ports Variable output ports Resource ports for communication with sensors and actuators Configuration parameters

17 Page 17 Building Reliable Component-based Systems Chapter 13 -Components in Real-Time Systems Designing Component-based RTS System specification Top-level design Detailed design Scheduling / interface check Obtain components timing behavior on target platform System verification Final product Component library Create specifications for the new components Implement and verify new components using classical development methods Add new components to library Architecture analysis

18 Page 18 Building Reliable Component-based Systems Chapter 13 -Components in Real-Time Systems Top-level Design qThe first stage of the development process involves de- composition of the system into manageable components

19 Page 19 Building Reliable Component-based Systems Chapter 13 -Components in Real-Time Systems Detailed Design q At this stage a detailed component design is performed, by selecting components to be used from the candidate set.

20 Page 20 Building Reliable Component-based Systems Chapter 13 -Components in Real-Time Systems Architecture Analysis q At this stage it is time to check that the system under development satisfies extra-functional requirements such as: l Maintainability l Reusability l Modifiability l Testability

21 Page 21 Building Reliable Component-based Systems Chapter 13 -Components in Real-Time Systems Scheduling q 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. qIn other words, we need to make a schedulability analysis of the system based on the temporal requirements of each component

22 Page 22 Building Reliable Component-based Systems Chapter 13 -Components in Real-Time Systems WCET Verification q Performing a worst-case analysis can either be based on measurements or on a static analysis of the source code. q 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.

23 Page 23 Building Reliable Component-based Systems Chapter 13 -Components in Real-Time Systems An Execution Time Graph Execution time Input domain 1 domain 2 domain 3 q q The execution time shows different values for the different input sub-domains.

24 Page 24 Building Reliable Component-based Systems Chapter 13 -Components in Real-Time Systems Maximum execution time per sub-domain Execution time Input domain 1 domain 2 domain 3

25 Page 25 Building Reliable Component-based Systems Chapter 13 -Components in Real-Time Systems Implementation of New Components q New components; Those not already in the library must be implemented. The designer of the component has two requirements: l The functional requirements l The assigned time budget

26 Page 26 Building Reliable Component-based Systems Chapter 13 -Components in Real-Time Systems System Build and Test q Finally, we build the system using old and new components. q We must now verify the functional and temporal properties of the system obtained. q If the verification test fails, we must return to the relevant stage of the development process and correct the error.

27 Page 27 Building Reliable Component-based Systems Chapter 13 -Components in Real-Time Systems Component Library q Is the most central part of any CBSE system as it contains binaries of components and their descriptions. qA component library containing real-time components should provide the following: l Memory requirements l WCET test cases l Dependencies l Environment assumptions

28 Page 28 Building Reliable Component-based Systems Chapter 13 -Components in Real-Time Systems Composition of Components

29 Page 29 Building Reliable Component-based Systems Chapter 13 -Components in Real-Time Systems End-To-End Deadlines q End-to-end deadlines l Are set such that the system requirements are fulfilled in the same way as the time budgets are set l Should 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.

30 Page 30 Building Reliable Component-based Systems Chapter 13 -Components in Real-Time Systems Specification Of Timing Attributes q 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 f A * P AND the period of B is f B * P, WHERE f A and f B are constants for the composed component, which are stored in the component library

31 Page 31 Building Reliable Component-based Systems Chapter 13 -Components in Real-Time Systems RT Components in Rubus OS q Rubus: l Is one of a few real-time operating systems currently available which have some concept of components. l Is a hybrid operating system, in the sense that it supports both pre-emptive static scheduling and fixed priority scheduling.

32 Page 32 Building Reliable Component-based Systems Chapter 13 -Components in Real-Time Systems A Task and Its Interfaces q The timing requirements are specified by release-time, deadline, WCET and period

33 Page 33 Building Reliable Component-based Systems Chapter 13 -Components in Real-Time Systems A Composed System in the Red Model of Rubus q The task depicted below is required to execute before the outputBrakeValues task, (i.E. Task BrakeLeftRight precedes task outputBrakeValues).

34 Page 34 Building Reliable Component-based Systems Chapter 13 -Components in Real-Time Systems Composition of Components in Rubus


Download ppt "Page 1 Building Reliable Component-based Systems Chapter 13 -Components in Real-Time Systems Chapter 13 Components in Real-Time Systems."

Similar presentations


Ads by Google