realtimeembeddedsystem.ppt

Upload: vinayaga-moorthy

Post on 07-Aug-2018

212 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/20/2019 RealTimeEmbeddedSystem.ppt

    1/15

    1

    EE5900 Advanced Embedded

    System For Smart Infrastructure

     Introduction to Real-Time Embedded

    Systems

  • 8/20/2019 RealTimeEmbeddedSystem.ppt

    2/15

    2

    Definition

    Real-time embedded systems are defined as

    those systems in which the correctness of thesystem depends not only on the logical resultof computation, but also on the time at whichthe results are produced.

    !ard real-time systems "e.g., #$ionic control%.

    &irm real-time systems "e.g., 'an(ing%.

    Soft real-time systems "e.g., )ideo ondemand%.

  • 8/20/2019 RealTimeEmbeddedSystem.ppt

    3/15

    *

    Deadline

    •Hard deadline: penalty due to missing deadline is a higher

    order of magnitude than the reward in meeting thedeadline

    •Firm deadline: penalty and reward are in the same orderof magnitude

    •Soft deadline: penalty often lesser magnitude thanreward

  • 8/20/2019 RealTimeEmbeddedSystem.ppt

    4/15

    +

    A typical real-time embedded system

  • 8/20/2019 RealTimeEmbeddedSystem.ppt

    5/15

    Car example

      Mission: Reaching the destination safely.

    Controlled System ar.

    !peratin" environment Road conditions.

    Controllin" System 

    - Human driver: Sensors - Eyes and Ears of the dri$er.

    - Computer: Sensors - ameras, Infrared recei$er, andaser telemeter.

    Controls #ccelerator, Steering wheel, 'rea(-pedal.

    Actuators /heels, Engines, and 'ra(es.

  • 8/20/2019 RealTimeEmbeddedSystem.ppt

    6/15

    0

    Car example #contd$

    Critical tas%s Steering and brea(ing.

    &on-critical tas%s Turning on radio.

    Cost of fulfilling the mission Efficient solution.

    'eliability of the dri$er &ault-tolerance needs to beconsidered.

  • 8/20/2019 RealTimeEmbeddedSystem.ppt

    7/15

    'eal-(ime (as%s

    )eriodic tas%s 

    - Time-dri$en. haracteristics are (nown a priori  

    - Tas( T i  is characteri3ed by " pi , c i %

     E.g.: Tas( monitoring temperature of a patient.

    Aperiodic tas%s 

    - E$ent-dri$en. haracteristics are not (nown a priori  

    - Tas( T i  is characteri3ed by "ai , r i , c i , d i %E.g.: Tas( acti$ated upon detecting change in patient4s condition.

    Sporadic (as%s 5  #periodic tas(s with (nown minimum inter-arri$al time.

      pi  6 tas( period ai  6 arri$al time r i  6 ready time d i  6 deadline c i  6 worst case e7ecution time.

  • 8/20/2019 RealTimeEmbeddedSystem.ppt

    8/15

    8

    (as% constraints

    9eadline constraint

    Resource constraints 5 Shared access 5 E7clusi$e access

    :recedence constraints 5 T1 T26 Tas( T2 can start e7ecuting only after T1

    finishes its e7ecution

    &ault-tolerant re;uirements 5 To achie$e higher reliability for tas( e7ecution 5 Redundancy in e7ecution

  • 8/20/2019 RealTimeEmbeddedSystem.ppt

    9/15

    <

    Computin" systems

    Uniprocessor, multiprocessor, distributed system

  • 8/20/2019 RealTimeEmbeddedSystem.ppt

    10/15

    1=

    &otion of )redictability

    The most common denominator that is e7pected from a real-timesystem is predictability .

    – The behavior of the real-time system must be predictable which means that with certainassumptions about workload and failures, itshould be possible to show at design time thatall the timing constraints of the application

     will be met.

    &or static systems, 1==> guarantees can be gi$en at design time.   &or dynamic systems, 1==> guarantee cannot be gi$en since the

    characteristics of tas(s are not (nown a priori.

    In dynamic systems, predictability means that once a tas( isadmitted into the system, its guarantee should ne$er be $iolated aslong as the assumptions under which the tas( was admitted hold.

  • 8/20/2019 RealTimeEmbeddedSystem.ppt

    11/15

    11

    Common *isconceptions

    Real-time computing is e;ui$alent to fast

    computing.  Real-time programming is assembly coding,

    priority interrupt programming, and writing

    de$ice dri$ers.

    Real-time systems operate in a staticen$ironment.

    The problems in real-time system design ha$ebeen sol$ed in other areas of computerscience and engineering.

  • 8/20/2019 RealTimeEmbeddedSystem.ppt

    12/15

    12

    *a+or c,allen"e

    The main challenge in real time embedded

    system design is real time scheduling ?any e7isting scheduling techni;ues

     5 Round robin scheduling

     5 :lanning scheduling

     5 :riority scheduling

     5 Static scheduling

  • 8/20/2019 RealTimeEmbeddedSystem.ppt

    13/15

    1*

    )reemptive vs &on-preemptive sc,edulin"

    )reemptive Sc,edulin"

     5 Tas( e7ecution is preempted and resumed later  5  :reemption occurs to e7ecute higher priority tas(.

     5 @ffers higher schedulability

     5 In$ol$es higher scheduling o$erhead due to conte7t

    switching

    &on-preemptive Sc,edulin" 

     5 @nce a tas( starts e7ecuting, it completes its full

    e7ecution

     5 @ffers lower schedulability

     5 ess o$erhead due to less conte7t switching

  • 8/20/2019 RealTimeEmbeddedSystem.ppt

    14/15

    1+

    !ptimal sc,edulin" -- definition

     # static sc,edulin" algorithm is said to be optimal if,

    for any set of tas(s, it always produces a feasibleschedule "i.e., a schedule that satisfies the constraintsof the tas(s% whene$er any other algorithm can do so.

     # dynamic sc,edulin" algorithm is said to be optimal

    if it always produces a feasible schedule whene$er astatic algorithm with complete prior (nowledge of allthe possible tas(s can do so.

    Static scheduling is used for scheduling periodic tas(s,whereas dynamic scheduling is used to schedule bothperiodic and aperiodic tas(s.

  • 8/20/2019 RealTimeEmbeddedSystem.ppt

    15/15

    1

    Summary

    Real-time embedded systems re;uire logical correctness andtimeliness.

    Real-time embedded system consists of a controlling system,controlled system, and the en$ironment.

    Real-time systems are classified as6 hard, firm, and soft real timesystems.

    Tas(s are periodic, aperiodic, sparodic.

    The notion of predictability is important in real-time systems andthe maAor challenge is real time scheduling.