Infrastructure Middleware (Part 1): Hardware Abstraction Layer (HAL)

Similar documents
Overview of Layered Architectures

Java 8 Parallel ImageStreamGang Example (Part 3)

The Java Executor (Part 1)

Infrastructure Middleware (Part 3): Android Runtime Core & Native Libraries

Overview of Java Threads (Part 3)

Overview of Java Threads (Part 2)

Benefits of Concurrency in Java & Android: Program Structure

Overview of Java s Support for Polymorphism

Overview of Frameworks: Part 3

Overview of Advanced Java 8 CompletableFuture Features (Part 3)

External vs. Internal Iteration in Java 8

The Java ExecutorService (Part 1)

Java Barrier Synchronizers: CountDownLatch (Part 1)

Java 8 Parallel Stream Internals (Part 2)

Overview of Java 8 Parallel Streams (Part 1)

Android. Lesson 1. Introduction. Android Developer Fundamentals. Android Developer Fundamentals. to Android 1

Java Semaphore (Part 1)

Open Mobile Platforms. EE 392I, Lecture-6 May 4 th, 2010

Android App Development. Muhammad Sharjeel COMSATS Institute of Information Technology, Lahore

Overview of Activities

Java Barrier Synchronizers: CyclicBarrier (Part 1)

Java ReentrantLock (Part 1)

Android System Architecture. Android Application Fundamentals. Applications in Android. Apps in the Android OS. Program Model 8/31/2015

CS260 Intro to Java & Android 04.Android Intro

ANDROID SYLLABUS. Advanced Android

Techniques for Dynamic Swapping in the Lightweight CORBA Component Model

A Case Study of Gang of Four (GoF) Patterns : Part 7

Android Services & Local IPC: Overview of Programming Bound Services

The Java FutureTask. Douglas C. Schmidt

Introduction to Android

Firefox OS App Days. Overview and High Level Architecture. Author: José M. Cantera Last update: March 2013 TELEFÓNICA I+D

Android App Development

A Big Little Hypervisor for IoT Development February 2018

The Penguin and the Droid

PROCE55 Mobile: Web API App. Web API.

Transform Your Business To An Open Hybrid Cloud Architecture. Presenter Name Title Date

Android PC Splash Brothers Design Specifications

Developer s overview of the Android platform

Android Internals and the Dalvik VM!

An Introduction to Android. Jason Chen Developer Advocate Google I/O 2008

Adaptive System Infrastructure for Ultra-Large. Large-Scale Systems. SMART Conference, Thursday, March 6 th, 2008

Real-Time Embedded Systems

Distributed Systems COMP 212. Lecture 18 Othon Michail

Android Services & Local IPC: The Command Processor Pattern (Part 1)

Lecture 1 Introduction to Android. App Development for Mobile Devices. App Development for Mobile Devices. Announcement.

Java Monitor Objects: Synchronization (Part 1)

OMAP Android Integration

Meeting the Challenges of Ultra-Large

Android In Industrial Applications. A Field Report

Introduction to Android

Overview of Advanced Java 8 CompletableFuture Features (Part 2)

Model-Driven Optimizations of Component Systems

Wind River. All Rights Reserved.

Andriod-Mobile Application Development. Mobile Application Development Workshop on Andriod Platform.

Software Development & Education Center ANDROID. Application Development

Mobile Internet Devices and the Cloud

Android framework. How to use it and extend it

PULSE CONNECT SECURE APPCONNECT

Mobile development initiation

Android Fundamentals - Part 1

David Bernstein June 2012

Minds-on: Android. Session 1

Mobile Computing LECTURE # 2

What s Up Docker. Presented by Robert Sordillo Avada Software

Choose OS and click on it

Open Source in Automotive Infotainment

Ahmed Ali Big fan of Android

Introduction. Lecture 1. Operating Systems Practical. 5 October 2016

Institute for Software Integrated Systems Vanderbilt University Nashville, Tennessee

