columbia universitylierranli/coms6998-10spring2013/... · 2013. 1. 14. · motivation overview...

Post on 18-Aug-2020

0 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

A virtual Smartphone Architecture

23rd ACM Symposium on Operating Systems Principles, Cascais, Portugal, October 2011

Jeremy Andrus Christoffer Dall Alexander Van’t Hof Oren Laadan Jason Nieh

Columbia Universityin the city of new york

1

Personal PhoneBusiness Phone

Developer Phone

Children’s Phone

EvaluationOverview Graphics Cell Radio DemoMotivation Architecture

2

VirtualizationEvaluationOverview Graphics Cell Radio DemoMotivation Architecture

3

OSKernel

OSKernel

OSKernel

Bare-Metal Hypervisor

Hypervisor / VMM

EvaluationOverview Graphics Cell Radio DemoMotivation Architecture

Hardware

Server Virtualization

poor device support / sharing

4

OSOS

Host OS Kernel

OS

Hypervisor / VMM

EvaluationOverview Graphics Cell Radio DemoMotivation Architecture

Hosted HypervisorDesktop Virtualization

kernelmodule

Hardware

host user space

poor device performance

emulateddevices

5

OS Kernel

EvaluationOverview Graphics Cell Radio DemoMotivation Architecture

User Space SDKNon-Virtualization

no standard appsless secure custom user

space API for isolated apps

Hardware6

• device diversity

• mobile usage model➡ graphics-accelerated UI

Key Challenges

Power Buttons

WiFi

GPS

Cell Radio FramebufferGPU

Binder IPC

Touchscreen

Accelerometer

Compasspmem

microphone headset

speakers

microphone

camera(s)

h.264 accel.

RTC / Alarms

EvaluationOverview Graphics Cell Radio DemoMotivation Architecture

7

Cells

microphoneEvaluationOverview Graphics Cell Radio DemoMotivation Architecture

8

Cells

microphoneEvaluationOverview Graphics Cell Radio DemoMotivation Architecture

Key Observation

large: lots of windows/apps

small:one app at a time

9

Cells

microphoneEvaluationOverview Graphics Cell Radio DemoMotivation Architecture

Key Observation

screen real-estate is limited, and mobile phone users are accustomed to interacting with one thing at time

10

Cells

microphoneEvaluationOverview Graphics Cell Radio DemoMotivation Architecture

Usage Model

foreground / background

11

Cells

microphoneEvaluationOverview Graphics Cell Radio DemoMotivation Architecture

• multiple, isolated virtual phones (VPs) on a single mobile device

• 100% device support in each VP‣ unique phone numbers - single SIM!‣ accelerated 3D graphics!

Complete Virtualization

12

Cells

microphoneEvaluationOverview Graphics Cell Radio DemoMotivation Architecture

• less than 2% overhead in runtime tests• imperceptible switch time among VPs

Efficient Virtualization

13

Cells

microphoneEvaluationOverview Graphics Cell Radio DemoMotivation Architecture

• each VP sees / uses all devices• user can run any unmodified apps• foreground VP switches like an app

Transparent Virtualization

14

LinuxKernel

•••

VP 3VP 2VP 1

EvaluationOverview Graphics Cell Radio DemoMotivation Architecture

Single Kernel: Multiple VPs

virtualize at OS interface

isolated collectionof processes

15

LinuxKernel

•••

EvaluationOverview Graphics Cell Radio DemoMotivation Architecture

Single Kernel: Device Support

all VPs access the same device simultaneouslyPower

Cell Radio

Binder IPC

Accelerometer

Compasspmem

speakerscamera(s)

hw codec

RTC / Alarms

VP 3VP 2VP 1

Buttons

WiFi

GPS

FramebufferGPU

Touchscreen

microphone headset

•••

Sens

ors

Inpu

t

And

roid

...

Aud

io/V

ideo

16

LinuxKernel

Pow

er

WiF

i

Cell

Radi

o

Fram

ebuf

fer

GPU

RTC

/ A

larm

s

•••

Sens

ors

Inpu

t

And

roid

...

Aud

io/V

ideo

•••

EvaluationOverview Graphics Cell Radio DemoMotivation Architecture

Device Namespaces

safely, correctly multiplex access

to devices

17

device namespaces

VP 3VP 2VP 1

•••

LinuxKernel

Pow

er

WiF

i

Cell

Radi

o

Fram

ebuf

fer

GPU

RTC

/ A

