04/04/2018 Definition Real-Time Systems are computing systems that must perform computation within given Giorgio Buttazzo timing constraints. E-mail: buttazzo@sssup.it They are typically embedded Controlled System in a larger system to control Sensors Scuola Superiore Sant’Anna its functions: Embedded Computer Motors http://retis.sssup.it/~giorgio/rts-LE.html Real-Time Embedded Systems Evolution of Embedded Systems Computers everywhere Embedded computing systems have grown Today, 98% of all processors in the planet are exponentially in several application domains: embedded in other objects: Number of embedded consumer electronics computers multimedia automotive robotics avionics 0 year 2010 1970 1980 1990 2000 Typical applications Art & Entertainment avionics automotive robotics Stereograms industrial automation Virtual games telecommunications multimedia systems consumer electronics Animation Smart toys 1
04/04/2018 Health Care Emerging applications intelligent transport. systems Tele-monitoring Tele-rehabilitation Assisted Living agriculture agriculture Sport civil protection intelligent buildings Smart objects Inside body The number of such objects will increase in the future: Computers will be embedded even in our body: heart ear eye brain Electronic key GPS Localizer Step counter Recording pen Cardio pulse meter Watch computer Increasing complexity ECU growth in a car # functions # ECUs in a cell phone in a car 200 100 80 80 60 60 40 40 20 20 0 0 year year 2010 2010 1970 1980 1990 2000 1970 1980 1990 2000 2
04/04/2018 Software evolution in a car Steer by Wire # Lines of source code in a car 10 10 10 9 10 8 Control 10 7 Unit Unit Sensor 10 6 Motor Motor 10 5 Sensor 10 4 10 3 10 2 1980 1990 2000 2010 2020 Software in a car Comparing Software Complexity Car software controls almost everything: Lines of code 100 M 100 M Engine: ignition, fuel pressure, water temperature, 30 M valve control, gear control, 10 M 10 M Dashboard: engine status, message display, alarms 2 M Diagnostic: failure signaling and prediction 1 M Safety: ABS, ESC, EAL, CBC, TCS Assistance: power steering, navigation, sleep sensors, 100 K 50 K parking, night vision, collision detection Comfort: fan control, heating, air conditioning, music, active light control, noise control & cancellation, regulations: steer/lights/sits/mirrors/glasses… Complexity and bugs Software reliability Software bugs increase with complexity: When aircraft control depends on a program with 100 million instructions, reliability is a primary objective. bugs 10.000 10 8 i 10 8 instructions t ti 1000 100 10 Lines of code 0 10 M 1 K 10K 100 K 1 M 3
04/04/2018 Real-Time Systems Software reliability Reliability does not only depend on the correctness of single instructions, but also on when they are Computing systems that must guarantee executed: bounded and predictable response times input are called real-time systems . controller t Predictability of response times must be guaranteed output for each critical activity; t + for all possible combination of events. A correct action executed too late can be useless or even dangerous. Predictability vs. Efficiency What’s special in Embedded Systems? QoS management High performance Safety critical FEATURES REQUIREMENTS High efficiency in resource Scarce resources (space, weight, efficiency predictability time, memory, energy) management Temporal isolation to limit p High concurrency and resource High concurrency and resource the interference sharing (high task interference) High predictability in the Interaction with the environment response time (causing timing constraints) Allocated resources Adaptivity to handle High variability on workload and digital tv soft firm hard overload situations resource demand Criticality Aim of the Course Main focus: predictable software Sensory Studying software methodologies for supporting processing time critical computing systems. Design Control We will not consider how to control a system, Analysis software but only how to provide a predictable software but only how to provide a predictable software Programming Commun. support to control applications. Graphics system dynamics Embedded Computer Controlled System 4
04/04/2018 Control and implementation Control and implementation Often, control and implementation are done by In reality, a computer: different people that do not talk to each other: has limited resources; if (b != 0) y = a/b; x Ax Bu else printf("error\n"); finite computational power (non null execution times); executes several concurrent activities; executes several concurrent activities; introduces variabile delays (often unpredictable). Modeling such factors and taking them into account in the design phase allows a significant Control guys typically assume a computer with infinite improvement in performance and reliability. resources and computational power. In some case, computation is modeled by a fixed delay . Specific course objectives Specific course objectives How to model a real-time system Study software methodologies and algorithms to increase predictability in computing systems. How to combine control & programming We consider embeddded computing systems consisting of several concurrent activities subject consisting of several concurrent activities subject How to analyze timing properties to timing constratints. We will see how to model and analyze a real-time How to monitor real-time applications application to predict worst-case response times and verify its feasibility under a set of constraints. How to program safety-critical code How to manage load variations Course outline - 1 Course outline - 2 1. Basic concepts and terminology 10. Problems introduced by resource sharing 2. Sample applications 11. Resource access protocols 3. Problem identification 12. Estimating worst-case blocking times 4. Modeling real-time activities g 13. Handling asynchronous (aperiodic) tasks 13 H dli h ( i di ) t k 5. Deriving timing constraints 14. Handling execution overruns 6. Worst-case reasoning 15. Managing overload conditions 7. Managing periodic tasks 16. Real-time communication mechanisms 8. Scheduling algorithms 9. Schedulability analysis 5
04/04/2018 Course outline - 3 Teaching material Course homepage Programming real-time applications http://retis.sssup.it/~giorgio/rts-MECS.html Processes and threads in Linux Thread creation and activation Books: Linux schedulers Time management How implement periodic threads How to structure RT applications How to use a graphics library Third Edition Third Edition How to simulate RT control systems Springer, 2011 Pitagora, 2006 32 Embedded systems They are computing systems hidden in an object to control its functions, enhance its performance, manage the available resources and simplify the interaction with the user. Object actuators micro- Environment processor sensors communication user other units Control system components A typical control system In every control application, we can distinguish 3 basic components: the system to be controlled Environ- – it may include sensors and actuators Controller Controller System System ment the controller – it sends signals to the system according to a feedback predetermined control objective the environment in which the system operates 6
04/04/2018 Detailed block diagram Types of control systems System Depending of the system-environment interactions, we can distinguish 3 types of control systems: Controller actuators Environ. Monitoring Systems sensor sensor internal state – do not modify the environment y feedback Open-loop control systems external state Sensory pre- – loosely modify the environment processing processing Closed-loop control systems Other activities – tight interaction between perception and action filtering, classification, data fusion, recognition, planning Monitoring Systems Loosely-coupled control systems Modify the environment, actions are mostly pre-programmed, Do not have actuators so loosely coupled with the current state of the environment: Do not modify the environment Real-time system Controller System sensors actuators Data Environ- Environment sensors processing ment . . . Display Data sensors Planning sensors processing Examples: Environmental monitoring, surveillance systems, Examples: painting robots, assembly robots, sorting robots air traffic control Hierarchical control Tightly-coupled control systems high-level high-level Sensing and control are tightly coupled and occur at recognition command different hierarchical level: F3 Controller System S3 A3 actuators F2 Sensing Sensing Control Control Environment S2 A2 F1 Data Planning sensors processing low-level low-level S1 A1 acquisition actuation Environment Examples: flight control systems, military systems, advanced robots, living beings 7
Recommend
More recommend