Facing the Reality: Virtualization in a Microkernelbased Operating System. Matthias Lange, MOS, January 26th, 2016

Research on Improving performance and Battery Backup of Android Mobile with help of Cyanogen Mod, and latest kernel

Another difference is that the kernel includes only the suspend to memory mechanism, and not the suspend to hard disk, which is used on PCs.

OEM Windows Server 2016 Licensing FAQ

Bringing it all together: The challenge in delivering a complete graphics system architecture. Chris Porthouse

Simplifier la mise en production d applications MATLAB. Marc Wolff Application Engineer MathWorks 1

Operating Systems (2INC0) 2018/19. Introduction (01) Dr. Tanir Ozcelebi. Courtesy of Prof. Dr. Johan Lukkien. System Architecture and Networking Group

Tools & Techniques for Deployment & Configuration of QoS- enabled Component Applications

Android - open source mobile platform

A Case Study of Gang of Four (GoF) Patterns: Part 3

Parallels Virtuozzo Containers

GDP Next. Gunnar Andersson Development Lead, GENIVI Alliance

Cloud Computing. Technologies and Types

IJRDTM Kailash ISBN No Vol.17 Issue

Lecture 2 PLATFORM SECURITY IN ANDROID OS

Produced by. Mobile Application Development. Eamonn de Leastar

Overview of Patterns: Introduction

Comprehensive Development and Debug Coverage for Linux and Android on the MIPS Architecture

Illinois Proposal Considerations Greg Bauer

Chapter 4: Threads. Chapter 4: Threads

IcedRobot. The GNUlization of Android. Mario Torre David Fu. With the collaboration of Mark Wielaard and Roman Kennke

Android Programming in Bluetooth Cochlea Group

INTERNATIONAL JOURNAL OF PURE AND APPLIED RESEARCH IN ENGINEERING AND TECHNOLOGY

Android Application Development

Android App Development. Ahmad Tayeb

Android on Tizen. Moscow State University

Interoperation of tasks

RTOS, Linux & Virtualization Wind River Systems, Inc.

Android Application Development Course Code: AND-401 Version 7 Duration: 05 days

Operating Systems. read the warning about the size of the project make sure you get the 6 th edition (or later) of the book

ArcServer Flex API on an Android Device

Transcription:

Infrastructure Middleware (Part 1): Douglas C. Schmidt d.schmidt@vanderbilt.edu www.dre.vanderbilt.edu/~schmidt Institute for Software Integrated Systems Vanderbilt University Nashville, Tennessee, USA

Learning Objectives in this Part of the Lesson Understand the role the HAL plays in Android s system architecture System Libraries VM & Runtime The HAL mediates interactions between 2 the OS kernel layer & higher layers

Learning Objectives in this Part of the Lesson Understand the role the HAL plays in Android s system architecture Know the technical & economic factors that motivated Google & its original equipment manufacturer (OEM) partners to add a HAL to the Android software stack 3

Learning Objectives in this Part of the Lesson Understand the role the HAL plays in Android s system architecture Know the technical & economic factors that motivated Google & its original equipment manufacturer (OEM) partners to add a HAL to the Android software stack Android apps rarely access the HAL directly, 4 so you needn t know all the details

Overview of Android Hardware Abstraction Layer 5

The HAL helps to separate concerns in the Android system architecture System Libraries VM Runtime See source.android.com/devices/#hardware 6 Abstraction Layer

The HAL helps to separate concerns in the Android system architecture, e.g. Decouples Android platform software from hardware System Libraries VM Runtime 7

The HAL helps to separate concerns in the Android system architecture, e.g. Decouples Android platform software from hardware i.e., apps don t break when hardware changes System Libraries VM Runtime 8

The HAL helps to separate concerns in the Android system architecture, e.g. Decouples Android platform software from hardware Decouples Android framework layer from the operating system layer System Libraries VM Runtime 9