larm

s

•••

Sens

ors

Inpu

t

And

roid

...

Aud

io/V

ideo

EvaluationOverview Graphics Cell Radio DemoMotivation Architecture

Cells

18

VP 3VP 2VP 1

+device namespaces

foreground / background

device namespacesComplete, Efficient, TransparentMobile Virtualization

=

LinuxKernel

Pow

er

WiF

i

Cell

Radi

o

Fram

ebuf

fer

GPU

RTC

/ A

larm

s

•••

Sens

ors

Inpu

t

And

roid

...

Aud

io/V

ideo

GPU

Fram

ebuf

fer

19

device namespaces

EvaluationOverview Graphics Cell Radio DemoMotivation Architecture

Cell

Radi

o

efficient basic graphics virtualization

hardware accelerated graphics

proprietary/closed interface

virtual addressesphysical addresses

EvaluationOverview Graphics Cell Radio DemoMotivation Architecture

screen memory

Approach 1: Single Assignment

20

GPU

Framebuffer

Framebuffer virtual state

EvaluationOverview Graphics Cell Radio DemoMotivation Architecture

screen memory

Approach 2: Emulated Hardware

21

emulated framebuffer

virtual addressesphysical addresses

mux_fb

screen memory

EvaluationOverview Graphics Cell Radio DemoMotivation Architecture

VP 3

backgroundmux_fb presentsidentical deviceinterface to all VPsusing device namespaces

swap virt addr mappings:point to different phys addr

Cells: Device Namespaces

22

VP 1

Framebuffer

VP 2

backgroundforeground

screen memory

EvaluationOverview Graphics Cell Radio DemoMotivation Architecture

Accelerated Graphics

MMU

context

VP 2

OpenGL

VP 1

context

OpenGL OpenGL

context

VP 3

graphics virtual addressesphysical addresses

23

Framebuffer

GPU

VP: just a setof processes!

process isolation

GPUMMU graphics virtual addresses

physical addresses

screen memory

EvaluationOverview Graphics Cell Radio DemoMotivation Architecture

Device Namespace + Graphics Context

context

VP 2

OpenGL

VP 1

context

OpenGL OpenGL

context

VP 3

background

24

foreground background

LinuxKernel

EvaluationOverview Graphics Cell Radio DemoMotivation Architecture

Drivers

Baseband: GSM / CDMA

RilD

VoIP?

VoIP VoIPVendor RIL

25

LinuxKernel

EvaluationOverview Graphics Cell Radio DemoMotivation Architecture

GSM/CDMA

RilD

Dual-SIM?

Vendor RIL

26

GSM / CDMA

Drivers Drivers

RilD

Vendor RIL

Root Namespace

LinuxKernel

vendor API

EvaluationOverview Graphics Cell Radio DemoMotivation Architecture

Drivers

Baseband: GSM / CDMA

Cells RIL

RilD

VP 2

Cells RIL

RilD

VP 1

RilD

Cells RIL

VP 3Cells: User-Level Namespace Proxy

backgroundbackgroundforeground

Vendor RIL

proprietary hardware/software requires a well-defined interface.

27

CellD

EvaluationOverview Graphics Cell Radio DemoMotivation Architecture

Experimental ResultsSetup

• Nexus S• five virtual phones

• overhead vs. stock 〈Android 2.3〉

28

EvaluationOverview Graphics Cell Radio DemoMotivation Architecture

Experimental ResultsSetup

• CPU 〈Linpack〉

• graphics 〈Neocore〉

• storage 〈Quadrant〉

• web browsing 〈Sun Spider〉

• networking 〈Custom WiFi Test〉

29

Runtime Overhead

0.00!

0.20!

0.40!

0.60!

0.80!

1.00!

1.20!

1.40!

Linpack NeoCore Quadrant I/O

Sun Spider

Network

1-VP! 2-VP! 3-VP! 4-VP! 5-VP!Negligible

Overhead In 3D Measurements!

EvaluationOverview Graphics Cell Radio DemoMotivation Architecture

Experimental Results

30

Demo

EvaluationOverview Graphics Cell Radio DemoMotivation Architecture

31

EvaluationOverview Graphics Cell Radio DemoMotivation Architecture

• device namespaces‣ safely and efficiently share devices

• foreground / background‣ designed specifically for mobile devices

• implemented on Android• less than 2% overhead on Nexus S

CellsComplete, Efficient, Transparent

Mobile Virtualization

32

top related