Chapter 13 Embedded Operating Systems
Chapter 13 Embedded Operating Systems
Chapter 13 Embedded Operating Systems
Systems:
Internals Chapter 13
and
Design Embedded Operating
Principles Systems
Eighth Edition
By William Stallings
Embedded System
Refers to the use of electronics and software within a product that is
designed to perform a dedicated function
in many cases, embedded systems are part of a larger system or
product
antilock braking system in a car would be an example
Software Auxiliary
Systems
FPGA/ Memory (power,
ASIC cooling)
Human Diagnostic
Processor
interface port
A/D D/A
conversion Conversion
Electromechanical
backup and safety
Sensors Actuators
External
environment
Reactive operation
Configurability
Advantage:
• familiar interface
Disadvantage:
• not optimized for real-time
and embedded applications
Purpose-Built Embedded OS
Typical characteristics include:
fast and lightweight process or thread switch
scheduling policy is real time and dispatcher module is part of scheduler
small size
responds to external interrupts quickly
minimizes intervals during which interrupts are disabled
provides fixed or variable-sized partitions for memory management
provides special sequential files that can accumulate data at a fast rate
• eCos
• TinyOS
To deal with timing
constraints, the kernel:
Timing • provides bounded
Constraints execution time for
primitives
• maintains a real-time clock
• provides for special alarms
and timeouts
• supports real-time queuing
disciplines
• provides primitives to
delay processing by a fixed
amount of time and to
suspend/resume execution
Embedded Linux
A version of Linux running in an embedded system
Android
Focus of Android lies in the
vertical integration of the
Linux kernel and the Android
user-space components
an embedded OS based on a Linux
Many embedded Linux kernel
developers do not consider
Android to be an instance of more of a platform OS that can
support a variety of applications that
embedded Linux vary from one platform to the next
from the point of view of these
developers, a classic embedded a vertically integrated system,
device has a fixed function, including some Android specific
modification to the Linux kernel
frozen at the factory
TinyOS
Streamlines to a very minimal OS for embedded systems
Core OS requires 400 bytes of code and data memory combined
Not a real-time OS
There is no kernel
There are no processes
OS doesn’t have a memory allocation system
Interrupt and exception handling is dependent on the peripheral
It is completely nonblocking, so there are few explicit synchronization
primitives
Has become a popular approach to implementing wireless sensor network
software
Wired link
Sensor
Sensor and relay
Base
Host PC station
Sensor
and relay Sensor
Sensor
and relay
Sensor
and relay
Sensor
StdControl Timer
Components -- Tasks
A software component implements one or more tasks
A command can post a task that will signal an event in the future
in this case there is no tie of any kind to a hardware event
(a) TimerM component
StdControl Timer
configuration TimerC {
provides {
interface StdControl;
interface Timer;
}
StdControl Timer }
TimerM
implementation {
Clock components TimerM, HWClock;
StdControl = TimerM.StdControl;
Timer = TimerM.Timer;
TimerM.Clk -> HWClock.Clock;
}
Clock
HWClock
Clock SendMsg
Qu
Cloc HW send eued ReceiveMsg
k
G
Comeneric
m
StdControl
Main SurgeM
Dedicated
• a resource that a subsystem needs exclusive access to at all times
• no sharing policy is needed
• examples include interrupts and counters
Virtualized
• every client of a virtualized resource interacts with it as if it were a dedicated resource
• an example is a clock or timer
Shared
• abstraction that provides access to a dedicated resource through an arbiter component
• arbiter determines which client has access to the resource at which time
Resource Resource Resource-specific
Resource Requested Configure interfaces
Resource-specific
interfaces
Shared Resource
Arbiter Resource-specific
Info interfaces
Embedded Linux
Kernel size
Compilation
Embedded Linux file systems
Advantages of embedded
Linux
Android