Escolar Documentos
Profissional Documentos
Cultura Documentos
Embedded System
Embedded systems are computing systems with tightly coupled hardware and
software integration, that are designed to perform a dedicated function.
Types:
Characteristics:
Middleware
Operating System
Can co-exist as
one
Firmware/Drivers
Hardware
H/W Layer
Temporal Correctness:
In simple words, an embedded system in which some specific work has to be done in
a specific period of time are called Real Time Systems.
Operating System
An operating system is a program that acts as an interface between the user and the
hardware and controls the execution of all kinds of programs.
For a small scale embedded system , operating system can be considered as the
software that controls the hardware.
Objectives:
What is an RTOS ?
An RTOS is an operating system which gives a deterministic execution pattern for the
scheduled process or task in the system.
Why RTOS ?
IEEE Portable Operating System Interface for Computer Environments, POSIX 1003.1b (formerly
1003.4) provides the standard compliance criteria for RTOS services. It is designed to allow
application programmers to write applications that can easily be ported across OSs.
Features of RTOS
Multithreading and preemptability - The scheduler should be able to pre-empt any task in the system
and allocate the resource to the thread that needs it most even at peak load.
Thread Priority - All tasks are assigned priority level to facilitate pre-emption. The highest priority task
that is ready to run will be the task that will be running.
Inter Task Communication & Synchronization - Multiple tasks pass information among each other in a
timely fashion and ensuring data integrity
Priority Inheritance - RTOS should have large number of priority levels & should prevent priority
inversion using priority inheritance.
Task switching latency: The time needed to save the context of a currently executing task and switching to another
task.
Interrupt latency: The time elapsed between execution of the last instruction of the interrupted task and the first
instruction in the interrupt handler.
Interrupt dispatch latency: The time from the last instruction in the interrupt handler to the next task scheduled to run.
RTOS Architecture
Memory
Mgmt
Task Mgmt
What is a task ?
A task in general is an independent executable program with its own memory space.
States: Suspended, Ready, Running, Terminated.
Scheduler
A scheduler schedules the task to be executed into the CPU. A dispatcher, dispatches the
same.
The decision on task to execute is taken by the scheduler based on the scheduling algorithm
in place.
General scheduling algorithm followed are:
Thread/Task starvation
Context Switch
Preemption
Priority inheritance
Priority inversion
Memory Management
Stack Management
Heap Management
Memory Pools
Timer Management
Message Queues
Semaphore
Mutex
RTOS in a Smartphone
AP Env
SMS
app
Calling
app
Messenger
apps
Android/IOS/Windows
Core-1
Core-2
Core-3
Core-4
Core-5
Core-6
Core-7
Core-8
Peripherals
+ Memory
Shared
Memory
/
Driver
CP Env
2G
3G
4G
RTOS
CPU
Peripheral + Memory
RTOS in Industry
RTOS
Applications/Features
Used for Small footprint, mobile and connected devices
Windows CE
VxWorks
Micrium C/OS-II
Certified by rigorous standards, such as RTCADO-178B
Most traditional RTOS in the market.
QNX
RT Linux
Good real time performance, but no certification
Developed for embedded systems and Internet applications under the Java platform.
Jbed
Allows an entire application including the device drivers to be written using Java
Designed for Smartphones
Symbian
Supported by ARM, x86 architecture
Suitable for traditional board based embedded systems and SoC architectures
VRTX
Supported by ARM, MIPS, PowerPC & other RISC architectures