Download presentation
Presentation is loading. Please wait.
1
CS 501: Software Engineering Fall 1999
Lecture 25 Real Time Systems
2
Administration Examination schedule
3
Real Time System A real time system is a software system whose correct functioning depends upon the results produced and the time at which they are produced. A soft real time system is degraded if the results are not produced within required time constraints A hard real time system fails if the results are not produced within required time constraints
4
Embedded Systems Software and hardware are combined to provide an integrated unit, usually dedicated to a specific task Digital telephone Automobile engine control GPS Scientific instruments The software may be embedded in the device in a manner that can not be altered after manufacture
5
Autonomous Land Vehicle
GPS Steer Sonar Model Control signals Throttle Laser Controls Sensors Signal processing
6
Other Applications Response critical Network router
Telephone switch Seat bag controller Shared systems Multi-user data processing Time sharing
7
Techniques Special purpose hardware
Multi-threading and multi-tasking Parallel processing => digital signal processing Interrupts => levels and priorities
8
Multi Threading Several similar threads operating concurrently
Re-entrant code -- separation of pure code from data for each thread Testing -- single thread and multi thread May be real time (e.g., telephone switch) or non-time critical
9
Real Time Executive Schedules and dispatches tasks in a real time system Real time clock Interrupt handler Scheduler Resource manager Dispatcher Must be extremely reliable
10
Timing Timing mechanisms Synchronous (clocked) -- periodic stimuli
Asynchronous -- wait for next signal Example: Communications protocols may be synchronous or asynchronous
11
Hardware v. Software Design of embedded systems requires close understanding of hardware characteristics Special purpose hardware requires special tools and expertise. Some functions may be implemented in either hardware of software (e.g., floating point unit) Design requires separation of functions Distinction between hardware and software may be blurred
12
Dartmouth Time Shared System
Central processor Communications processor I/O Mulitplexor Central processor Communications processor Central processor
13
Software Considerations
Resource considerations may dictate software design and implementation: Low level language (e.g., C) where programmer has close link to machine Inter-process communication may be too slow (e.g., C fork). May implement special buffering, etc., to control timings
14
Example: CD Controller
4 3 1 Input block 5 2 Output block 6 7 Circular buffer
15
Continuous Operation Many embedded systems must operate continuously
Software update while operating Hardware monitoring and repair Alternative power supplies, networks, etc. Remote operation These functions must be designed into the fundamental architecture
16
Routers and Other Network Computing
Interoperation with third party devices Support for several versions of protocols Restart after total failure Defensive programming -- must survive => erroneous or malicious messages => extreme loads Time outs, dropped packets, etc. Evolution of network systems
17
Software Development Testing and debugging need special tools and environments Debuggers, etc., can not be used to test real time performance Simulation of environment may be needed to test interfaces -- e.g., adjustable clock speed General purpose tools may not be available
18
Software Engineering for Real Time
The special characteristics of real time computing require extra attention to good software engineering principles: Requirements analysis and specification Development of tools Modular design Exhaustive testing Heroic programming will fail!
19
Reading Before the examination, read Sommerville Chapters 25, 26 and 27
Similar presentations
© 2024 SlidePlayer.com Inc.
All rights reserved.