100 likes | 224 Views
4. System Software. 4.1 Embedded OS 4.2 Hardware abstraction layers 4.3 Middleware 4.4 Real-time DB. The components of embedded systems from earlier design efforts and constitute intellectual property (IP ). IP reuse is one key technique in coping with the increasing complexity of designs.
E N D
4. System Software 4. Embedded System Software 4.1 Embedded OS 4.2 Hardware abstraction layers 4.3 Middleware 4.4 Real-time DB
The components of embedded systems from earlier design efforts and constitute intellectual property (IP). IP reuse is one key technique in coping with the increasing complexity of designs. • The term “IP reuse” frequently denotes the reuse of hardware. However, reusing hardware is not enough, software component need to be reused as well. • Standard software components that can be reused include system software components such as embedded operating systems (OS) and middleware. 4.1 Embedded OS 4.1.1 General requirements • The following are essential features of embedded OS: 4. Embedded System Software
Due to the large variety of embedded systems, there is also a large variety of requirements for the functionality of embedded OSs. • Configurability is therefore one of the main characteristics of embedded OSs. • Object-orientation, used for a derivation of proper subclasses. • Aspects-oriented programming: In computing, aspect-oriented programming (AOP) is a programming paradigm that aims to increase modularity by allowing the separation of cross-cutting concerns. 4. Embedded System Software
Conditional compilation • Advanced compile-time evaluation • Ex: If a particular function parameter is always constant, this parameter can be dropped from the parameter list. • Linker-based removal of unused functions • There is a large variety of peripheral devices employed in embedded systems. • Protection mechanisms are not always necessary. • Interrupts can be connected to any process. • Many embedded systems are real-time (RT) systems and, hence, the OS used in these systems must be a real-time operating system (RTOS). 4.1.2 Real-time OS • Four key requirements • The timing behavior of the OS must be predictable. • The OS must manage the scheduling of tasks. 4. Embedded System Software
Some systems require the OS to manage time. • The OS must be fast. 4. Embedded System Software
4.1.3 Virtual machine • In certain environments, it may be useful to emulate several processors on a single real processor. This is possible with virtual machines executed on the bare hardware. • For embedded systems, this approach has to be used with care since the temporal behavior of such an approach may be more problematic and timing predictability may be lost. 4.1.4 Resource access protocols 4.1.4.1 Priority inversion 4. Embedded System Software resume P(S) [sleep] T1 T2 blocking T3 P(S) V(S) Normal execution Critical section
4.1.4.2 Priority inheritance • One way of dealing with priority inversion is to use the priority inheritance protocols. This protocol is a standard protocol available in many real-time operating systems. • Tasks are scheduled according to their active priorities. Tasks with the same priorities are scheduled on a first-time, first-served basis. • When a task T1 executes P(S) and exclusive access is already granted to some other task T2, then T1 will be blocked. If the priority of T2 is lower than that of T1, T2 inherits the priority of T1. Hence, T2 resumes execution. In general, every task inherits the highest priority of tasks blocked by it. • When a task T2 executes V(S), its priority is decreased to the highest priority of the tasks blocked by it. If no other task is blocked by T2, its priority is reset to the original value. Furthermore, the highest priority task so far blocked on S is resumed. • Priority inheritance is transitive: if Tx blocks Ty and Ty blocks Tz, then Tx inherits the priority of Tz. 4. Embedded System Software
P(S) [sleep] resumed V(S) T1 T2 T3 P(S) V(S) Normal execution Critical section 4. Embedded System Software • 4.4 Middleware • We can further divide embedded middleware into two • Layers. • System middleware –an API library that provides system abstraction to application software to increase application portability •
Hardware abstraction middleware –an API specification that acts as a hardware abstraction layer for chip-level integration. • The purpose of system middleware is to provide a homogeneous environment for applications. • Operating system does the same thing, but due to the variety of embedded hardware and competitions among OS companies, we need something beyond OS. 4. Embedded System Software