View
218
Download
0
Category
Preview:
Citation preview
Embedded Systems
2001. 4. 4최병주
http://home.ewha.ac.kr/~bjchoi
( 숭실대학교 컴퓨터 학부 양승민 교수
realtime.ssu.ac.kr)
2
htt
p:/
/realt
ime.s
su.a
c.kr/
Table of ContentsEmbedded Systems and Characteristics
Real-time-ness in Embedded Systems
Robust-ness in Embedded Systems
Various-ness in Embedded Systems
Some Research Issues
Epilogue
3
htt
p:/
/realt
ime.s
su.a
c.kr/
정보가전
셋탑박스 셋탑박스 또는또는
게이트웨이게이트웨이
선풍기선풍기감시용감시용카메라카메라
냉장고냉장고
오디오오디오
전기밥솥전기밥솥
TVTV
비디오비디오
조명조명조명조명
인터넷인터넷
정보가전정보가전원격제어원격제어
전자상거래전자상거래
멀티미디어 방송멀티미디어 방송
정보가전정보가전이란이란 ??유무선의 정보통신망에 연결되어 유무선의 정보통신망에 연결되어
데이터 송수신이 가능한 데이터 송수신이 가능한 차세대 네트워크 가전제품차세대 네트워크 가전제품
정보가전정보가전이란이란 ??유무선의 정보통신망에 연결되어 유무선의 정보통신망에 연결되어
데이터 송수신이 가능한 데이터 송수신이 가능한 차세대 네트워크 가전제품차세대 네트워크 가전제품
4
htt
p:/
/realt
ime.s
su.a
c.kr/
PDA 와 이동통신 단말기 로드맵
20002000 년년20002000 년년 20012001 년년20012001 년년 20032003 년년20032003 년년 20042004 년년20042004 년년20022002 년년20022002 년년
물류용 물류용 PDAPDA바코드 스캐너바코드 스캐너+ Bluetooth+ Bluetooth
물류용 물류용 PDAPDA바코드 스캐너바코드 스캐너+ Bluetooth+ Bluetooth
PDAPDA(Bluetooth(Bluetooth
내장내장 ))
PDAPDA(Bluetooth(Bluetooth
내장내장 ))
복합무선단말기복합무선단말기(PDA+IMT2000+GPS(PDA+IMT2000+GPS
++ 고속 온라인 고속 온라인 동영상카메라동영상카메라
++ 화상회의화상회의 ++ 무선 무선 VODVOD++ 전자화폐전자화폐 ++ 온라인 게임온라인 게임++ 홈네트웍홈네트웍 ++ 방송수신기방송수신기 ))
복합무선단말기복합무선단말기(PDA+IMT2000+GPS(PDA+IMT2000+GPS
++ 고속 온라인 고속 온라인 동영상카메라동영상카메라
++ 화상회의화상회의 ++ 무선 무선 VODVOD++ 전자화폐전자화폐 ++ 온라인 게임온라인 게임++ 홈네트웍홈네트웍 ++ 방송수신기방송수신기 ))
복합무선단말기복합무선단말기(PDA+IMT2000(PDA+IMT2000+GPS++GPS+ 카메라카메라
++ 화상회의화상회의++ 전자화폐전자화폐
++ 온라인게임온라인게임 ))
복합무선단말기복합무선단말기(PDA+IMT2000(PDA+IMT2000+GPS++GPS+ 카메라카메라
++ 화상회의화상회의++ 전자화폐전자화폐
++ 온라인게임온라인게임 ))
CDMACDMA 스마트폰스마트폰(OS: Linux,Java (OS: Linux,Java
Web Web 가능가능 ))
CDMACDMA 스마트폰스마트폰(OS: Linux,Java (OS: Linux,Java
Web Web 가능가능 ))
무선인터넷단말기무선인터넷단말기(CDMA+Bluetooth)(CDMA+Bluetooth)무선인터넷단말기무선인터넷단말기
(CDMA+Bluetooth)(CDMA+Bluetooth)
GPSGPS네비게이션네비게이션
GPSGPS네비게이션네비게이션
온라인게임온라인게임PDAPDA
온라인게임온라인게임PDAPDA
군사 지령군사 지령시스템 단말기시스템 단말기
군사 지령군사 지령시스템 단말기시스템 단말기
IMT2000IMT2000단말기단말기
IMT2000IMT2000단말기단말기
복합무선단말기복합무선단말기(PDA+IMT2000)(PDA+IMT2000)복합무선단말기복합무선단말기
(PDA+IMT2000)(PDA+IMT2000)
홈네트워크홈네트워크연동 연동 PDAPDA홈네트워크홈네트워크연동 연동 PDAPDA
- - ㈜에이치엔티 단말기 사업계획서 참고㈜에이치엔티 단말기 사업계획서 참고- - ㈜에이치엔티 단말기 사업계획서 참고㈜에이치엔티 단말기 사업계획서 참고
MP3MP3 폰폰MP3MP3 폰폰
카메라폰카메라폰카메라폰카메라폰
TVTV 폰폰TVTV 폰폰
5
htt
p:/
/realt
ime.s
su.a
c.kr/
Vending Machine : An Example
6
htt
p:/
/realt
ime.s
su.a
c.kr/
Flows in Embedded Systems
동전입력동전입력동전입력동전입력
품목선택품목선택품목선택품목선택
금액확인 및 금액확인 및 구매 가능 품목 결정구매 가능 품목 결정
금액확인 및 금액확인 및 구매 가능 품목 결정구매 가능 품목 결정
물품 재고 확인물품 재고 확인물품 재고 확인물품 재고 확인
거스름돈 계산거스름돈 계산거스름돈 계산거스름돈 계산
물품 수량 물품 수량 DBDB물품 수량 물품 수량 DBDB
물품출력물품출력물품출력물품출력
거스름돈 출력거스름돈 출력거스름돈 출력거스름돈 출력
물품 보충 요청물품 보충 요청물품 보충 요청물품 보충 요청
구매가능구매가능품목표시품목표시
구매가능구매가능품목표시품목표시
Sensors Analysis & Decision
Actuators
7
htt
p:/
/realt
ime.s
su.a
c.kr/
Which One is Correct ?
1. Embedded System Real-Time System
2. Embedded System is Real-Time System
3. Real-Time System is Embedded System
4. Embedded System <> Real-Time System
5. None of the Above
8
htt
p:/
/realt
ime.s
su.a
c.kr/
Embedded Real-Time Applications
Embedded system“… a standard programming language for embedded-system applications, in which one or more computers are part of a larger system such as an aircraft, ship, or a communications system.”
Real-time system“the correctness of the system depends not only on the logical result of the computations but also on time at which the results are produced”
9
htt
p:/
/realt
ime.s
su.a
c.kr/
Embedded (Real-time) System
Characteristics and Related Issues Kernel Kernel
SupportSupport
Software Software EngineeringEngineering
System System ArchitecturArchitecturee
CharacteristicsCharacteristics• Real-time-ness (Real-time-ness ( 실시간성실시간성 ))
• Robust-ness (Robust-ness ( 견고성견고성 ))
• Various-ness (Various-ness ( 다양성다양성 , , 특수성특수성 ) )
10
htt
p:/
/realt
ime.s
su.a
c.kr/
Real-time-ness in Embedded System
Hard Real-Time vs. Soft Real-TimeTime Specification and VerificationSchedulability
11
htt
p:/
/realt
ime.s
su.a
c.kr/
Hard Real-Time vs. Soft Real-Time
Time Value Function“Reward value” of the system when the task terminates
Reward Value
HRT task
SRT task
Time
12
htt
p:/
/realt
ime.s
su.a
c.kr/
Times in Real-Time Systems
Times associated with DevicesFrequency
Tardiness
Times associated with TasksInvocation time
Execution deadline
Execution period (or interval)
Sleep and wake-up time
Time associated with Messages and DataDelivery deadline (event message)
Validity time (state message)
13
htt
p:/
/realt
ime.s
su.a
c.kr/
Specification and Verification of Times
In real-time systems, time are associated with devices (i.e., sensors and actuators), tasks (i.e., analysis and decision), data and messages (i.e., interactions between device and task, and between tasks)
Need mechanisms to specify(or represent) and verify times throughout the life cycle of real-time system development
• Requirement specification level, e.g., Real-Time Logic• Design description level, e.g., Timed Petri Nets• Programming language level, e.g., Ada
14
htt
p:/
/realt
ime.s
su.a
c.kr/
Time Specification with RTL : An example
Producer-Consumer with a single bufferActions
• S: Sending device which puts a message into the buffer every T seconds
• P: Processing task which gets a message from the buffer every T seconds with C seconds processing time
i @(S, i ) = i * T i @(P, i ) i * T ^ @( P, i ) (i+1) * T i @(P, i ) @( P, i ) + C Where X : beginning of action X X : completion of action X @(E, i) : time of the i-th occurrence of event E
15
htt
p:/
/realt
ime.s
su.a
c.kr/
Time Verification with RTL an ExampleSafety Assertion (SA)
i @(P, i) @(S, i+1) (P should consume a message before S overwrites it)
Verification (by contradiction) Step 1 : Remove quantifier from the specification @(S, i ) = i * T
@(P, i ) i * T @(P, i ) (i+1) * T @(P, i ) @(P, i ) + C ¬ SA : @(P, i ) > @(S, i+1)
Step 2 : @(S, i+1) = (i+1) * T
(i+1) * T @(P, i)
@(P, i ) @(P, i ) + C @(P, i ) > @(S, i+1) Step 3 : Consequently we can derive the following formula which is false. @(S, i+1) > @(S, i+1) + C
16
htt
p:/
/realt
ime.s
su.a
c.kr/
Two Aspects of Verification
Check if the specified times reflect all the original requirements correctly
Completeness: All necessary timing constraints are specified
Consistency: All specified times are not conflict
Check if the specified timing requirements are feasible for implementation on a given environment (Validation)
Task allocation / Task scheduling
Execution time estimation
Real-time protocol (or real-time message scheduling)
17
htt
p:/
/realt
ime.s
su.a
c.kr/
Schedulability AnalysisGiven properties of processes and target architecture
( including execution time, request interval and deadline )
Scheduling discipline chosen• Can tasks be scheduled ? (Can all tasks be completed within deadlines ?) OR • How can we maximize the reward value ? (How can we minimize the penalty ?)
Performance Criteria• Optimality• Complexity• Run-time overhead
18
htt
p:/
/realt
ime.s
su.a
c.kr/
What Makes Schedulability Analysis Difficul
t ? Precedence among tasksResource sharingCommunication delay (distributed systems)Sporadic tasks (or aperiodic tasks)Task allocation (multiprocessor systems)
Optimal scheduling strategies are known mostly for a single processor system with independent tasks
Are estimated execution times of tasks correct ?
19
htt
p:/
/realt
ime.s
su.a
c.kr/
Robust-ness in Embedded Systems
Definitions of Faults
Redundancy
Software Fault Tolerance
20
htt
p:/
/realt
ime.s
su.a
c.kr/
Faults, Errors, Failures
Not all faults manifest (i.e., become error)Not all errors lead to failures or system malfunctioning
System FailureSystem FailureSystem FailureSystem Failure
FaultFaultFaultFault
ErrorErrorErrorError
A physical defect - a gateway always produces 0 or 1 - mistakes within software
Manifestation of faults - deviation from required operation
Incorrect performance of system(or System malfunctioning)
21
htt
p:/
/realt
ime.s
su.a
c.kr/
Fault Avoidance vs. Fault Tolerance
Fault avoidanceBetter specification/verification
Better quality component• Hardware components
• Programmers
• Debugging, testing
PremiseIt is not possible to completely avoid faults
Fault tolerance is needed
22
htt
p:/
/realt
ime.s
su.a
c.kr/
Software Errors (1)(by Robert L. Glass )
Thoughts
Not all software errors can be found by known error-
removal techniques
Not all software errors are found EVER
Not all software error-finders are equal
Not all software errors are equal
23
htt
p:/
/realt
ime.s
su.a
c.kr/
Software Errors (2)Conclusions
There is not now a process answer to the problem of software errors
Software in critical systems must take precautions beyond error removal for defense against software errors
The most important element in software error removal is not the nature of the process, but the choice of people
Both error removal and fault tolerance must concentrate on the worst of the errors-the ones that can result in unsafe systems
24
htt
p:/
/realt
ime.s
su.a
c.kr/
RedundancyFault tolerance requires redundancy
Hardware redundancy
Software redundancy
Information redundancy
Time redundancy
Forms of redundancy Multiple identical copies
Multiple versions
DiversitySpecification diversity
Design diversity
Implementation diversity
25
htt
p:/
/realt
ime.s
su.a
c.kr/
Information Flow in Embedded Systems
Communication Communication SystemSystem
Communication Communication SystemSystem
HardwareHardwareHardwareHardware
SoftwareSoftwareSoftwareSoftware
SensorSensorSensorSensorInput
ActuatorActuatorActuatorActuator Output
26
htt
p:/
/realt
ime.s
su.a
c.kr/
SystemSystemFailureFailureSystemSystemFailureFailure
Software Fault Tolerance
Software Fault Tolerance
SoftwareSoftwareErrorError
SoftwareSoftwareErrorError
WrongWrongInformationInformation
WrongWrongInformationInformation
CommunicationCommunicationFaultFault
CommunicationCommunicationFaultFault
SoftwareSoftwareFaultFault
SoftwareSoftwareFaultFault
HardwareHardwareFaultFault
HardwareHardwareFaultFault
27
htt
p:/
/realt
ime.s
su.a
c.kr/
Software Fault ToleranceHistorical View
70’s : Concepts in redundancy and atomic actions; NVP, RB, Conversation scheme, PTC Scheme, etc : “Pseudo” parallel systems80’s : Theoretical study and empirical study ; Reliability modeling and performance modeling; Design and implementation approach; “limited” parallel system90’s : Clinical study, I.e., FT in “real” systems, esp. for real-time distributed/parallel systems; “True” parallel systems.Encouraging Factors
Computers will be used more and more for control of critical embedded real-time applications.Not all software errors are found EVER!“True” parallel systems are available.
28
htt
p:/
/realt
ime.s
su.a
c.kr/
Software Fault Tolerance Technique
RedundancyMultiple identical copiesMultiple versions
Fault by ageing(or by hardware fault) Identical copy may work
Design/Implementation fault Identical copy does not work
N-version Programming, Recovery Block, and Conversation Scheme
29
htt
p:/
/realt
ime.s
su.a
c.kr/
Design and Implementation Problem
Cost
Design diversityAny systematic approach ?
Error detectionApproval(e.g., Acceptance Test)
Consensus(e.g., Comparison)
Totally application dependant
Timing constraints and timeout, esp. in distributed systems
30
htt
p:/
/realt
ime.s
su.a
c.kr/
Various-nessin Embedded Software
Various Applications
Various Requirements / Equipment / Services
20012001 년의 년의 어느날어느날
20012001 년의 년의 어느날어느날
32
htt
p:/
/realt
ime.s
su.a
c.kr/
Embedded (Real-time) System
Characteristics and Related Issues Kernel Kernel
SupportSupport
Software Software EngineeringEngineering
System System ArchitecturArchitecturee
CharacteristicsCharacteristics• Real-time-ness (Real-time-ness ( 실시간성실시간성 ))
• Robust-ness (Robust-ness ( 견고성견고성 ))
• Various-ness (Various-ness ( 다양성다양성 , , 특수성특수성 ) )
33
htt
p:/
/realt
ime.s
su.a
c.kr/
Some Research Issues
시간 요구 사항의 명세 및 표현 Good Languages실시간 보장 Time analysis and schedulingOverload 상황에 대한 처리 “ Best effort” scheduling시스템 감시 Monitoring and diagnosis결함 처리 Fault tolerance techniques and implementation다양성 처리 Polymorphic Kernel and componentEmbedded System 을 위한 개발 방법론 및 Testing 방법
34
htt
p:/
/realt
ime.s
su.a
c.kr/
EpilogueComputer systems will be used more and more for “intelligent” embedded systems
From “computer-aided” to “computer-controlled” societyDependability is the Key Factor
• Temporal as well as logical correctness
• Robust
기반 기술 포기할 것인가 ?• 실시간 커널 개발 시급
Recommended