Slide 1OutlineDefining RTOSLets define realtime systemsRTOS Definition (contd.)RTOS Definition (contd.)Types of RTOSMicroprocessorEmbedded SystemsEmbedded SystemsEmbedded Systems (contd.)ExamplesRealtime Embedded SystemsClass work #1Embedded SystemsDesigning RTOSFunctional and non-functional requirementsHardware RequirementsSoftware requirementsSoftware Quality AssuranceDesign RepresentationDesign ConsiderationsClass work #2Finite State Machine (FSM)Design methods: Finite state machinesDrone aircraft avionics (simplified)State Transition tableLets design a simple embedded/ realtime systemSummaryRecitations & Course workB . R A M A M U R T H YU N I V E R S I T Y AT B U F FA L OB I N A @ B U F FA L O. E D U01/14/20191CSE321: Realtime and Embedded SystemsCSE321-2015-1Outline01/14/20192What is a realtime system?What is an embedded system?What is a realtime embedded system?Embedded system but not a realtime systemRealtime system but not an embedded systemWhy realtime&/embedded system?How do realtime embedded systems differ from regular computational systems?Lets define and identify some examples of realtime embedded systems in your school/work/home environment.We will attempt a simple design process.CSE321-2015-101/14/20193Defining RTOSCSE321-2015-101/14/20194Lets define realtime systemsTiming: RT systems (RTOS) are required to compute and deliver correct results within a specified period of time. Ex: traffic light controllerInterrupt driven: event-driven preemption; RTOS are often involved with handling events. Events manifest themselves in terms of interrupt signals arising from the arrival data at an input port or ticking of a hardware clock, or an error status alarm.CSE321-2015-101/14/20195RTOS Definition (contd.)Low-level programming: RTOS often deal with devices; C language is still a favorite for writing device drivers for new hardware.Specialized hardware: Most RTOS work within, or at least close beside, specialized electronic and mechanical devices. Often closed loop systems. Volatile data IO: Variables that change their value from moment to moment. RTOS software must be structured to check for changes at the correct rate, so as not to miss a data update.CSE321-2015-101/14/20196RTOS Definition (contd.)Multi-tasking: RTOS are often multitasking. Several processes cooperate to carry out the overall job. Divide RTOS problem into tasks as a design strategy.Run-time scheduling: Separation of activities into tasks leads to question of task sequencing or scheduling. Moreover the external events and required response to these lead to run-time scheduling or dynamic scheduling.Unpredictability in inputs/stimulus: Being event-driven, RTOS are at the mercy of unpredictable changes in their environment.Predictability response requirement!Life-critical code: failure to run correctly may result in death or at least injury to the user and/or others. Life-critical systems requires extra testing, documentation and acceptance trials.CSE321-2015-101/14/20197Types of RTOSHard RTOS: tight limits on response time, so that a delayed result is a wrong result.Ex: jet fuel controller and camera shutter unitSoft RTOS: need to meet only time-average performance target. As long as most results are available before deadline the system will run successfully. Ex: audio and video transmission, single frame skip is fine, but repeated loss is unacceptableFirm RTOS: somewhere between the two.Ex: Space station solar panel unitCSE321-2015-101/14/20198MicroprocessorExamples: vending machines, mobiles phones, alarm systems, washing machines, motor car engine controllers, heart monitors, microwave ovens all operate using embedded microcontrollers running dedicated software.“Microprocessor” is one of the critical enabling hardware for realtime systems.CSE321-2015-1Embedded Systems01/14/20199Dedicated functionallySpecial purposeOptimized for a certain operationsSmall (typically)Lower power consumptionEmbedded within other large systemsCSE321-2015-1Embedded Systems•Embedded systems are computing systems with tightly coupled hardware and software integration.•Designed to perform dedicated function•Embedded means that the system is a integral part of a larger system•Multiple embedded systems can co-exist in a single system.•General purpose processor are typically not aware of the applications.•An embedded processor is application-aware.01/14/201910CSE321-2015-1Embedded Systems (contd.)•Hardware and software co-design: hardware and software for the embedded system are developed in parallel.•Cross-platform development: Both embedded system and its application use the cross-platform development method.–Software is developed on one platform but runs on another.•Software storage will have to be chosen to allow for upgradeability.•Of course, the SoC (system on a chip), PoE (Power on Ethernet), etc.01/14/201911CSE321-2015-1Examples01/14/201912From everyday applicationsFrom automotive domain: Electronic Control Unit (ECU)Any examples?CSE321-2015-1Realtime Embedded Systems01/14/201913RTOS EMBRTEMBRailway monitoring and scheduling : RTOSCell phone: EMBHeart pacemaker: RTSEMBCSE321-2015-1Class work #101/14/201914Lets identify 10 embedded systems, realtime systems and realtime/embedded systemI will begin with Arduino Uno Example Type; justificationCSE321-2015-1Embedded Systems01/14/201915CSE321-2015-1W H E R E D O Y O U B E G I N ?A N S : R E Q U I R E M E N T S01/14/201916Designing RTOSCSE321-2015-1Functional and non-functional requirements01/14/201917Functional: Describes the explicit operations to be performed by the RTOS.If you consider the climate control system in an automobile:Sense temperature: T1Compare with user set temperature: TsetIf T1 > Tset, start cold air fan Else if T1 < Tset, start hot air fanNon-functional: describes the quality of the operationsExample: Need to control temperature within 0.5 degree errorAccuracy PrecisionReliabilitySafetyResponse timeResponsivenessPredictabilityDeadlinesCSE321-2015-1Hardware Requirements01/14/201918Hardware support for functional requirementsHardware support for non-functional requirementsSize of the device Power of the processorPower consumptionSpeed of the deviceSupport for devices, interruptsElectronic Control Units (ECU): typical modern automobile
View Full Document