WHAT IS REAL TIME?
 REAL TIME IS A QUANTATIVE
NOTION OF TIME. REAL TIME IS
MESURED USING A PHYSICAL
CLOCK.WHENEVER WE
QUANTIFY TIME USING A
PHYSICAL CLOCK WE DEAL
WITH REAL TIME
WHAT IS REAL TIME SYSTEM?
Real time system are those system which must
produce the correct response within the
specified or defined time limit. if it exceeds
this time bonds it results in performance
degradation and /or malfunction of system
 The correctness depends not only on the
logical result but also the time it was
delivered
 
 Failure to respond is as bad as the wrong
response!
Example of some real time
system
 Navigation system, nuclear plant
monitoring system, traffic control
system ,Laser printer, video
conferencing etc.
REAL TIME SYSTEM CATEGORIES BASED ON
DEADLINE CONCEPT
 WHAT IS DEADLINE?
A deadline is a given time after a triggering event,
by which a response has to be completed
• The time at which a real-time systems has to produce a
specific result is called a deadline.
• Deadlines are dictated by the environment
DIFFERENT TYPES OF
EXAMPLE
AIR BAG
DEPLOYMENT
CONSEQUENCE-
SYSTEM FAILED
RESULT-
NOT ACCEPTED
SATELLITE
BASED
TRACKING
CONSEQUENCE-
SYSTEM NOT FAILED
RESULT-
NOT ACCEPTED
ONLINE TICKET
RESERVATION
CONSEQUENCE-
SYSTEM NOT FAILED
RESULT-
ACCEPTED
HARD REAL TIME SYSTEM
 A hard real time system (also known as an immediate
real time system) is hardware or software that must
operate within the confines of a stringent deadline.
The application may be considered to have failed if it
does not complete its function within the allotted time
span
 EXAMPLE:-
 Automotive and Flight control systems
 Medical system
 Industrial control system
 Robotics
 Anti missile system
 Nuclear power system
CHRACTERISTICS OF HARD RTS
• Missing a deadline may be catastrophic.
• Critical deadline is called hard deadline.
• HRTS has at least one hard deadline.
• Many of these systems are considered to be
safety critical.
SOFT REAL TIME
SYSTEM If the system fails to meet the dead line, possibly more
than once ,the system is not consider to have failed but
in this case the results of the request are not worthless
values for a result after its deadline ,is not zero. Rather
it degrades as the time passes after the deadline
Example:-
 ATM
 RAILWAY RESERVATION SYSTEM
 TELECOMMUNICATION SYSTEMS
 DIGITAL CAMERA
 SOUND SYSTEM
 MPEG PLAYER
CHRACTERISTICS OF SOFT
RTS
 Deadline overruns are tolerable, but not
desired.
 There are no catastrophic consequences
of missing one or more deadlines.
 There is a cost associated to
overrunning, but this cost may be abstract.
FIRM REAL TIME SYSTEM
Firm real time definition allows for infrequently
missed deadline. in these application the system can
survive task failures so long as they are adequately
spaced , how ever the value of the tasks completion
drops to zero or become impossible
EXAMPLE:-
SATALITE BASE TRAICKING
WEATHER FORCAST SYSTEM
VIDEO CONFARENCING
REAL TIME EMBEDDED
APPLICATIONEMBEDDED SYSTEMS:-
 Increasingly being used in newer application.
 Usually real-time in nature.
According to a recent estimate:
 The number of processors deployed in real time
application vastly out number the total processors
manufactured world-wide.
WHY WE USE EMBEDDED SYSTEM
 Trend of reducing cost of computers :-
processor
memory
 Flexibility due to internet
 Reducing size
 Increased:
processing power
hardware and software reliability
INDUSTRIAL APPLICATION OF
RTSCHEMICAL PLANT CONTROL :-
Chemical plant system are process control system.
 In an automated chemical plant ,a real time computer periodically
monitors plant conditions.
 The plant condition are based on current readings of pressure,
temperature and chemical concentration
 Each time the plant conditions are sampled the automation system
should decide on the exact instantaneous corrective action required .
 The time bound is from few millisecond to microsecond
AUTOMATED CAR ASSEMBLY
PLANT In an automated car assembly plant, the work product(partially
assembled car) moves on a conveyor belt.
 Along side the conveyor ,several workstation are placed.
 Each workstation performs some specific work such as fitting
