3.RTES - Introduction To Embedded Systems
3.RTES - Introduction To Embedded Systems
i ProdukterSystems
– föreläsning 8
Eskilstuna 12 februari 2004
Dr.
Dr. Mikael
Mikael Nolin
Nolin
Real-Time Systems
Newline
Mälardalen University Information
Dr. Mikael Nolin
[email protected]
Stefan Boegård
CC Systems
”Mimer Real-Time”
Volvo XC90 –
Real-Time Systems A Real-World Embedded System
• Some 35+ computers
• Heavily overloaded term • 7 networks
• Today: Real-time in
Embedded Systems
SU
UEM PDM M SUB
S3 DE
SCM V3 AUD
MMS
S2
MP1 SHM M ATM
RSM
PHM CCM
Environment SRM
MP2 ICM
V2 GSM
TC
MMM
M
ECM ICM SRS
DIM
BCM CAN-BSC BSC PAS
Sensor ES Actuator SA
S1
SWS
SWM
SHM
PSM
AEM L1
CAN-HS
S CAN-LS RE V1 ISM
S4
CPM V2
LSM
CEM DDM M
3 4
PRS
Real-Time System: Key Concept
• What is the relation between the
• Problem: Pace of environment terms “Real-Time System” and
cannot be controlled “Embedded system”?
• The ES need to react “quick enough”
1. All Embedded Systems are Real-Time Systems
• ES need to act in “Real-Time” 2. All Real-Time Systems are Embedded Systems
– A Real-time System (RTS) 3. Some Real-Time Systems are Embedded
Environment Systems, and some Embedded Systems are
Real-Time Systems
4. In real-time I’d like to embed myself in a nice
ES warm bed (aka. I don’t know the answer)
5 6
7 8
Parallelism (cont II) Parallelism (cont III)
• How to get computer system to handle parallel • Idea 2:
flows?
– Need to make sure that timing requirements are met. – Integrate multiple flows into one computer
• Idea 1: • Pros:
– Have one computer for each flow of input and output Used in practically
signals. – Efficient use of hardware all RTS.
• Pros: Not as bad – Saves cost (Sometimes in
– Simple and straight forward idea as it combination with
– Simplifies software architecture may seem! – Save energy Idea 1.)
• Cons: – Saves weight
– Waist of hardware resources – Lessens heat emissions
– Expensive However, the principle
– Complex connectivity is used in many • Cons: So, how is this done?
– Heavy systems to reduce – Increases software complexity
– Energy consuming
complexity.
– Heat generating
– Many source of errors Just don’t overdo it!
9 10
13 14
15 16
Off-line scheduling (cont) Off-line scheduling (cont II)
• Terminology:
– Schedule is constructed before run-time • Traditional technique in real-time
• Off-line All these terms denote systems
– Schedule stored in table the same thing – Used for 30+ years.
• Table driven
• Today used in
– Cyclically repeated while system runs
– small and simple systems, and in
• Static cyclic scheduling
– safety critical systems
– Progress in the schedule is governed by
progress of time
• Time-triggered scheduling
17 18
0 10 20 30 40 50 60 time
21 22
0 10 20 30 40 50 60 time 0 10 20 30 40 50 60 time
23 24
WCET Period Deadline
10 30 30 Earliest FPS vs EDF
10 40 40
Deadline First • EDF can (often) handle higher loads and still
20 50 50
meet deadlines
• However, if EDF misses a deadline the system
may become instable (more misses)
• In FPS, if a deadline is missed its always the
lowest priority task that misses (stable
behavior)
• Support for FPS is available in “all” Real-Time
OSes
• Support for EDF is only available in research
OSes
• In both EDF and FPS method to guarantee
that deadlines are meet are available
0 10 20 30 40 50 60 time – but today not practically useful in commercial OSes
25 26