1 / 32 CS 425/625 Software Engineering Real-Time Software Design Based on Chapter 15 of the textbook [SE-8] Ian Sommerville, Software Engineering, 8 th.

Slides:



Advertisements
Similar presentations
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 13Slide 1 Chapter 13 Real-time Software Design.
Advertisements

1 Note content copyright © 2004 Ian Sommerville. NU-specific content copyright © 2004 M. E. Kabay. All rights reserved. Real-time Software Design IS301.
Real-time Software Design
© Alan Burns and Andy Wellings, 2001 Real-Time Systems and Programming Languages n Buy Real-Time Systems: Ada 95, Real-Time Java and Real-Time POSIX by.
Real-time software Sommerville, Hfst. 13. Sommerville, Ch. 132 Real-time systems A real-time system is a software system where the correct functioning.
Chapter 20- Embedded Systems
Chapter 2 Real-time software design
Chapter 20- Embedded Systems Lecture 1. Topics covered  Embedded systems design  Architectural patterns  Timing analysis  Real-time operating systems.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 15 Slide 1 Real-time Systems 2.
Real-time Software Design
© Andy Wellings, 2004 Concurrent and Real-Time Programming in Java  Electronic copies of course foils available via 
Chapter 13 Embedded Systems
REAL-TIME SOFTWARE SYSTEMS DEVELOPMENT Instructor: Dr. Hany H. Ammar Dept. of Computer Science and Electrical Engineering, WVU.
Real-Time Systems and Programming Languages
Real-Time Kernels and Operating Systems. Operating System: Software that coordinates multiple tasks in processor, including peripheral interfacing Types.
1 / 26 CS 425/625 Software Engineering Architectural Design Based on Chapter 11 of the textbook [SE-8] Ian Sommerville, Software Engineering, 8t h Ed.,
CprE 458/558: Real-Time Systems
Misconceptions About Real-time Computing : A Serious Problem for Next-generation Systems J. A. Stankovic, Misconceptions about Real-Time Computing: A Serious.
1 Chapter 13 Embedded Systems Embedded Systems Characteristics of Embedded Operating Systems.
EMBEDDED SOFTWARE Team victorious Team Victorious.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 15 Slide 1 Real-time Systems 1.
1 Reference architectures u Reference models are derived from a study of the application domain rather than from existing systems u May be used as a basis.
1 Embedded Systems Development. 2 Topics covered  Embedded systems design  Architectural patterns  Timing analysis  Real-time operating systems.
Real-Time Software Design Yonsei University 2 nd Semester, 2014 Sanghyun Park.
Instructore: Tasneem Darwish1 University of Palestine Faculty of Applied Engineering and Urban Planning Software Engineering Department Concurrent and.
REAL-TIME SOFTWARE SYSTEMS DEVELOPMENT Instructor: Dr. Hany H. Ammar Dept. of Computer Science and Electrical Engineering, WVU.
Advanced Operating Systems CIS 720 Lecture 1. Instructor Dr. Gurdip Singh – 234 Nichols Hall –
 Dr. Syed Noman Hasany 1.  Review of known methodologies  Analysis of software requirements  Real-time software  Software cost, quality, testing.
