EECE 276 – Embedded SystemsEvents, determinism, real-time systems 1EECE 276Embedded SystemsEvents and determinism, CPU utilization, design issues, historyEECE 276 – Embedded SystemsEvents, determinism, real-time systems 2ConceptsEvent: Any occurrence that changes the PC non-sequentially – change the flow of control.Synchronous events: - (synced with code execution)Occur at predictable times. Asynchronous events: - (not synced with execution)Occur at unpredictable times. Periodic events:Repeat at precise, regular times.Aperiodic events:Repeat, but do not occur at regular periods.Sporadic events:Appear infrequently, at irregular times.EECE 276 – Embedded SystemsEvents, determinism, real-time systems 3ConceptsRegular interrupt with no fixed periodBranch instructionGarbage collectionAperiodicError recoverySystem callsCyclic codeProcesses scheduled by internal clockSynchronousExternally generated interrupt Clock-generated interruptAsynchronousSporadicPeriodicDeterminism: A system is deterministic if for each possible state and input a unique output and next state can be determined.EECE 276 – Embedded SystemsEvents, determinism, real-time systems 4System behaviorSystemu yx: StateDiscrete-time systemx(k+1) = f (x(k), u(k))y(k) = g (x(k),u(k))Continuous-time systemx(t) = f (x(t), u(t))y(t) = g (x(t),u(t)).Typical computer system Typical physical systemEECE 276 – Embedded SystemsEvents, determinism, real-time systems 5ConceptsUtilization calculationsn >= 1 periodic tasks, each with execution period pi(I.e. execution frequency fi= 1 /pi), worst-case execution time ei, then the utilization factor, ui, for the i-th task:ui= ei/ piThe overall system utilization:∑∑====niiiniipeuU11/EECE 276 – Embedded SystemsEvents, determinism, real-time systems 6ConceptsUtilization (time-loading factor – U):The percentage of non-idle processing time.Stressed systemOverload100+Embedded systemDangerous83-99Embedded systemQuestionable70-82Embedded systemTheoretical limitPeriodic / independent tasks69High-consequence systemSafe51-68High-consequence systemVery safe26-50VariousApplicationExcess processing power (CPU wasted)0-25CategoryUtilization (%)EECE 276 – Embedded SystemsEvents, determinism, real-time systems 7ConceptsReal-time system design issuesO Selection of HW and SW “platform”O Specification and design O – Including temporal behaviorO Analyzing the system design, predicting behaviorO Programming language nuancesO System fault tolerance and reliabilityO Design and execution of testsO Open systems technology/interoperabilityO Measuring response times and correcting the designEECE 276 – Embedded SystemsEvents, determinism, real-time systems 8Example embedded systemsX-by-wire…VehitronicsElevator controlMicrowave ovens…CivilianAssembly linesProcess plantsIndustrial systemsImplanted devicesRobot surgeryMedicineGames, simulators…MultimediaNavigation/Displays…AvionicsApplicationDomainEECE 276 – Embedded SystemsEvents, determinism, real-time systems 9Misconceptions about r/t systemsO Real-time systems are “fast” systems.O Rate-monotonic (scheduling) analysis has solved the problem.O We have universal methodologies for r/t systems specification and design.O There is no need to build a real-time operating system because commercial products exist.O Real-time systems are about scheduling theory.EECE 276 – Embedded SystemsEvents, determinism, real-time systems 10HistoryO 50s : Whirlwind, SAGEO 60s : SABRE (still used!), ATC (still used!)O 70s : RMA (analysis technique)O 80s : Various RTOS-s, Ada 83O 90s : Ada 95/RTJ, priority inversion problem, r/t
View Full Document