Introduction to Embedded Systems Part 3 by anil.docstoc

VIEWS: 9 PAGES: 3

More Info
									                                                                                      Real Time Systems
                                                                 • Real time systems are important:
                                                                      – Almost all systems have some requirement for real time
                           EE 332                                       performance
                     Real Time Systems                           • Real time system design is challenging:
                                                                      – More of an art than a science
                                                                      – Very few equations
                             Introduction
                                                                 • Real time systems are tricky:
                                                                      – Debugging can be very hard
                                                                      – Too complex to prove correct

                                                                 Copyright (c) 2003              EE 332 Real Time Systems    2
                                                                 University of Saskatchewan            Introduction




                    Definition - System                                  Definition – Response Time
• A black box with set of one or more inputs and a               • The response time is the time between the
  set of one of more outputs                                       presentation of a set of inputs to the appearance of
                                                                   all the associated outputs
                                                                 • Response time required speed is dependent on the
               i1                                       o1         application

               in                                       on




Copyright (c) 2003           EE 332 Real Time Systems        3   Copyright (c) 2003              EE 332 Real Time Systems    4
University of Saskatchewan         Introduction                  University of Saskatchewan            Introduction




                Real Time Definitions                                                         Classifications
• A real time system is a system that must satisfy               • An embedded system is a software system that is
  explicit response time constraints or risk severe                completely encapsulated by the hardware it
  consequences, including failure                                  controls
• A failed system is a system that cannot satisfy one                 – Also referred to as reactive systems
  or more of the requirements stipulated in the                  • An organic system is a software system that is not
  formal system specification                                      highly dependent on the hardware on which it runs
     – Specification must include timing constraints                  – Includes generalized user interfaces
• A real time system is one whose logical                        • A semi-detached system is a software system that
  correctness is based on both the correctness of the              displays characteristics of both embedded and
  outputs and their timeliness                                     organic systems
Copyright (c) 2003           EE 332 Real Time Systems        5   Copyright (c) 2003              EE 332 Real Time Systems    6
University of Saskatchewan         Introduction                  University of Saskatchewan            Introduction
                             Examples                                                           Classifications
• Embedded system:                                                 • A hard real time system is a real time system
     – Vehicle engine control computer                               where failure to meet response time constraints
• Organic system:                                                    leads to system failure
     – Word processor                                              • A soft real time system is a real time system
• Semi-detached system:                                              where failure to meet response time constraints
     – Digital oscilloscope                                          leads to performance degradation but not system
                                                                     failure
                                                                   • A firm real time system is a real time system with
                                                                     hard deadlines where some low probability of
                                                                     missing a deadline can be tolerated
Copyright (c) 2003           EE 332 Real Time Systems          7   Copyright (c) 2003              EE 332 Real Time Systems         8
University of Saskatchewan         Introduction                    University of Saskatchewan            Introduction




                             Examples                                                                Events
• Hard real time systems:                                          • An event is any occurrence that causes the
     – Autopilot                                                     program counter to change non-sequentially
     – Nuclear reactor core temperature control                      (change of flow-of-control)
• Soft real time systems:                                          • Examples include:
     – Word processor                                                   – Conditionals such as if/then/else and switch statements
• Firm real time systems:                                               – Subroutine (C, FORTRAN) or method invocation
                                                                          (C++, Java)
     – Household furnace thermostat
                                                                        – Exceptions (C++, Java)
                                                                        – Interrupts (usual primary source of events in embedded
                                                                          real time systems)

Copyright (c) 2003           EE 332 Real Time Systems          9   Copyright (c) 2003              EE 332 Real Time Systems     10
University of Saskatchewan         Introduction                    University of Saskatchewan            Introduction




                               Events                                                           Determinism
• Synchronous:                                                     • A system is said to be deterministic if, for each
     – Occur at predictable times in the flow-of-control             possible state and each set of inputs, a unique set
     – Example is an if/then/else conditional statement              of outputs and next state of the system can be
• Asynchronous:                                                      determined
     – Occurs at unpredictable times in the flow-of-control        • If in a deterministic system the response time for
     – Usually caused by external events (i.e., interrupts)          each set of outputs is known, then the system also
• A regular clock generating hardware interrupts is                  exhibits temporal determinism
  an asynchronous event (cannot predict exactly                    • A digital computer is by definition a deterministic
  where in the flow-of-control it will interrupt)                    system

Copyright (c) 2003           EE 332 Real Time Systems         11   Copyright (c) 2003              EE 332 Real Time Systems     12
University of Saskatchewan         Introduction                    University of Saskatchewan            Introduction
                             Determinism                                                          Determinism
• But if we expand our black box system to a more                    • Example, consider an embedded system with 16
  realistic model, we soon see that determinism may                    inputs and 16 outputs and no internal memory:
  not be that practical                                                   – Number of input combinations = 216
               i1                                         o1              – 65,536
                                                                     • Now consider the same system with 1 Mbyte of
               in                     Logic               on           internal memory (effectively representing its
                                                                       state):
                                                                          – Number of input combinations = 2(16 + 20)
                                      State                               – 68,719,476,736


Copyright (c) 2003             EE 332 Real Time Systems         13   Copyright (c) 2003            EE 332 Real Time Systems   14
University of Saskatchewan           Introduction                    University of Saskatchewan          Introduction




                             Time-Loading                                         Real Time Design Issues
• Time-loading, or the utilization factor, is a                      • Selection of hardware and software, and
  measure of the percentage of “useful” processing                     appropriate mix for cost-effective solutions
  the computer is doing                                              • Selection of commercial real time operating
     –   10% implies overpowered hardware (excess cost)                system or design a special operating system
     –   50% reasonable for new systems                              • Selection of an appropriate software language
     –   80% acceptable for systems that do not expect growth
                                                                     • Maximizing of system fault tolerance and
     –   70% has some theoretical basis as a desired time-
         loading figure
                                                                       reliability through design and rigorous testing
• Hard real-time systems should be loaded                            • Design and administration of tests, and selection
  significantly less than 100%                                         of test and development equipment

Copyright (c) 2003             EE 332 Real Time Systems         15   Copyright (c) 2003            EE 332 Real Time Systems   16
University of Saskatchewan           Introduction                    University of Saskatchewan          Introduction




                              Summary
• Real time systems are those in which timeliness is
  as important as the correctness of the outputs
• Real time systems do not have to be “fast systems”
• Real time system design and analysis is a complex
  holistic engineering science




Copyright (c) 2003             EE 332 Real Time Systems         17
University of Saskatchewan           Introduction

								
To top