Real Time Systems
Real Time Systems
Course Contents
Real Time Systems
Part-A
Part-B
Operating Systems (Unit-5 & 6)
Design Of RTSS General Introduction (Unit-7)
RTS Development Methodologies (Unit-8)
Text Book
Real - Time Computer Control- An Introduction, Stuart Bennet, 2nd Edn. Pearson
Education. 2005
REFERENCE BOOKS:
1. Raj Kamal, Embedded systems Architecture, Programming and Design, TMH.
2. Philip, A. Laplante,
Real-Time Systems Design and Analysis an Engineers
Handbook second edition, PHI publications
Chapter - 1
Introduction to Real-time Systems
Historical background
RTS Definition
Classification of Real-time Systems
Time constraints
Classification of Programs
Historical Background
The earliest proposal to use a computer
operation in real time as part of control
system was made in a paper by Brown
and Campbell in 1950
The first digital computers developed
specifically for real-time control were for
airborne operation,
1954 a Digitrac digital computer was
successfully used to provide an automotive
flight and weapons control system
Historical Background
The digital computers developed which had
failed to be adopted by the military
The computer and electronic systems
manufactures who were looking to extend their
markets and to find other outlets
Initiated for the use of digital computers in
process and manufacturing industries
Hence the application of digital computers to
industrial control began in the late 1950s.
Historical Background
The first industrial installation of a computer
system was in September 1958 when the
Louisiana Power and Light station in Sterling,
Louisiana. However, this was not a control
system
The first industrial computer control installation
was made by the Texaco Company on 15March
1959, who installed an RW-300 (RamoWooldridge Company) system at their Port
Arthur refinery in Texas. The refinery was run
under closed-loop control
Historical Background
During 1957-8 the Maonsanto Chemical Company, in cooperation with its Ramo-Wooldridge Company, studied
the possibility of using computer control and
Commissioning of the plant began on 20 January 1960
and closed-loop control was achieved on 4 April 1960
after an almost complete rewrite of the control algorithm part of
the program.
Historical Background
The first direct digital control (DDC) computer system was
the Ferranti Argus 200 system installed in November 1962
at the ICI ammonia-soda plant at Fleetwood, Lancashire,
UK
The Ferranti Argus 200 used a ferrite core store to hold the
control program rather than a rotating drum store as used
by the R W -300 computer. The program was held in a
programmable read-only memory (PROM).
In addition to improved reliability the Argus system
provided more rapid memory access than the drum stores
of the RW-300
So the beginning of the second phase of application of
computers to real- time control.
Historical Background
Cost of the system
could be justified only if both DDC and supervisory
control were performed by the one computer.
There will be increase in complexity of the program
Hence increase in development time and storage space
Types of memory Core and Drum
Historical Background
RTOS
In the late 1960s real-time operating systems were
developed
Various PROCESS FORTRAN compilers made their
appearance.
The problems and the costs involved in attempting to do
everything in computer led users to retreat to smaller
systems
Development of minicomputer (DEC PDP-8, PDP-II, Data
General Nova, Honeywell 316, etc.) The cost of the
minicomputer was small enough to avoid the need to load
a large number of tasks onto one machine:
By 1970 concept of having two computers on the
system, one simply acting as a stand-by in the event of
failure
Historical Background
Throughout the 1970s the technological developments in
integrated circuits and construction techniques for circuit
boards led to
DAC
ADC
Communication
tasks
A real-time system
reads inputs from the plant and
sends control signals to the plant at times
determined by plant operational
considerations -not at times limited by the
capabilities of the computer system.
RTS
RTS features
A common feature of real-time systems and
embedded computers is that the computer is
connected to the environment within which it is
working by a wide range of interface devices and
receives and sends a variety of stimuli
These external processes all operate in their own
time-scales and the computer is said to operate in
real time if actions carried out in the computer relate
to the time-scales of the external processes
Time Constraints
Clock based Tasks -------Time component
Eg. A process plant operates in real time
Plant time constants (a time constant is a measure of the time taken
by a plant to respond to a change in input or load and is used as a
characteristic of the plant).
Time constants may be measured in hours for some chemical
processes or in milliseconds for an aircraft system.
For feedback control the required sampling rate will be dependent
on the time constant of the process to be controlled.
The shorter the time constant of the process, the faster the required
sampling rate. The computer which is used to control the plant must
therefore be synchronised to real time and must be able to carry out all
the required operations -measurement, control and actuation - within
each sampling interval.
Time Constraints
Synchronisation
Is usually obtained by adding a clock to the computer system
-normally referred to as a real-time clock -and using a signal
from this clock to interrupt the operations of the computer at
some predetermined fixed time interval.
Time Stamping
The clock interrupt is frequently used to keep a clock and
calendar so that the computer system is aware of both the time
and the date.
Clock-based tasks are typically referred to as cyclic or periodic
tasks where the terms can imply either that the task is to run
once per time period T (or cycle time T), or is to run at exactly T
unit intervals.
Time Constraints
Event-based Tasks (aperiodic)
Time Constraints
Event-based systems normally employ interrupts
Some small, simple systems may use polling;
that is, the computer periodically asks (polls) the
various sensors to see if action is required.
Time Constraints
Interactive systems
Interactive systems probably represent the
largest class of real-time systems
systems as automatic bank tellers; reservation
systems for hotels, airlines and car rental companies;
computerised tills, etc.
Types
Real-time systems are often reactive or embedded
systems.
Reactive systems are those in which scheduling is driven
by ongoing interaction with their environment;
for example, a fire-control system reacts to buttons
pressed by a pilot.
Embedded systems are those that are found in a system
For example,
a modern automobile contains many embedded computers that
control fuel injection, airbag deployment, braking, climate control,
and so forth.
household items such as televisions, stereos, washing machines,
even toys contain embedded computers.
sophisticated systems such as aircraft, spacecraft, and industrial
machines must contain many embedded, reactive computer
systems.
Types
A soft real-time system is one in which
performance is degraded but not destroyed
by failure to meet response-time constraints
batch-oriented system for example,
grade processing at the end of a semester
a bimonthly payroll run
word-processing program should respond to
commands within a reasonable amount of
time (e.g., 1 second),
Types
Systems where failure to meet
response-time constraints leads to complete
and catastrophic system failure are called
hard real-time systems.
A hard real-time system is one in which
failure to meet a single deadline may lead
to complete and catastrophic system
failure
Types
Types
Firm real-time systems are those
systems with hard deadlines where
some arbitrarily small number of
missed deadlines can be tolerated.
A firm real-time system is one in which
a few missed deadlines will not lead
to total failure, but missing more than
a few may lead to complete and
catastrophic system failure
Types
It is a principal goal of real-time systems
engineering to find ways to transform
hard deadlines into firm ones, and firm
ones into soft ones.
Real-time computing Support for
environments in which response time
to an event must occur within a
predetermined amount of time. Realtime systems may be categorized into
hard, firm and, soft real time.
Time Constraints
A hard time constraint obviously represents a
much more severe constraint on the performance
of the system than a soft time constraint
Such systems present a difficult challenge both
to hardware and to software designers.
Most real-time systems contain a mixture of
activities that can be classified as
clock based,
event based, and
interactive with both hard and soft time
constraints (they will also contain activities
which are not real time).
Time Constraints
Time Constraints
CLASSIFICATION OF PROGRAMS
The importance of separating the various
activities carried out by computer control
systems into
real-time
non-real-time tasks
CLASSIFICATION OF PROGRAMS
Three types of programming
Sequential
Multi-tasking
Real-time
CLASSIFICATION OF PROGRAMS
Sequential
In classical sequential programming actions are strictly
ordered as a time sequence:
The behavior of the program depends only on the effects
of the individual actions and their order
the time taken to perform the action is not of
consequence. Verification, therefore, requires two kinds
of argument:
1. that a particular statement defines a stated action; and
2. that the various program structures produce a stated sequence
of events.
CLASSIFICATION OF PROGRAMS
Multi-tasking
A multi-task program differs from the classical sequential
program in that the actions it is required to perform are
not necessarily disjoint in time;
several actions to be performed in parallel.
the sequential relationships between the actions
program may be built from a number of parts (processes
or tasks are the names used for the parts) which are
themselves partly sequential,
executed concurrently and which communicate through
shared variables and synchronisation signals.
CLASSIFICATION OF PROGRAMS
Real-time
A real-time program differs from the previous types
in that,
its actions not necessarily being disjoint in time
the sequence of some of its actions is not
determined by the designer but by the
environment -that is, by events occurring.
CLASSIFICATION OF PROGRAMS
The design of real-time software is significantly
more difficult than the design of sequential
software
Early high-level languages were sequential in
nature and they did not allow direct access to
many of the detailed features of the hardware.
Need for Real-time features had to be built into
the operating system
Assembly language
RTOS availability
Device - RTOS