inroduction to real time systems
DESCRIPTION
This document talks the basics of realtime systems. An introduction to students who are interested to know what a real time system is and what kinds of real time systems are there.TRANSCRIPT
-
Real Time System-- Subra Ganesan 1
Real Time SystemsA brief introduction for ECE 573 students
Subra Ganesan
Professor, Oakland University, Rochester, MI 48309
Rochester, MI 48309
-
Real Time System-- Subra Ganesan 2
Real time embedded systems are used in many applications
widely.
In this lecture you learn:
Introduction to RTS (Real Time Systems)
Definition
Example Car and Driver
Characteristics of RTS
-
Real Time System-- Subra Ganesan 3
Introduction
Any system where a timely response by the computer to
external input/condition is vital is a real-time system.
Timely: Meet the deadline.
Deadline: Hard and soft
Complete task: Accurately or estimate within deadline.
Hard Real-Time Systems: Aircraft,Nuclear Reactor
control.
Soft Real-time Systems: Multimedia,Internet access.
-
Real Time System-- Subra Ganesan 4
Automotive DSP Applications
Navigation Cellular Phone Comfort/Security Equipment
Powertrain Anti-Lock Brakes Voice Command Electronic Steering
Global PositioningDigital MapAdaptative cruiseParking aid
Digital RadioCompact DiskGraphic EqualizerSound Enhancement
Voice DialingFiltering
Electrical seatsWindow lifterAirbagAnti theft
Electrical brakes (BBW) Speech Recognition(E.G. lights, window)Speaker Verificationfor Secure Lock
Electrical powerSteering (EPS)4-Wheel steering
Hydraulic or Air Pressure ControlDynamic Control
Audio Processing
Which are the Hard/Soft Real Time Systems ?
-
Real Time System-- Subra Ganesan 5
Driver is the real time controller
Car is the controlled process
Road is the operating environment
Mission is to reach the destination
Performance Measure:
1)Time to reach the destination under various road conditions
2)Safety of the driver even if the destination is not reached
Task deadlines are not constants ,varies with the operating environment.
Writing formal specification and relating them is difficult.
A Car and Driver Example
-
Real Time System-- Subra Ganesan 6
Issues in Real-time Computing
Research areas cover: Computer architecture, fault tolerant
computers, networks, embedded systems, standards, digital
communication, operating system clock synchronization,..
Example:
Task-Scheduling:For a normal system the goal is fairness to all
tasks. Round-robin scheduling.
For a RT system: Meet the deadlines for critical and high priority
tasks is the goal.
Task-Execution time should be predictable in RT system. For a
cache based RT system memory access time varies.
-
Real Time System-- Subra Ganesan 7
Structure of a Real-time System
Controlled
processSensors
Job
ListClock
Trigger
generator
ActuatorsExecution
Display Operator
Environment
Figure: A Schematic Diagram of a real-time system
-
Real Time System-- Subra Ganesan 8
Task classes
Periodic and aperiodic tasks
Aperiodic tasks with a bounded inter-arrival time are
called sporadic tasks
Critical and non-critical tasks.
-
Real Time System-- Subra Ganesan 9
OPERATING SYSTEM ISSUES
Task assignment and scheduling
Communications protocols
Failure management and recovery
Clock synchronization algorithms
Other issues
Programming languages
Databases
Performance measure
-
Real Time System-- Subra Ganesan 10
Characteristics of RTS
Performance :
validation process includes
(1) Checking design correctness using formal and informal
methods,
(2) Characterizing performance
(3) Reliability
Choosing performance measure is crucial.
e.g : average time, peak time or variance.
Clock cycle may be misleading.
For soft RT, degraded response time is acceptable.
-
Real Time System-- Subra Ganesan 11
Traditional Performance Measures
Reliability is the probability the system will not fail in an
interval
Availability is the fraction of time for which the system is up.
Throughput is the average number of instructions per unit time
the RTS can process.
Capacity Reliability(CR): Interval time when reliability is high.
Expected capacity survival time is the expected time for CR to
drop to specific value.
Mean computation before failure
Computational reliability
Computational availability
Per formability
Accomplishment levels
Cost functions for hard deadlines: Cost Vs Response times
-
Real Time System-- Subra Ganesan 12
Definition of Real Time System
There are many interpretation of a real time system; however, they
all consider the notion of response time the time take for the
system to generate output from some associated input.
Any information processing activity or system which has to
respond to externally generated input stimuli within a finite and
specified period.
A real-time system is a system that is required to react to stimuli
from the environment (including the passage of physical time)
within time intervals dictated by the environment.
The correctness of a real-time system depends not only on the
logical result of the computation, but also on the time at which the
results are produced.
-
Real Time System-- Subra Ganesan 13
Definition of Real Time System
Hard real-time system and soft real-time systems:
(1) Hard real-time systems are those where it is
absolutely imperative the response occur within
the specified deadline.
(2) Soft real-time systems are those where
response time are important but the system will
still function correctly if deadlines are
occasionally missed.
-
Examples of Real-time System:
Process Control
Process control
Computer
Valve Temperature
transducer
Stirrer
Chemicals
and
materials
Finished
Product
Operator
console
Plant
A Process Control System
-
Real Time System-- Subra Ganesan 15
Examples of Real-time Systems:
Manufacturing
Production control
computer
. . . .
Machine tools Manipulators Conveyor belts
A Production Control System
PartsFinished
Product
-
Real Time System-- Subra Ganesan 16
Examples of real-time Systems:
Communication,command and control
Command Post
Command and
control computer
Temperature,pressure,power and so on
Terminals Sensors/actuators
A Command and Control System
-
Real Time System-- Subra Ganesan 17
Examples of Real-time Systems-
Generalized Embedded Computer Systems
Algorithms for
digital control
Data logging
Data retrieval
and display
Operator
interface
Real-time computer
Real-time
clock
Database
Operators
console
InterfaceEngineering
system
Remote
monitoring
system
Display
devices
A Typical
Embedded System
-
Real Time System-- Subra Ganesan 18
Characteristics of Real-time Systems
A real-time system has many special characteristics (either inherent or imposed). Clearly, not all real-time systems will exhibit the same characteristics.
(1) Large and complex.
-Largeness of the system is related to variety which is caused by the continuous changing requirements of the real world. Traditional indicators, such as number of instructions and development effort, are just symptoms of variety. Therefore, real-time systems undergo constant maintenance and enhancements during their lifetimes. They must be extensible.
-Although real-time software is often complex, it cab be broken down into smaller components which can be managed effectively.
-
Real Time System-- Subra Ganesan 19
Characteristics of Real-time Systems
(2) Manipulation of real numbers:
-Many real-time systems involve the control of some
engineering activity and most controllers are nowadays
implemented by computers.
-The implementation of control algorithms using
computers is often mathematically complex and require high
degree of a real time programming language, therefore, is the
ability to manipulate real, fixed- or floating-point numbers.
-
Real Time System-- Subra Ganesan 20
Characteristics of Real-time Systems
(3) Extremely reliable and safe:
-The more society passes the control of its vital functions to computers, the more important it becomes that those computers do not fail.
*failure of a system involved in automatic fund transfer between banks may cause the loss of millions of dollars.
*a faulty component in electricity generation could result in the failure of the vital life-support system in a intensive care unit.
-The large size and complexity of real-time systems make the reliability become worse; not only must one expect difficulties inherent in the application to be taken into account, but also those introduced by faulty software or hardware design.
-
Real Time System-- Subra Ganesan 21
Characteristics of Real-time Systems
(4) Concurrent control of separate system
components:
-In a typical embedded computer example, the
program has to interact with an engineering
system(which will consist of many parallel activities
such as robots, conveyor belts, sensors and so on) and
the computers display devices, the operators console,
the database and the real-time clock.
-
Real Time System-- Subra Ganesan 22
Characteristics of Real-time Systems
-A major problem is how to express that concurrency in the structure of the program.
Older real-time programming languages, for example RTL/2,Coral 66 and C, relied on operating system support for concurrency.
The more modern languages, such as Ada, Pearl and Occam, have direct support for concurrent programming.
-
Real Time System-- Subra Ganesan 23
Characteristics of Real-time Systems
(5) Real-time facilities:
-Response time is crucial in any real-time
system.Unfortunately, it is very difficult to design and
implement systems which will guarantee that the
appropriate output will be generated at the appropriate
times under all possible conditions. For this, reason
real-time systems are usually constructed using
processors with considerable spare capacity.
-
Real Time System-- Subra Ganesan 24
Characteristics of Real-time Systems
-Given adequate processing power, language and run-time support, the programmer is to give:
#specify times at which actions are to be performed.
# specify times at which actions are to be completed.
#responses to situations where all or any of the timing requirements cannot be met.
# responses to situations where all or any of the timing requirements are changed dynamically.
-
Real Time System-- Subra Ganesan 25
Characteristics of Real-time Systems
(6) Interaction with hardware interfaces:
-Most of the real-time systems requires the computer components to interact with the external devices (e.g. sensors, actuators). These devices interface to the computer via input and output registers.Devices may also generate interrupts to signal to the processor.
-The methods used in the past is:
~under the control of operating system, or
~the application programmer is required to resort to assembly language control and manipulate the registers and
interrupts.
-The methods used nowadays are:
~the facilities provided by modern high level real-time languages allows the control to be direct, and not through a layer of operating system.
-
Real Time System-- Subra Ganesan 26
Characteristics of Real-time Systems
(7) Efficient implementation and execution environment:
-In real-time systems, what is actually important is the meeting of deadlines of adequate response times in a particular execution environment.
The term execution environment is used to mean those components which are used together with the applications code to make the complete system: the processors, networks, operating system and so on. Clearly, the more efficient use of the execution environment, the more likely the requirements will be met.
-
End
Real Time System-- Subra Ganesan 27