real time systems (uniprocessor, parallel, & distributed)
DESCRIPTION
Real Time Systems (Uniprocessor, Parallel, & Distributed). Johnnie W. Baker. Introduction. What is a Real-Time System? Correctness of the system depends not only on the logical results, but also on the time in which the results are produced. - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: Real Time Systems (Uniprocessor, Parallel, & Distributed)](https://reader035.vdocument.in/reader035/viewer/2022081511/568145e7550346895db2e7fc/html5/thumbnails/1.jpg)
Real Time Systems(Uniprocessor, Parallel, & Distributed)
Johnnie W. Baker
![Page 2: Real Time Systems (Uniprocessor, Parallel, & Distributed)](https://reader035.vdocument.in/reader035/viewer/2022081511/568145e7550346895db2e7fc/html5/thumbnails/2.jpg)
2
Introduction
• What is a Real-Time System?Correctness of the system depends not only on the
logical results, but also on the time in which the results are produced.
Works in a reactive and time-constrained environmentExamples
Real-time temperature control of a chemical reactor
Space mission control system Nuclear power generator system Many safety-critical systems
![Page 3: Real Time Systems (Uniprocessor, Parallel, & Distributed)](https://reader035.vdocument.in/reader035/viewer/2022081511/568145e7550346895db2e7fc/html5/thumbnails/3.jpg)
3
Introduction (Cont)
• What is an Embedded System? A combination of hardware & software (a “computational
engine”) to perform a specific function Is part of a larger system, say a real-time system, that may not
be a “computer” Works in a reactive and time-constrained environment Example
Pacemaker & Defibrillator Smart card reader Elevator Weather/GPS satellite
![Page 4: Real Time Systems (Uniprocessor, Parallel, & Distributed)](https://reader035.vdocument.in/reader035/viewer/2022081511/568145e7550346895db2e7fc/html5/thumbnails/4.jpg)
4
Key Properties
• Real-time systemsTimeliness & ConcurrencyReliabilityReactivityQoS
• Embedded systemsTimeliness & ConcurrencyDedicated (not “general purpose”)Liveness (Non-terminating programs)ReliabilityQoS
![Page 5: Real Time Systems (Uniprocessor, Parallel, & Distributed)](https://reader035.vdocument.in/reader035/viewer/2022081511/568145e7550346895db2e7fc/html5/thumbnails/5.jpg)
5
Specific Examples of Real Time & Embedded Systems
• Cars• Anti-lock Brake System (ABS)• Air Traffic Control • Evolution of Real-Time Embedded Systems• Wireless Sensor Network• Smart Sensor Networks Applications
![Page 6: Real Time Systems (Uniprocessor, Parallel, & Distributed)](https://reader035.vdocument.in/reader035/viewer/2022081511/568145e7550346895db2e7fc/html5/thumbnails/6.jpg)
6
Cars
• Today’s high-end automobile may have 100 microprocessors4-bit microcontroller checks seat beltMicrocontrollers run dashboard devices16/32-bit microprocessor controls engine
![Page 7: Real Time Systems (Uniprocessor, Parallel, & Distributed)](https://reader035.vdocument.in/reader035/viewer/2022081511/568145e7550346895db2e7fc/html5/thumbnails/7.jpg)
7
Anti-lock Brake System (ABS)
• Pumps brake to reduce skidding
• Provides real-time safety
![Page 8: Real Time Systems (Uniprocessor, Parallel, & Distributed)](https://reader035.vdocument.in/reader035/viewer/2022081511/568145e7550346895db2e7fc/html5/thumbnails/8.jpg)
8
Air Traffic Control
![Page 9: Real Time Systems (Uniprocessor, Parallel, & Distributed)](https://reader035.vdocument.in/reader035/viewer/2022081511/568145e7550346895db2e7fc/html5/thumbnails/9.jpg)
9
Evolution of Real-Time Embedded Systems
![Page 10: Real Time Systems (Uniprocessor, Parallel, & Distributed)](https://reader035.vdocument.in/reader035/viewer/2022081511/568145e7550346895db2e7fc/html5/thumbnails/10.jpg)
10
Wireless Sensor Network (WSN)• Smart Sensor = Processor + Sensor + Wireless Interface• Miniature devices manufactured economically in large
numbers• Embedded in environments for distributed sensing and
control
![Page 11: Real Time Systems (Uniprocessor, Parallel, & Distributed)](https://reader035.vdocument.in/reader035/viewer/2022081511/568145e7550346895db2e7fc/html5/thumbnails/11.jpg)
11
Smart Sensor Networks Applications
![Page 12: Real Time Systems (Uniprocessor, Parallel, & Distributed)](https://reader035.vdocument.in/reader035/viewer/2022081511/568145e7550346895db2e7fc/html5/thumbnails/12.jpg)
12
Other Real-Time Embedded Systems
• PDAs• Printers• IPODs• Television• Household appliances• Wrist watches• Game consoles• Mars rovers• Power grid management systems• Air Traffic Control (??)
Observation: >95% of all microprocessors are used for real-time embedded systems.
![Page 13: Real Time Systems (Uniprocessor, Parallel, & Distributed)](https://reader035.vdocument.in/reader035/viewer/2022081511/568145e7550346895db2e7fc/html5/thumbnails/13.jpg)
13
What’s Special About Embedded Systems
• Must worry about non-functional constraintsReal Time
For systems to function correctly, their timing constraints must be satisfied.
Memory footprintPowerReliabilitySafetyCost
• Just functionally working is NOT ENOUGH
![Page 14: Real Time Systems (Uniprocessor, Parallel, & Distributed)](https://reader035.vdocument.in/reader035/viewer/2022081511/568145e7550346895db2e7fc/html5/thumbnails/14.jpg)
14
Taxonomy of Real-Time Systems
![Page 15: Real Time Systems (Uniprocessor, Parallel, & Distributed)](https://reader035.vdocument.in/reader035/viewer/2022081511/568145e7550346895db2e7fc/html5/thumbnails/15.jpg)
15
Taxonomy of Real-Time Systems
![Page 16: Real Time Systems (Uniprocessor, Parallel, & Distributed)](https://reader035.vdocument.in/reader035/viewer/2022081511/568145e7550346895db2e7fc/html5/thumbnails/16.jpg)
16
Taxonomy of Real-Time Systems
![Page 17: Real Time Systems (Uniprocessor, Parallel, & Distributed)](https://reader035.vdocument.in/reader035/viewer/2022081511/568145e7550346895db2e7fc/html5/thumbnails/17.jpg)
17
Taxonomy: Static
• Task arrival times can be predicted• Static (compile-time) analysis possible• Allows good resource usage (low idle time for
processors).
![Page 18: Real Time Systems (Uniprocessor, Parallel, & Distributed)](https://reader035.vdocument.in/reader035/viewer/2022081511/568145e7550346895db2e7fc/html5/thumbnails/18.jpg)
18
Taxonomy: Dynamic
• Arrival times unpredictable• Static (compile-time) analysis possible only for
simple cases.• Processor utilization decreases dramatically.• In many real systems, this is very difficult to
handle.• Must avoid over-simplifying assumptions
e.g., assuming that all tasks are independent, when this is unlikely.
![Page 19: Real Time Systems (Uniprocessor, Parallel, & Distributed)](https://reader035.vdocument.in/reader035/viewer/2022081511/568145e7550346895db2e7fc/html5/thumbnails/19.jpg)
19
Taxonomy: Soft Real-Time
• Allows more slack in the implementation• Timings may be suboptimal without being
incorrect.• Problem formulation can be much more
complicated than hard real-time• Two common and an uncommon way of
handling non-trivial soft real-time system requirementsSet somewhat loose hard timing constraints Informal design and testingFormulate as an optimization problem
![Page 20: Real Time Systems (Uniprocessor, Parallel, & Distributed)](https://reader035.vdocument.in/reader035/viewer/2022081511/568145e7550346895db2e7fc/html5/thumbnails/20.jpg)
20
Taxonomy: Hard Real-Time
• Creates difficult problems.Some timing constraints are inflexible
• Simplifies problem formulation.
![Page 21: Real Time Systems (Uniprocessor, Parallel, & Distributed)](https://reader035.vdocument.in/reader035/viewer/2022081511/568145e7550346895db2e7fc/html5/thumbnails/21.jpg)
21
Taxonomy: Periodic
• Each task (or group of tasks) executes repeatedly with a particular period.
• Allows some static analysis techniques to be used.
• Matches characteristics of many real problems• Not closely related to situations involving tasks
that designers pretend are periodic.• It is possible to have tasks with deadlines
smaller, equal to, or greater than their period.The later are difficult to handle (i.e., multiple
concurrent task instances occur).
![Page 22: Real Time Systems (Uniprocessor, Parallel, & Distributed)](https://reader035.vdocument.in/reader035/viewer/2022081511/568145e7550346895db2e7fc/html5/thumbnails/22.jpg)
22
Taxonomy: Periodic with Single-Rate
• One period in the system• Simple but inflexible• Used in implementing a lot of wireless sensor
networks.
![Page 23: Real Time Systems (Uniprocessor, Parallel, & Distributed)](https://reader035.vdocument.in/reader035/viewer/2022081511/568145e7550346895db2e7fc/html5/thumbnails/23.jpg)
23
Taxonomy: Multirate Periodic
• Multiple periods• Can use notion of circular time to simplify static
(i.e., compile-time) schedule analysis.
![Page 24: Real Time Systems (Uniprocessor, Parallel, & Distributed)](https://reader035.vdocument.in/reader035/viewer/2022081511/568145e7550346895db2e7fc/html5/thumbnails/24.jpg)
24
Taxonomy: Aperiodic
• Are also called sporadic, asynchronous, or reactive.
• Creates a dynamic situation• Bounded arrival time interval are easier to
handle • Unbounded arrival time intervals are impossible
to handle with resource-constrained systems.
![Page 25: Real Time Systems (Uniprocessor, Parallel, & Distributed)](https://reader035.vdocument.in/reader035/viewer/2022081511/568145e7550346895db2e7fc/html5/thumbnails/25.jpg)
25
Definitions
• Tasks and Jobs• Processor and parallel & distributed systems• Deadline violations
![Page 26: Real Time Systems (Uniprocessor, Parallel, & Distributed)](https://reader035.vdocument.in/reader035/viewer/2022081511/568145e7550346895db2e7fc/html5/thumbnails/26.jpg)
26
Tasks and Jobs
• Jobs are units of work that are scheduled and executed by the systems.
• The set of related jobs that can be solved by the same algorithm are called a task.A job is an instance of a task.
![Page 27: Real Time Systems (Uniprocessor, Parallel, & Distributed)](https://reader035.vdocument.in/reader035/viewer/2022081511/568145e7550346895db2e7fc/html5/thumbnails/27.jpg)
27
Processor Systems
• A processor execute tasks May be assigned multiple concurrent tasks
• Parallel and distributed systems Consists of multiple processors The interprocessor communications has an impact on the
systems performance. Communications can be difficult to evaluate, particularly for
distributed and asynchronous parallel systems Two types of distributed systems
Homogeneous: One processor type Heterogeneous: Multiple processor types.
![Page 28: Real Time Systems (Uniprocessor, Parallel, & Distributed)](https://reader035.vdocument.in/reader035/viewer/2022081511/568145e7550346895db2e7fc/html5/thumbnails/28.jpg)
28
Missed Deadline Penalties• Hard real-time systems
Example: Air Traffic Control, Medical Systems
• Firm real-time systemsExample: Banking, Production Control System
• Soft real-time systemsVideo on Demand, Inventory Management, Habitat
Monitoring, Weather Prediction System
![Page 29: Real Time Systems (Uniprocessor, Parallel, & Distributed)](https://reader035.vdocument.in/reader035/viewer/2022081511/568145e7550346895db2e7fc/html5/thumbnails/29.jpg)
29
Central Areas for Real-Time Study
• Allocation, assignment, and scheduling• Operating systems and scheduling• Parallel & distributed systems and scheduling
Observe: Scheduling is central to the study of real-time systems
![Page 30: Real Time Systems (Uniprocessor, Parallel, & Distributed)](https://reader035.vdocument.in/reader035/viewer/2022081511/568145e7550346895db2e7fc/html5/thumbnails/30.jpg)
30
Allocation, assignment, and scheduling
• Analyze task execution times Worst-case or average case (or both)Worst-case needed for critical, hard deadline systems
• Decide which processor will be used for each task.
• Decide how to manage allocation of resources to processors
• Decide the times at which all tasks will execute• Provide guarantees when possible –
predictability• Determine how deadlines will be met.
![Page 31: Real Time Systems (Uniprocessor, Parallel, & Distributed)](https://reader035.vdocument.in/reader035/viewer/2022081511/568145e7550346895db2e7fc/html5/thumbnails/31.jpg)
31
Operating systems and scheduling
How to best design operating systems to• Support control over scheduling, etc. without
increasing design error rate.• Design operating system schedulers to support
real time constraints• Support predictable costs for task and OS
service execution
![Page 32: Real Time Systems (Uniprocessor, Parallel, & Distributed)](https://reader035.vdocument.in/reader035/viewer/2022081511/568145e7550346895db2e7fc/html5/thumbnails/32.jpg)
32
Parallel & distributed systems and scheduling
• How to best control (usually dynamically) scheduling regarding Assigning tasks to processing nodesScheduling execution of these tasks
• For distributed systems with processors separated over large distancesBound task deadline violations, when possibleMinimize deadline violations, when no bound is
possible.
![Page 33: Real Time Systems (Uniprocessor, Parallel, & Distributed)](https://reader035.vdocument.in/reader035/viewer/2022081511/568145e7550346895db2e7fc/html5/thumbnails/33.jpg)
33
Why Parallel or Distributed Systems
• A single processor is unable to handle many actual real-time applicationsCan not execute the application within reasonable
time limitations Value of the results obtain may degrade with the
time required to obtain them. The memory is not sufficiently large to hold the
essential data and program code for the application. Execution speed is insufficient to meet hard
deadlines.A single point of failure is unacceptable for many
applications.
![Page 34: Real Time Systems (Uniprocessor, Parallel, & Distributed)](https://reader035.vdocument.in/reader035/viewer/2022081511/568145e7550346895db2e7fc/html5/thumbnails/34.jpg)
34
Challenging Aspects of Distributed and Asynchronous Parallel Systems
• Shared resource management is challengingNo global knowledge on workloadNo global knowledge on resource allocation
• Load balancing between processors is required• Dynamic task scheduling normally used
Almost all dynamic scheduling problems are NP-hardMust schedule execution so that all the critical hard
deadlines are met
• Communication time is very difficult to predict on large applications where multiple tasks are assigned to each processor (i.e.,multitasking)
![Page 35: Real Time Systems (Uniprocessor, Parallel, & Distributed)](https://reader035.vdocument.in/reader035/viewer/2022081511/568145e7550346895db2e7fc/html5/thumbnails/35.jpg)
35
Asynchronous Systems Problems (cont)
• Synchronization between different tasks and processors is expensive.
• A distributed database is normally required Must ensure data serializability and data integrity
• Problems unique to distributed systemsCommunication related errors
E.g., out of order delivery of packets, packet loss, etc.
No synchronized clock (or else clocks need to be synchronized regularly)
![Page 36: Real Time Systems (Uniprocessor, Parallel, & Distributed)](https://reader035.vdocument.in/reader035/viewer/2022081511/568145e7550346895db2e7fc/html5/thumbnails/36.jpg)
36
Characteristics of a RTS
• Usually large and complexVary from a few hundred lines of assembler or C to 20
million lines of Ada estimated for the Space Station Freedom
• Concurrent control of separate system componentsDevices operate in parallel in the real-world; better to
model this parallelism by concurrent entities in the program
• Facilities to interact with special purpose hardware need to be able to program devices in a reliable and
abstract way
![Page 37: Real Time Systems (Uniprocessor, Parallel, & Distributed)](https://reader035.vdocument.in/reader035/viewer/2022081511/568145e7550346895db2e7fc/html5/thumbnails/37.jpg)
37
Characteristics of a RTS (cont)
• Extreme reliability and safeEmbedded systems typically control the environment
in which they operate; failure to control can result in loss of life, damage to environment, or economic loss
• Guaranteed response timeswe need to be able to predict with confidence the
worst case response times for systems; efficiency is important but predictability is essential
Sometimes, no response is worse than a poor response
![Page 38: Real Time Systems (Uniprocessor, Parallel, & Distributed)](https://reader035.vdocument.in/reader035/viewer/2022081511/568145e7550346895db2e7fc/html5/thumbnails/38.jpg)
38
Some Current Research Areas
• Temporal Quality of Service (QoS) Schedulability Predictability Reactivity Fault tolerance
• Robustness Sustain the fast changing operating conditions High integrity Functional independence
• Accurate Time Validation Algorithms
![Page 39: Real Time Systems (Uniprocessor, Parallel, & Distributed)](https://reader035.vdocument.in/reader035/viewer/2022081511/568145e7550346895db2e7fc/html5/thumbnails/39.jpg)
39
Future Challenges
Numerous challenges have been discussed in several papers in RTS and this list does not cover all of them.
• Real-time precision responses & reactivity• Fault-Tolerance under strict timing requirements• Maintainability• Testability under competitive pressures
![Page 40: Real Time Systems (Uniprocessor, Parallel, & Distributed)](https://reader035.vdocument.in/reader035/viewer/2022081511/568145e7550346895db2e7fc/html5/thumbnails/40.jpg)
40
High-Level Challenges
• System evolution• Open real-time systems
Unknown hardware characteristicsMixture of applications, resource and time
requirements
• Composibility• Software Engineering
![Page 41: Real Time Systems (Uniprocessor, Parallel, & Distributed)](https://reader035.vdocument.in/reader035/viewer/2022081511/568145e7550346895db2e7fc/html5/thumbnails/41.jpg)
41
Basic Challenges
• Science of performance guarantees• Reliability & formal verification• General system issues• Real-time multimedia• Programming languages• Education about real-time systems
![Page 42: Real Time Systems (Uniprocessor, Parallel, & Distributed)](https://reader035.vdocument.in/reader035/viewer/2022081511/568145e7550346895db2e7fc/html5/thumbnails/42.jpg)
42
RT Market Growth in 1996
• Approx. 25% p.a.• Estimate annual spending $2 bn.• Robustness
Sustain the fast changing operating conditions
• Accurate Validation Algorithms• Current figures?
![Page 43: Real Time Systems (Uniprocessor, Parallel, & Distributed)](https://reader035.vdocument.in/reader035/viewer/2022081511/568145e7550346895db2e7fc/html5/thumbnails/43.jpg)
43
Goals for Spring 2006 Course Parallel & Distributed RTS
• Cover basic concepts of RTS• Additional focus on computational challenging
aspects of Parallel & Distributed RTSTaught more as a seminar course, with students
doing some of the presentation.
• Textbook and references (see next slide)Book by Jane W. S. Liu will probably be textbookBook by Stankovic will probably be a reference (with
copy in library or specific sections online)List of research papers
• Prerequisite for course Graduate Student in CS
![Page 44: Real Time Systems (Uniprocessor, Parallel, & Distributed)](https://reader035.vdocument.in/reader035/viewer/2022081511/568145e7550346895db2e7fc/html5/thumbnails/44.jpg)
44
Main References• Peter Dinda and Robert Dick, pdf lecture slides on Real-Time
Systems, Fall 2005, Northwestern University, http://www.cse.wustl.edu/~lu/cs520s/520.htm
• John A. Stankovic, et. al., Strategic Directions in Real-Time and Embedded Systems, USC Slide Presentation, http://sunset.usc.edu/~neno/cs589_2003/Week5b.ppt
• G. Marimaran, Lecture Slides on Real Time Systems, Iowa State University, http://vulcan.ee.iastate.edu/~gmani/cpre558.F00/index.html
• Chenyang Lu, Lecture Slides on Real-Time Systems, Washington University in St. Louis, Fall 2005, http://www.cse.wustl.edu/~lu/cs520s/520.htm
• Andy Wellings, University of York Research Group, Lecture slides for text “Concurrent and Real-Time Programming in Java” by Wellings, www.cs.york.ac.uk/rts/CRTJbook/Lecture1.ppt
• Jane W. S. Liu, Real-Time Systems, Prentice Hall, 2000, ISBN 0-13-099651-3.
• John A. Stankovic, et. al., Deadline Scheduling for Real-Time Systems: EDF and Related Algorithms, Kluwer Academic Publishers (now Springer), ISBN 0-7923-8269-2, 1998.
![Page 45: Real Time Systems (Uniprocessor, Parallel, & Distributed)](https://reader035.vdocument.in/reader035/viewer/2022081511/568145e7550346895db2e7fc/html5/thumbnails/45.jpg)
45
Things to Possibly Add
• Common misconceptions – one set of slides has this, as does Stankovic’s book.
• Some of the computational complex problems for multiprocessors that I want to include in this course.