engine ,fitting door, fitting wheel and etc .
 At each work station a sensor senses the arrival of next partially
assembled product ,the work station begins to perform its work
on the work product.
 The time bounds involved here are typically of the order of few
100 millisecond
S C A D A
 Supervisory control and data acquisition
 A computer system monitoring and
controlling a process
 Sensors store process data in a Distributed
real-time database.
 Supervisory system issues control signal.
 Example : Energy Management System.
APPLICATION OF RTS IN
AUTOMOTIVE In 2005 , 30-90 processor use car
 Engine control , break control , airbag deployment
system
 Windshield wiper , door lock , entertainment systems
 EXAMPLES:- BMW 745i
 2,000,000 LOC
 Windows CE OS
 Over 60 Microprosser
 53 8-bit ,11 32-bit, 7 16-bit
 Multiple networks
Multi Point Fuel Injection
 ECU(Engine Control Unit) Control s the timeing
and amount of fuel injected. :
 Receive signal from various sensors,
 Process the signals
 Send control signals to the actuators.
RTS APPLICATION USE IN
MEDICAL ROBOTS USED IN RECOVERY OF DISPLACED
RADIOACTIVE METERIALS:
 Radioactive materials such as Cobalt and Radium are used for
treatment of cancer. At times during treatment, the radioactive
Cobalt (or Radium) gets dislocated and falls down.
 Since human beings can not come near a radioactive material, a
robot is used to restore the radioactive material to its proper
position.
 The robot walks into the room containing the radioactive
material, picks it up, and restores it to its proper position.
 The robot has to sense its environment frequently and based on
this information, plan its path.
 The time constraints applied here - Robots must detect the
obstacle quickly and plan accordingly. Delays cannot be
tolerated.
AEROSPACE APPLICATION OF RTS
 Periodically sample :
velocity , acceleration , altitude
 Compute current position(X,Y,Z
position)
 Compute deviation from the trajectory
 Drive actuators to take corrective
actions
APPLICATION OF RTS IN DEFENSE
 MISSILE GUIDANCE SYSTEM:-
• Sense target home onto it
Based on some thermal and electrical
characteristics
• Carry out track corrections
based on target trajectory
• Sampling and processing activities :
• Typically need to be completed
in a few micro and millisecond
ANTI MISSILE SYSTEM
 An anti-missile system consists of the following critical activities
(tasks).
 An anti-missile system must first detect all incoming missiles,
properly position the anti-missile gun, and then fire to destroy
the incoming missile before the incoming missile can do any
damage.
 All these tasks are hard real-time in nature and the anti-missile
system would be considered to have failed, if any of its tasks fails
to complete before the corresponding deadlines.
BASIC MODEL OF REAL TIME SYSTEM
SENSORS
 A sensor converts some physical
characteristic of its environment:
 -into electrical signals
 Examples
 A photo-voltaic cell
 Temperature sensor
 Pressure sensor
ACTUATORS
 An actuator converts electrical signals from
a computer :
 -into some physical actions.
 Example:
 Motors
 Heaters
 Hydraulic and pneumatic actuators
SAFETY AND RELIABILITY
 System is safe if failure doesn’t lead to any
catastrophic situation
 Reliability is ability to perform it’s
intended task under stated condition or
stated duration of time
 In traditional system safety and reliability
are two independent issue , but in real time
system both are couple
WHAT IF A SYSTEM FAILED????
FAIL SAFE STATE
A fail-safe state of a system is one which if entered
when the system fails, no damage would result
Traffic control system
NOT A FAIL SAFE STATE
 Example :-
Anti missile system
If this system fails , the enemy missile would made
a huge damage
 There is no fail
State for this system
 This system is called
Safety critical system
REAL TIME OPERATING SYSTEM
 A real time operating system is a
multitasking operating system for
the application with the hard or
soft real time constraints .
 It also provides perfection ,
correctness , protection , and
security features of any kernel of
os when performing multiple
tasks .
 RTOS responds to input
immediately i.e. in real time , the
TYPES OF RTOS
 The RTOS are of TWO types
SOFT AND HARD RTOS
 SOFT RTOS:-
 In a soft real time task late compilation of job is undesirable but
not fatal .
 The performance of the system degrades as more and more jobs
