©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 15 Slide 1 Real-time Systems 2.

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
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
Software Engineering CSCI 3321 Computer Science Department
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.
Tutorial 4 Scheduling. Why do we need scheduling? To manage processes according to requirements of a system, like: –User responsiveness or –Throughput.
Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9 th Edition Chapter 5: Process Synchronization.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 6: Process Synchronization.
Figures – Chapter 20.
Real-time Software Design
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.
Introduction to Operating Systems – Windows process and thread management In this lecture we will cover Threads and processes in Windows Thread priority.
REAL-TIME SOFTWARE SYSTEMS DEVELOPMENT Instructor: Dr. Hany H. Ammar Dept. of Computer Science and Electrical Engineering, WVU.
Chapter 11 Operating Systems
CprE 458/558: Real-Time Systems
1 Lecture 10: Uniprocessor Scheduling. 2 CPU Scheduling n The problem: scheduling the usage of a single processor among all the existing processes in.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 12 Slide 1 Distributed Systems Design 1.
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.
REAL-TIME SOFTWARE SYSTEMS DEVELOPMENT Instructor: Dr. Hany H. Ammar Dept. of Computer Science and Electrical Engineering, WVU.
 Dr. Syed Noman Hasany 1.  Review of known methodologies  Analysis of software requirements  Real-time software  Software cost, quality, testing.
1 소프트웨어공학 강좌 Chap 11. Real-time software Design - Designing embedded software systems whose behaviour is subject to time constraints -
The Functions of Operating Systems Interrupts. Learning Objectives Explain how interrupts are used to obtain processor time. Explain how processing of.
Multiprocessor and Real-Time Scheduling Chapter 10.
1 RTOS Design Some of the content of this set of slides is taken from the documentation existing on the FreeRTOS website
Reference: Ian Sommerville, Chap 15  Systems which monitor and control their environment.  Sometimes associated with hardware devices ◦ Sensors: Collect.
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.
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.
Chapter 5 Concurrency: Mutual Exclusion and Synchronization Operating Systems: Internals and Design Principles, 6/E William Stallings Patricia Roy Manatee.
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.
Chapter 19: Real-Time Systems Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Chapter 19: Real-Time Systems System Characteristics.
Embedded Computer - Definition When a microcomputer is part of a larger product, it is said to be an embedded computer. The embedded computer retrieves.
Slides created by: Professor Ian G. Harris Operating Systems  Allow the processor to perform several tasks at virtually the same time Ex. Web Controlled.
Software Engineering for Embedded Systems Lecture 12.
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.
CE Operating Systems Lecture 8 Process Scheduling continued and an introduction to process synchronisation.
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.
Copyright © Curt Hill More on Operating Systems Continuation of Introduction.
Embedded Real-Time Systems Processing interrupts Lecturer Department University.
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.
CONCEPTS OF REAL-TIME OPERATING SYSTEM. OBJECTIVE  To Understand Why we need OS?  To identify Types of OS  To Define Real - Time Systems  To Classify.
Real-time Software Design. Objectives To explain the concept of a real-time system and why these systems are usually implemented as concurrent processes.
Real-time Software Design
Real-time Software Design
Real-time Software Design
Lesson Objectives Aims Key Words Interrupt, Buffer, Priority, Stack
Applied Operating System Concepts -
Real-time Software Design
Real-time Software Design
Real-time & distributed Software Design
Real-time Software Design
Processor Fundamentals
CS 501: Software Engineering Fall 1999
Real-time & distributed Software Design
Input-Output-Process Demo
Presentation transcript:

©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 15 Slide 1 Real-time Systems 2

©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 15 Slide 2 Process switching l The scheduler chooses the next process to be executed by the processor. This depends on a scheduling strategy which may take the process priority into account. l The resource manager allocates memory and a processor for the process to be executed. l The dispatcher takes the process from ready list, loads it onto a processor and starts execution.

©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 15 Slide 3 Scheduling strategies l Non pre-emptive scheduling Once a process has been scheduled for execution, it runs to completion or until it is blocked for some reason (e.g. waiting for I/O). l Pre-emptive scheduling The execution of an executing processes may be stopped if a higher priority process requires service. l Scheduling algorithms Round-robin; Rate monotonic; Shortest deadline first.

©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 15 Slide 4 Monitoring and control systems l Important class of real-time systems. l Continuously check sensors and take actions depending on sensor values. l Monitoring systems examine sensors and report their results. l Control systems take sensor values and control hardware actuators.

©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 15 Slide 5 Generic architecture

©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 15 Slide 6 Burglar alarm system l A system is required to monitor sensors on doors and windows to detect the presence of intruders in a building. l When a sensor indicates a break-in, the system switches on lights around the area and calls police automatically. l The system should include provision for operation without a mains power supply.

©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 15 Slide 7 Burglar alarm system l Sensors Movement detectors, window sensors, door sensors; 50 window sensors, 30 door sensors and 200 movement detectors; Voltage drop sensor. l Actions When an intruder is detected, police are called automatically; Lights are switched on in rooms with active sensors; An audible alarm is switched on; The system switches automatically to backup power when a voltage drop is detected.

©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 15 Slide 8 The R-T system design process l Identify stimuli and associated responses. l Define the timing constraints associated with each stimulus and response. l Allocate system functions to concurrent processes. l Design algorithms for stimulus processing and response generation. l Design a scheduling system which ensures that processes will always be scheduled to meet their deadlines.

©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 15 Slide 9 Stimuli to be processed l Power failure Generated aperiodically by a circuit monitor. When received, the system must switch to backup power within 50 ms. l Intruder alarm Stimulus generated by system sensors. Response is to call the police, switch on building lights and the audible alarm.

©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 15 Slide 10 Timing requirements

©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 15 Slide 11 Burglar alarm system processes

©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 15 Slide 12 Control systems l A burglar alarm system is primarily a monitoring system. It collects data from sensors but no real-time actuator control. l Control systems are similar but, in response to sensor values, the system sends control signals to actuators. l An example of a monitoring and control system is a system that monitors temperature and switches heaters on and off.

©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 15 Slide 13 A temperature control system

©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 15 Slide 14 Data acquisition systems l Collect data from sensors for subsequent processing and analysis. l Data collection processes and processing processes may have different periods and deadlines. l Data collection may be faster than processing e.g. collecting information about an explosion. l Circular or ring buffers are a mechanism for smoothing speed differences.

©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 15 Slide 15 Data acquisition architecture

©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 15 Slide 16 Reactor data collection l A system collects data from a set of sensors monitoring the neutron flux from a nuclear reactor. l Flux data is placed in a ring buffer for later processing. l The ring buffer is itself implemented as a concurrent process so that the collection and processing processes may be synchronized.

©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 15 Slide 17 Reactor flux monitoring

©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 15 Slide 18 A ring buffer

©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 15 Slide 19 Mutual exclusion l Producer processes collect data and add it to the buffer. Consumer processes take data from the buffer and make elements available. l Producer and consumer processes must be mutually excluded from accessing the same element. l The buffer must stop producer processes adding information to a full buffer and consumer processes trying to take information from an empty buffer.

©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 15 Slide 20 Key points l Monitoring and control systems poll sensors and send control signal to actuators. l Data acquisition systems are usually organised according to a producer consumer model.