Linux For Embedded Systems

For Arabs

New Trends in Embedded Systems
Ahmed ElArabawy

… Controlling a motor Controlling some light switches etc…….Myths on Embedded Systems • More Hardware than Software • Applications are Trivial • • • • • Interfacing with sensors Measuring temperature. light. and SW will be tailored to it • Code is very close to the Hardware . • No need for Operating System support “Why do we needs an OS… this is Just an Embedded System” • Code in low level languages • Some even consider all in Assembly • Code fully customized on Hardware • The center piece is the hardware. pressure.

Is this True ?? • This impression is TRUE in some embedded systems • But not true for a great portion of the market • The reason for this impression • Education (No advanced embedded system courses) • Toy projects and hobbyists (most focus on microcontrollers) • Cost of Hardware • Background • Application • Limited exposure to industry .

• Most embedded systems are much more sophisticated. portability of the SW takes priority over efficiency .Little Architecture • Dedicated cores to manage operation of the other cores • Special H/W Accelerators for low level functionality • Use of Operating Systems is unavoidable most of the time • Asymmetric Multi-Processing (AMP) • Each core is running its own OS • Symmetric Multi-Processing (SMP) • One OS is running on multiple cores • Hybrid • S/W is the most sophisticated element and key differentiator • Sometimes. • Use of multicore is becoming very common • Multi-core can be homogeneous or heterogeneous • Big..Reality is ….

and the motivation for them . and try to show the other side of Embedded Systems • I will address some of the Industries using Embedded Systems • I Will try to show some new trends.This Lecture • I want to break this myth.

general purpose computer systems .What is an Embedded System ? • An embedded system is a computer system embedded in a device with a dedicated function • This is different from the traditional.

and not just a computer for multiple tasks) • Size limited (no space for large heat-sink and a cooling fan) • Display size limited • Most of the time it targets real time objectives. It runs in a restricted resources environment.What is an Embedded System? • It is a computing system that performs a specific task (not a general purpose computer) • A lot of times (but not always). and almost constant) . this means. • It needs to be fast and efficient • It needs to be predictable (execution time known ahead. • Power limited (battery operated devices) • Processing/Memory limited • Cost limited (inside the device.

APPLICATIONS OF EMBEDDED SYSTEMS .

Hand Held Devices • Smart Phones • Tablets • e-Readers .

Robotics .

Automotive .

Military .

Networking Devices .

And Other Gadgets .

CASE STUDY THE SMART PHONE .

Under the Hood…. .

NFC .Audio/Video Processing .Bluetooth .11 .TCP/IP networking .802.GPS .Applications .Cellular (2G/3G/4G) .2D/3D Graphics Responsible for ( Communication Stacks) .Simplified Smart Phone Architecture Responsible for: .

Android (Linux Based) Windows iOS Real RTOS: ThreadX Nucleus .

TI-OMAP5000 Family .

QC-SnapDragon

Tegra-4 .nvidia.

nvidia-Tegra K1 .

Nucleus.…) • Run using RTOS (ThreadX.Conclusions • Smart phones Contain two sets of cores • Communication Processer(s) • Run Communication Stacks (LTE. 802.BT. …) • Application Processor(s) • • • • Run the functionality of the phone and any apps on it Run TCP/IP stack May contain special cores for Video Processing or 2D/3D Graphics Use more capable OSs • Most SoCs today have CP and AP on separate chips • The new trend is to combine them in the same chip • Still they run on separate cores/OSs • Different needs • Priority of tasks .11.

CASE STUDY 2 AUTOMOTIVE .

Cars Are Getting Smarter… • Electronics represents 40% of total cost of a car • 90% of new car features require software .

Embedded Systems in the Powertrain .

Electronic Control Units (ECUs) • ECUs are used in different functions of the car • • • • • • • • • • • • • • • • • • • • Engine Control Transmission Control Fuel Efficiency Control Electric Power Steering Speed Control Brake Control Suspension System Control Battery Management Seat Control Door Control Electric Windows Control Lighting Control Airbag Control Telemetric Control Mirror Control Security System Control Windshield Blades Control Entertainment Human-machine interface (HMI) And a lot more ….. .

Proliferation of ECUs Problem • Number of ECUs is going out of control (more than a 100 ECU in today’s car) • • • • • • • • • • • Cost Maintenance and diagnostics Complexity of management Need of communication among them Power efficiency Heat Portability Interaction between features Some software was written for legacy OS Need to re-test with the addition of every new feature Time to market .

. requires full attention of the hardware • Different needs … some need real time support while others don’t • etc….Solution ??? • Why not aggregate these functionality into less number of ECUs • A single Embedded Platform with all of the controllers as applications running on top of it • This has some obstacles: • • • • Security concerns… Fault isolation concerns Some controllers require legacy OSs Some controllers can not run as an application.

Embedded System Virtualization .

Virtualization What ?? Virtual Machines (VMs) Virtual Machines Monitor (VMM) Hypervisor Host Machine .

Virtualization Why?? Virtualization is used for: • Running Multiple Operating Systems simultaneously on the host machine • Easier Software Installations for software packages • Testing and Disaster Recovery • Infrastructure Consolidation • Separation between different environment • Fault isolation • Security .

Each VM can have its own OS • There are two types of Hyper-visors.Virtualization How ? • We can achieve virtualization via the use of a Hyper-visor • Hyper-Visor is a software that can accommodate multiple virtual machines. • Type One (Bare-Metal Hyper-Visor) • Native Virtualization • Type Two (Use of host OS) • Hosted Virtualization .

Virtualization How ? Hyper-Visor Acts as a light host OS Hyper-Visor Acts as an Application .

Native (Bare Metal) Virtualization .

Hosted Virtualization .

Virtualizing HW Resources .

Virtualization in Embedded Systems .

Use Cases .

RTOS & GPOS Consolidation .

RTOS & GPOS Consolidation .

Legacy OS Consolidation .

Legacy OS Consolidation .

Performance-Critical Application Separation .

Performance-Critical Application Separation .

Trusted/Open Application Integration .

Applications of Virtualized Embedded Systems .

Applications .

Virtualization in Smartphones .

Virtualization in Automotive .

Virtualization in Automotive .

Virtualization in Military Applications .

Virtualization in Industrial Automation .

Virtualization in Embedded Gaming .

Limits of Virtualization • Processing • Extra layer from the hardware • Two level task scheduling .

L2 Cache Sometimes we dedicate some resources to a certain VM (CPU Affinity) • Memory • VMM foot print • Possibly multiple Oss • Resources • Resource sharing is tricky • Still a risk of extra bugs due to the VMM layer .Limits of Virtualization • Processing • • • • • Extra layer from the hardware Two level task scheduling Limited hardware support Preemption.

such as security. fault isolation • One solution to meet these different needs without the use of multiple embedded systems within the same platform is virtualization • There are still issues to be resolved with virtualized embedded systems .Conclusions • • • • Embedded System is becoming more and more sophisticated Multicore is becoming more common in Embedded systems Multicore can be using Homogeneous or Heterogeneous cores The different functions within an embedded system require different needs. real time.

com .http://Linux4EmbeddedSystems.