1 CS 501 Spring 2003 CS 501: Software Engineering Lecture 16 System Architecture and Design II.
1. Introduction 1.1 Background 1.2 Real-time applications 1.3 Misconceptions 1.4 Issues in real-time computing 1.5 Structure of a real-time system.
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 10Slide 1 Architectural Design l Establishing the overall structure of a software system.
1 소프트웨어공학 강좌 Chap 11. Real-time software Design - Designing embedded software systems whose behaviour is subject to time constraints -
CS4730 Real-Time Systems and Modeling Fall 2010 José M. Garrido Department of Computer Science & Information Systems Kennesaw State University.
© Oxford University Press 2011 DISTRIBUTED COMPUTING Sunita Mahajan Sunita Mahajan, Principal, Institute of Computer Science, MET League of Colleges, Mumbai.
EEL Software development for real-time engineering systems.
Scheduling policies for real- time embedded systems.
Reference: Ian Sommerville, Chap 15  Systems which monitor and control their environment.  Sometimes associated with hardware devices ◦ Sensors: Collect.
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 10Slide 1 Architectural Design l Establishing the overall structure of a software system.
Slide 1 Chapter 11 Real –time Software Designs. Slide 2 Real-time systems l Systems which monitor and control their environment l Inevitably associated.
EKT 424 Real Time System 1.
Prepare by : Ihab shahtout.  Overview  To give an overview of fixed priority schedule  Scheduling and Fixed Priority Scheduling.
REAL-TIME SOFTWARE SYSTEMS DEVELOPMENT Instructor: Dr. Hany H. Ammar Dept. of Computer Science and Electrical Engineering, WVU.
1 / 30 CS 425/625 Software Engineering Real-Time Software Design Based on Chapter 13 of the textbook [SOMM00] Ian Sommerville, Software Engineering, 6.
©Ian Sommerville, Robin Abraham 2004CS 361, Summer 2004 Slide 1 Real-time Software Design.
Real-time Software Design King Saud University College of Computer and Information Sciences Department of Computer Science Dr. S. HAMMAMI.
Operating Systems 1 K. Salah Module 1.2: Fundamental Concepts Interrupts System Calls.
CS4730 Real-Time Systems and Modeling Fall 2010 José M. Garrido Department of Computer Science & Information Systems Kennesaw State University.
1 / 26 CS 425/625 Software Engineering Architectural Design Based on Chapter 10 of the textbook [Somm00] Ian Sommerville, Software Engineering, 6 th Ed.,
Chapter 21– Real-time Software Engineering 04/12/2014Chapter 21. Real-time Software Engineering1.
19.1 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts with Java – 8 th Edition Chapter 19: Real-Time Systems.
Real-time Software Design Chapter 15 of Ian Sommerville’s Book on Software Engineering.
1.  System Characteristics  Features of Real-Time Systems  Implementing Real-Time Operating Systems  Real-Time CPU Scheduling  An Example: VxWorks5.x.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 15 Slide 1 Real-time Software Design.
Real-time System Definition A real-time system is a software system where the correct functioning of the system depends on the results produced by the.
Embedded Real-Time Systems Processing interrupts Lecturer Department University.
Embedded System Design and Development Introduction to Embedded System.
Embedded software / Real-time Software Engineering 1.
Real-time Software Design. Objectives l To explain the concept of a real-time system and why these systems are usually implemented as concurrent processes.
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 10Slide 1 Chapter 5:Architectural Design l Establishing the overall structure of a software.
Real-Time Operating Systems RTOS For Embedded systems.
Real-time Software Design
Real-time Software Design
Real-time Software Design
Advanced Operating Systems CIS 720
Real-time Software Design
Real-time Software Design
Real-time Software Design
CS 501: Software Engineering Fall 1999
Chapter 10 Multiprocessor and Real-Time Scheduling
CS 491z / CS 791z Topics on Software Engineering
Presentation transcript:

1 / 32 CS 425/625 Software Engineering Real-Time Software Design Based on Chapter 15 of the textbook [SE-8] Ian Sommerville, Software Engineering, 8 th Ed., Addison-Wesley, 2006 and on the Ch15 PowerPoint presentation available at the book’s web-site October 29, 2007

2 / 32 Outline n n Introduction n n Real-Time Systems (RTS): A Characterization n n RTS Design n n RT Operating Systems n n Generic RTS architectures: u u Monitoring and Control Systems u u Data Acquisition Systems