The HAL helps to separate concerns in the Android system architecture, e.g. Decouples Android platform software from hardware Decouples Android framework layer from the operating system layer e.g., this layer can be programmed via method calls on Java objects, rather than C system function calls System Libraries VM Runtime 10

The HAL helps to separate concerns in the Android system architecture, e.g. Decouples Android platform software from hardware Decouples Android framework layer from the operating system layer e.g., this layer can be programmed via method calls on Java objects, rather than C system function calls System Libraries VM Runtime App developers can thus focus on business 11 logic, rather than low-level details

Android s HAL defines interfaces that driver modules must implement System Libraries VM Runtime See source.android.com/devices/#structure 12

Android s HAL defines interfaces that driver modules must implement System Libraries VM Runtime These driver modules do not run 13 in the Android Linux kernel!

The Android HAL is a user space library layer, unlike device drivers residing in the Android Linux kernel System Libraries VM Runtime See earlier lesson on the 14 Android Linux Kernel

The Android HAL is a user space library layer, unlike device drivers residing in the Android Linux kernel User space code can t directly access Android Linux kernel device drivers System Libraries VM Runtime See earlier lesson on the 15 Android Linux Kernel

The Android HAL is a user space library layer, unlike device drivers residing in the Android Linux kernel User space code can t directly access Android Linux kernel device drivers Therefore apps & system services use the HAL to interact w/kernel drivers System Libraries VM Runtime See www.dre.vanderbilt.edu/~schmidt/pdf/android-hal.pdf 16

OEMs implement HAL driver modules for their proprietary hardware See source.android.com/devices/#hardware 17 Abstraction Layer

OEMs implement HAL driver modules for their proprietary hardware e.g., camera hardware from an OEM has a camera system service & a camera HAL API See source.android.com/devices/camera 18

Driver modules that implement HAL APIs are linked dynamically by Android See source.android.com/devices/#modules 19

Driver modules that implement HAL APIs are linked dynamically by Android e.g., when an app first accesses the camera hardware encapsulated by the camera HAL API See source.android.com/devices/#modules 20

Motivations for Android s Hardware Abstraction Layer 21

There are two types of motivations for Android s user space HAL design 22

One motivation is technical 23

One motivation is technical Shielding higher layers of Android s software stack from Linux kernel idiosyncrasies System Libraries VM & Runtime 24

One motivation is technical Shielding higher layers of Android s software stack from Linux kernel idiosyncrasies GNU Linux device drivers don t provide consistent support for certain types of devices It s historical focus is on laptops/desktops/servers System Libraries VM & Runtime 25

One motivation is technical Shielding higher layers of Android s software stack from Linux kernel idiosyncrasies GNU Linux device drivers don t provide consistent support for certain types of devices The HAL therefore defines a consistent object-oriented API for these hardware elements System Libraries VM & Runtime 26

Another motivation is economic 27

Another motivation is economic Kernel device drivers are GPL d See en.wikipedia.org/wiki/gnu_general_public_license 28

Another motivation is economic Kernel device drivers are GPL d The GPL requires OEMs give out source code for their drivers See en.wikipedia.org/wiki/gnu_general_public_license 29

Another motivation is economic Kernel device drivers are GPL d The GPL requires OEMs give out source code for their drivers However, Android OEMs often use proprietary drivers i.e., they don t want to give out the source code for them See hiqes.com/android-linux-kernel-drivers 30

Another motivation is economic Kernel device drivers are GPL d The GPL requires OEMs give out source code for their drivers However, Android OEMs often use proprietary drivers Putting driver implementations in user-space HAL enables them no to release the source code System Libraries VM & Runtime See www.apache.org/licenses/license-2.0 31

Another motivation is economic Kernel device drivers are GPL d The GPL requires OEMs give out source code for their drivers However, Android OEMs often use proprietary drivers Putting driver implementations in user-space HAL enables them no to release the source code See Android licenses for details System Libraries See source.android.com/source/licenses.html 32 VM & Runtime

End of Infrastructure Middleware (Part 1): Hardware Abstraction Layer 33