miss deadlines.
 An example for soft real time task is an Online Database.
 HARD RTOS:-
 Hard real-time tasks have to be performed on time, and failure
to meet deadlines is fatal.
 In the hard real time system meeting the deadline is very
important, if deadline is not met the system performance will
fail.
 An example for hard real time task is a flight control system.
ARCHITECTURE OF RTOS
The basic architecture of a multitasking RTOS consists
of a) Program interface b) The Kernel c) Device
Drivers and d) Optional service modules.
KERNAL SERVICE
 The "kernel" of a real-time operating system ("RTOS") provides an "abstraction
layer".
Some of the kernel services are explained
Memory Management:-
The processes carried out in memory management are Memory allocation,
Deallocation and Management. It also restricts the memory access region for a task.
There may be dynamic memory allocations also
 File Management:-
A file is a named entity on a magnetic disc, optical disc or system memory. A file
contains the data, characters and text. Each OS has different abstractions of a file.
The File manager appropriately keeps track of the files.
 Logical and Character I/O:-
A logical I/O, also known as a buffer I/O, refers to reads and writes of buffers in the
buffer cache.
Real Time Clock
 A real-time clock (RTC) is a computer clock which keeps track of the current time.
FUNCTION OF RTOS
The important functions done by RTOS are task management, scheduling,
resource allocation and interrupt handling.
Task management:-
In Real Time Applications the Process is called as Task which takes execution time and
occupies memory.
Typical Task Operations:
The important task operations are creating and deleting tasks, controlling, task scheduling
and obtaining task information.
Scheduling in RTOS:-
In order to schedule task, information about the task must be known.
Resource Allocation in RTOS:
Resource allocation is necessary for any application to be run on the system. when an
application is running, it requires the OS to allocate certain resources for it to be able to run.
Interrupts handling in RTOS:
An interrupt is a signal from a device attached to a computer or from a program within a
computer. It stops the main program and responds for the event which is interrupted.
APPLICATION OF RTOS
 Almost all the modern telecommunication systems
make use of RTOS.
 Radar systems, network switching control systems,
satellite monitoring systems, satellite launch-control
all have their roots in RTOS.
 Now a day’s RTOS are increasingly finding use in
strategic and military operations.
 These are used in guided missile launching units,
track-and-trace spy satellites, etc.
Real time system