3 / 32 Introduction.… n n Real-Time Systems: systems whose correct operation depends not only on the correctness of the results produced but also on the time at which these results are produced. n n Embedded Systems [ An embedded system is a special-purpose computer system designed to perform one or a few dedicated functions, sometimes with real-time computing constraints. It is usually embedded as part of a complete device including hardware and mechanical parts.computerreal-time computing In contrast, a general-purpose computer, such as a personal computer, can do many different tasks depending on programming. Since the embedded system is dedicated to specific tasks, design engineers can optimize it, reducing the size and cost of the product, or increasing the reliability and performance.personal computer

4 / 32.Introduction... n n RTS receive stimuli (both external and internal) and provide responses to these stimuli n n Stimuli: u u Periodic: occur at preset intervals of time (e.g., every 20 ms) u u Aperiodic: have irregular occurrences n n The sensor-system-actuator model of RTS: sensors provide inputs (stimuli), computational units elaborate responses, and actuators convey outputs (responses)

5 / 32..Introduction.. n n Three types of processes: u u Sensor management u u Computational u u Actuator management n n Since many stimuli need immediate treatment software handlers are needed. Handlers can run concurrently, hence RTS are usually designed as a set of concurrent processes.

6 / 32...Introduction. n n General model of an RTS [Fig. 15.1, SE-8]

7 / 32.…Introduction n n Sensor/actuator processes [Fig. 15.2, SE-8]

8 / 32 RTS: A Characterization…… n n This section of the presentation is based on [Dascalu01] n n “A real-time system must respond to externally generated stimuli within a finite, specifiable time delay” [Everett95] n n An RTS differs from a “regular” (non-RTS) system in at least the following aspects [Stankovic88]: u u Have deadlines attached to some or all tasks u u Faults in the system may lead to catastrophic consequences u u Must have the ability to deal with exceptions u u Must be fast, predictable reliable, adaptive

9 / 32.RTS: A Characterization.…. n n “ Development of most software focuses on how to handle a normal situation, but real-time, critical- application development also focuses on how to handle the abnormal situation” [Everett95] n n RTS “must operate under more severe constraints than ‘normal’ software yet perform reliably for long periods of time” [Douglass99]

10 / 32..RTS: A Characterization…. n n A classification of RTS:

11 / 32 …RTS: A Characterization… n n Requirements for RTS: u u Timeliness   Reaction to stimuli “on time” (deadlines must be met)   Relative and absolute timing constraints u u Reliability   Many errors have roots in incorrect specification   Formal techniques needed for safety-critical systems u u Intensive dynamics   Models to describe behavior are necessary (based on finite state machines)

12 / 32 ….RTS: A Characterization.. n n Requirements for RTS (cont’d) : u u Exception handling   Priorities should be assigned to stimuli/events   Mechanisms for handling interrupts need be developed u u Concurrency   Parallel tasks are inherent in RTS   The environment is also “concurrent” in nature u u Distribution & resource allocation   Distribution is not necessarily a characteristic of RTS, but should be taken into consideration in larger applications

13 / 32 …..RTS: A Characterization. n n Requirements for RTS (cont’d) : u u Communication and synchronization   Synchronous and asynchronous communication mechanisms should be designed u u Size   In larger applications, there are numerous processes and threads   Size is associated with continuous change   Decomposition in smaller units is needed, as are mechanisms for modeling hierarchical structures

14 / 32.…..RTS: A Characterization n n Requirements for RTS (cont’d) : u u Non time-constrained activities   Worst case scenarios cannot be easily evaluated u u Computations & data modeling   In process control systems computations can be complex   In RT databases data must have temporal validity u u Reuse   RTS are poor candidates for reuse (are too specialized)   However, OO design may provide solutions

15 / 32 RTS Design… n n Both the hardware and the software of the system must be designed and system functions allocated to either hardware or software n n RTS design process should result in a system model that can be implemented in either software or hardware n n Special-purpose hardware: u u Better performance, but u u Longer development time, and u u Less suitable to change

16 / 32.RTS Design.. n n An RTS design process focuses on events (stimuli) rather than on objects or functions n n Suggested RTS design process: u u Identify stimuli and associated responses u u Identify timing constraints on stimuli and responses u u Choose an execution platform for the system: hardware & RTOS u u Aggregate stimulus and response processing activities in several concurrent processes u u Design computational algorithms for each stimulus/response association u u Design the scheduling software

17 / 32..RTS Design. n n RTS modeling relies on the use of state machines n n Timing constraints: u u May require extensive simulation and experimentation u u May preclude the use of an object-oriented development approach (because of the overhead involved at run-time) u u May require, for performance reasons, programming in assembly languages or system-level languages such as C

18 / 32 …RTS Design n n RT programming: u u System-level languages (e.g., C) allow elaboration of efficient code but the burden to express concurrency and to manage shared resources is on the programmer u u Specially designed languages with good synchronization mechanisms such as Ada still have a number of limitations (e.g., lack of exceptions when deadlines are not met, strict FIFO policy for task queues) u u Java has several facilities for lightweight RT programming (threads, synchronized methods) but also a number of limitations (e.g., garbage collector not controllable, JVM has various implementations)

19 / 32 RT Operating Systems... n n RTOS: specialized operating system for RTS n n Main responsibilities: u u Process management u u Resource allocation (processor, memory) n n They may not include regular OS facilities such as file management n n Manage at least two priority levels: u u Interrupt level, for processes that need fast response u u Clock level, for periodic processes n n Typical components: real-time clock, interrupt handler, scheduler, resource manager, dispatcher

20 / 32.RT Executives.. n n Typical structure of an RTOS [Fig. 15.4, SE-8]

21 / 32..RTOS. n n Process management: u u Coordination of the system’s set of concurrent processes u u Periodic processes run at pre-set intervals of time u u Process period: time between executions u u Process deadline: the time by which the process must be complete u u The executive uses the real-time clock to determine when a process must execute; a real-time tick period is usually several milliseconds long

22 / 32...RTOS n n RTOS actions to start a process [Fig. 15.5, SE-8] n n Scheduling strategies: u u Non-preemptive: a process scheduled for execution runs until completion or until blocked (e.g., waiting for an input) u u Pre-emptive: a higher-priority process can take over a lower- priority process n n Scheduling algorithms, examples: round-robin, shortest deadline first, rate monotonic

23 / 32 Generic RTS Architectures..…. n n Typical classes of RTS (each with a characteristic architecture): u u Monitoring and control systems [MCS]:   Monitoring systems examine sensors and report their results; may take action in exceptional cases   Control systems read sensors and continuously command actuators u u Data acquisition systems [DAS] collect data from sensors for later processing and analysis

24 / 32 Generic RTS Architectures..…. Generic MCS architecture [Fig. 15.6, SE-7]

25 / 32.Generic RTS Architectures..… n n An intruder alarm system (monitoring system): u u Monitors sensors on doors and windows to detect the presence of intruders in a building; also monitors movement sensors in rooms u u When a sensor indicates a break-in, switches on lights around the area and calls police automatically u u Powered by a main power supply but also has provisions for battery backup; includes a power circuit monitor n n Timing requirements for the system are shown on the next page [Fig.15.7, SE-8]

26 / 32..Generic RTS Architectures....

27 / 32...Generic RTS Architectures… n n The architecture of the intruder alarm system [Fig. 15.8, SE-8]

28 / 32 ….Generic RTS Architectures.. n n Architecture of a temperature control system [Fig , SE-8]

29 / 32 …..Generic RTS Architectures. n n Generic DAS architecture [Fig , SE-8]

30 / 32 …..Generic RTS Architectures. n n A neutron flux data acquisition system [Fig , SE-8]

31 / 32 ……Generic RTS Architectures n A ring buffer for data acquisition [Fig , SE-8]

32 / 32 Additional References [Dascalu01] Dascalu, S., Combining Semi-formal and Formal Notations in Software Specification: An Approach to Modelling Time-Constrained Systems, PhD thesis, Dalhousie University, Halifax, NS, Canada, [Douglass99]Douglass, B.P., Doing Hard Time: Developing Real-Time Systems with UML, Objects, Frameworks and Patterns, Addison-Wesley, [Everett95]Everett, W., and Honiden, S., “Reliability and Safety of Real-Time Systems,” IEEE Software, 12(3), May 1995, p [Gibbs94]Gibbs, W.W., “Software’s Chronic Crisis,” Scientific American, Sep. 1994, p [Stankovic88] Stankovic, J.A., and Ramamritham, K., Tutorial: Hard Real-Time Systems, IEEE Computer Society Press, 1988.