Kernel by ert554898

VIEWS: 1 PAGES: 21

									   Real-Time Systems




CPE 261403 - Operating Systems
http://www.e-cpe.org/moodle
Characteristics of a real-time system:
I – Consists of a repeated action
                                          Light Bulb




                                  Light Sensors



                      Robot




                                          How do we program this robot?

A light following Robot Example
A simple program


                      L
              Robot
                      R

    Loop {
       Go forward
       If (Left_Sensor Brighter-Than Right_Sensor )
           { Turn Left }
       Else
           { Turn Right }
       }
Characteristics of a real-time system:
 II – Precision Timing is important
  How Air Bag
systems detect a
     crash?
How Air-bags detect a crash?




      Distance     Speed     Acceleration




     Detects Rapid Changes in Acceleration
Speed and Acceleration at a red light

V                   a




                                                   t




                t

                        How does the graph for a
                              Looks like?
Speed and Acceleration in a Crash

V                   a




                                                   t




                t

                        How does the graph for a
                              Looks like?
Source: Wikipedia
Source: how stuff works
Real-time Weather
Real-Time System Characteristics




           p = Period
           d = Deadline
           t = Processing time
Methodologies to ensure the deadline

       Priority-inheritance Protocol

       Rate-monotonic Scheduling

       Earliest-Deadline-First Scheduling
Priority Inversion
Priority Inversion:
A phenomenon where lower priority process blocks a higher priority process
Priority Inheritance Scheduling:
A process’s priority is upgraded to equal that of the waiting process
Priority Inheritance Scheduling
Rate-monotonic Scheduling:
Shorter periods gets higher priority
Limits of Rate-Monotonic
                              1
    CPU utilization < 2( 2   n
                                   1)

          1 Process = 100%
          2 Process = 83%
          …
          N Process -> 69%
Earliest-Deadline-First Scheduling:
Priority depends on the earliest deadline at any given time
Summary

   A real-time process has a deadline that the
    OS needs to ensure

   This deadline can be long or short
    depending on the application

   Short deadlines (e.g. < 1ms) typically
    requires a real-time OS to process

								
To top