Real time system

  • 3.
    WHAT IS REALTIME?  REAL TIME IS A QUANTATIVE NOTION OF TIME. REAL TIME IS MESURED USING A PHYSICAL CLOCK.WHENEVER WE QUANTIFY TIME USING A PHYSICAL CLOCK WE DEAL WITH REAL TIME
  • 4.
    WHAT IS REALTIME SYSTEM? Real time system are those system which must produce the correct response within the specified or defined time limit. if it exceeds this time bonds it results in performance degradation and /or malfunction of system  The correctness depends not only on the logical result but also the time it was delivered    Failure to respond is as bad as the wrong response!
  • 5.
    Example of somereal time system  Navigation system, nuclear plant monitoring system, traffic control system ,Laser printer, video conferencing etc.
  • 6.
    REAL TIME SYSTEMCATEGORIES BASED ON DEADLINE CONCEPT  WHAT IS DEADLINE? A deadline is a given time after a triggering event, by which a response has to be completed • The time at which a real-time systems has to produce a specific result is called a deadline. • Deadlines are dictated by the environment
  • 7.
    DIFFERENT TYPES OF EXAMPLE AIRBAG DEPLOYMENT CONSEQUENCE- SYSTEM FAILED RESULT- NOT ACCEPTED SATELLITE BASED TRACKING CONSEQUENCE- SYSTEM NOT FAILED RESULT- NOT ACCEPTED ONLINE TICKET RESERVATION CONSEQUENCE- SYSTEM NOT FAILED RESULT- ACCEPTED
  • 8.
    HARD REAL TIMESYSTEM  A hard real time system (also known as an immediate real time system) is hardware or software that must operate within the confines of a stringent deadline. The application may be considered to have failed if it does not complete its function within the allotted time span  EXAMPLE:-  Automotive and Flight control systems  Medical system  Industrial control system  Robotics  Anti missile system  Nuclear power system
  • 9.
    CHRACTERISTICS OF HARDRTS • Missing a deadline may be catastrophic. • Critical deadline is called hard deadline. • HRTS has at least one hard deadline. • Many of these systems are considered to be safety critical.
  • 10.
    SOFT REAL TIME SYSTEMIf the system fails to meet the dead line, possibly more than once ,the system is not consider to have failed but in this case the results of the request are not worthless values for a result after its deadline ,is not zero. Rather it degrades as the time passes after the deadline Example:-  ATM  RAILWAY RESERVATION SYSTEM  TELECOMMUNICATION SYSTEMS  DIGITAL CAMERA  SOUND SYSTEM  MPEG PLAYER
  • 11.
    CHRACTERISTICS OF SOFT RTS Deadline overruns are tolerable, but not desired.  There are no catastrophic consequences of missing one or more deadlines.  There is a cost associated to overrunning, but this cost may be abstract.
  • 12.
    FIRM REAL TIMESYSTEM Firm real time definition allows for infrequently missed deadline. in these application the system can survive task failures so long as they are adequately spaced , how ever the value of the tasks completion drops to zero or become impossible EXAMPLE:- SATALITE BASE TRAICKING WEATHER FORCAST SYSTEM VIDEO CONFARENCING
  • 13.
    REAL TIME EMBEDDED APPLICATIONEMBEDDEDSYSTEMS:-  Increasingly being used in newer application.  Usually real-time in nature. According to a recent estimate:  The number of processors deployed in real time application vastly out number the total processors manufactured world-wide.
  • 14.
    WHY WE USEEMBEDDED SYSTEM  Trend of reducing cost of computers :- processor memory  Flexibility due to internet  Reducing size  Increased: processing power hardware and software reliability
  • 15.
    INDUSTRIAL APPLICATION OF RTSCHEMICALPLANT CONTROL :- Chemical plant system are process control system.  In an automated chemical plant ,a real time computer periodically monitors plant conditions.  The plant condition are based on current readings of pressure, temperature and chemical concentration  Each time the plant conditions are sampled the automation system should decide on the exact instantaneous corrective action required .  The time bound is from few millisecond to microsecond
  • 16.
    AUTOMATED CAR ASSEMBLY PLANTIn an automated car assembly plant, the work product(partially assembled car) moves on a conveyor belt.  Along side the conveyor ,several workstation are placed.  Each workstation performs some specific work such as fitting engine ,fitting door, fitting wheel and etc .  At each work station a sensor senses the arrival of next partially assembled product ,the work station begins to perform its work on the work product.  The time bounds involved here are typically of the order of few 100 millisecond
  • 17.
    S C AD A  Supervisory control and data acquisition  A computer system monitoring and controlling a process  Sensors store process data in a Distributed real-time database.  Supervisory system issues control signal.  Example : Energy Management System.
  • 18.
    APPLICATION OF RTSIN AUTOMOTIVE In 2005 , 30-90 processor use car  Engine control , break control , airbag deployment system  Windshield wiper , door lock , entertainment systems  EXAMPLES:- BMW 745i  2,000,000 LOC  Windows CE OS  Over 60 Microprosser  53 8-bit ,11 32-bit, 7 16-bit  Multiple networks
  • 19.
    Multi Point FuelInjection  ECU(Engine Control Unit) Control s the timeing and amount of fuel injected. :  Receive signal from various sensors,  Process the signals  Send control signals to the actuators.
  • 20.
    RTS APPLICATION USEIN MEDICAL ROBOTS USED IN RECOVERY OF DISPLACED RADIOACTIVE METERIALS:  Radioactive materials such as Cobalt and Radium are used for treatment of cancer. At times during treatment, the radioactive Cobalt (or Radium) gets dislocated and falls down.  Since human beings can not come near a radioactive material, a robot is used to restore the radioactive material to its proper position.  The robot walks into the room containing the radioactive material, picks it up, and restores it to its proper position.  The robot has to sense its environment frequently and based on this information, plan its path.  The time constraints applied here - Robots must detect the obstacle quickly and plan accordingly. Delays cannot be tolerated.
  • 21.
    AEROSPACE APPLICATION OFRTS  Periodically sample : velocity , acceleration , altitude  Compute current position(X,Y,Z position)  Compute deviation from the trajectory  Drive actuators to take corrective actions
  • 22.
    APPLICATION OF RTSIN DEFENSE  MISSILE GUIDANCE SYSTEM:- • Sense target home onto it Based on some thermal and electrical characteristics • Carry out track corrections based on target trajectory • Sampling and processing activities : • Typically need to be completed in a few micro and millisecond
  • 23.
    ANTI MISSILE SYSTEM An anti-missile system consists of the following critical activities (tasks).  An anti-missile system must first detect all incoming missiles, properly position the anti-missile gun, and then fire to destroy the incoming missile before the incoming missile can do any damage.  All these tasks are hard real-time in nature and the anti-missile system would be considered to have failed, if any of its tasks fails to complete before the corresponding deadlines.
  • 24.
    BASIC MODEL OFREAL TIME SYSTEM
  • 25.
    SENSORS  A sensorconverts some physical characteristic of its environment:  -into electrical signals  Examples  A photo-voltaic cell  Temperature sensor  Pressure sensor
  • 26.
    ACTUATORS  An actuatorconverts electrical signals from a computer :  -into some physical actions.  Example:  Motors  Heaters  Hydraulic and pneumatic actuators
  • 27.
    SAFETY AND RELIABILITY System is safe if failure doesn’t lead to any catastrophic situation  Reliability is ability to perform it’s intended task under stated condition or stated duration of time  In traditional system safety and reliability are two independent issue , but in real time system both are couple WHAT IF A SYSTEM FAILED????
  • 28.
    FAIL SAFE STATE Afail-safe state of a system is one which if entered when the system fails, no damage would result Traffic control system
  • 29.
    NOT A FAILSAFE STATE  Example :- Anti missile system If this system fails , the enemy missile would made a huge damage  There is no fail State for this system  This system is called Safety critical system
  • 30.
    REAL TIME OPERATINGSYSTEM  A real time operating system is a multitasking operating system for the application with the hard or soft real time constraints .  It also provides perfection , correctness , protection , and security features of any kernel of os when performing multiple tasks .  RTOS responds to input immediately i.e. in real time , the
  • 31.
    TYPES OF RTOS The RTOS are of TWO types
  • 32.
    SOFT AND HARDRTOS  SOFT RTOS:-  In a soft real time task late compilation of job is undesirable but not fatal .  The performance of the system degrades as more and more jobs miss deadlines.  An example for soft real time task is an Online Database.  HARD RTOS:-  Hard real-time tasks have to be performed on time, and failure to meet deadlines is fatal.  In the hard real time system meeting the deadline is very important, if deadline is not met the system performance will fail.  An example for hard real time task is a flight control system.
  • 33.
    ARCHITECTURE OF RTOS Thebasic architecture of a multitasking RTOS consists of a) Program interface b) The Kernel c) Device Drivers and d) Optional service modules.
  • 34.
    KERNAL SERVICE  The"kernel" of a real-time operating system ("RTOS") provides an "abstraction layer". Some of the kernel services are explained Memory Management:- The processes carried out in memory management are Memory allocation, Deallocation and Management. It also restricts the memory access region for a task. There may be dynamic memory allocations also  File Management:- A file is a named entity on a magnetic disc, optical disc or system memory. A file contains the data, characters and text. Each OS has different abstractions of a file. The File manager appropriately keeps track of the files.  Logical and Character I/O:- A logical I/O, also known as a buffer I/O, refers to reads and writes of buffers in the buffer cache. Real Time Clock  A real-time clock (RTC) is a computer clock which keeps track of the current time.
  • 35.
    FUNCTION OF RTOS Theimportant functions done by RTOS are task management, scheduling, resource allocation and interrupt handling. Task management:- In Real Time Applications the Process is called as Task which takes execution time and occupies memory. Typical Task Operations: The important task operations are creating and deleting tasks, controlling, task scheduling and obtaining task information. Scheduling in RTOS:- In order to schedule task, information about the task must be known. Resource Allocation in RTOS: Resource allocation is necessary for any application to be run on the system. when an application is running, it requires the OS to allocate certain resources for it to be able to run. Interrupts handling in RTOS: An interrupt is a signal from a device attached to a computer or from a program within a computer. It stops the main program and responds for the event which is interrupted.
  • 36.
    APPLICATION OF RTOS Almost all the modern telecommunication systems make use of RTOS.  Radar systems, network switching control systems, satellite monitoring systems, satellite launch-control all have their roots in RTOS.  Now a day’s RTOS are increasingly finding use in strategic and military operations.  These are used in guided missile launching units, track-and-trace spy satellites, etc.