cellular networks and mobile computing coms 6998- 10, spring 2013

Download Cellular Networks and Mobile Computing COMS 6998- 10, Spring 2013

Post on 25-Feb-2016

22 views

Category:

Documents

1 download

Embed Size (px)

DESCRIPTION

Cellular Networks and Mobile Computing COMS 6998- 10, Spring 2013. Instructor: Li Erran Li ( lierranli@cs.columbia.edu ) http://www.cs.columbia.edu/ ~lierranli/coms6998- 10Spring2013/ 2 /19/2013: Smart phone virtualization and storage. Clarification on wakelock. Not mutual-exclusion lock! - PowerPoint PPT Presentation

TRANSCRIPT

Narrowing the Beam: Lowering Complexity in Cellular Networks by Scaling Up

Cellular Networks and Mobile ComputingCOMS 6998-10, Spring 2013Instructor: Li Erran Li (lierranli@cs.columbia.edu)http://www.cs.columbia.edu/~lierranli/coms6998-10Spring2013/2/19/2013: Smart phone virtualization and storage1Clarification on wakelockNot mutual-exclusion lock!Non-reference counted (similar to conditional variable)acquire() wakes up the componentrelease() sets component free to sleep irrespective of number of acquire()Reference counted (similar to semaphore)acquire() increments internal counterrelease() decrements the counterComponent can sleep if internal counter reaches zer02/19/13Cellular Networks and Mobile Computing (COMS 6998-10)Review of Previous LectureWhat are the categories of ebugs?

2/19/13Cellular Networks and Mobile Computing (COMS 6998-10)Ebug TaxonomyEbugHardware23%Software35%External12%Unknown30%OSAppsNo Sleep BugLoop BugImmortality BugExternal ServiceNetwork Signal StrengthWireless HandoversCourtesy: Pathak et al4Cellular Networks and Mobile Computing (COMS 6998-10)2/12/13Review of Previous Lecture (Contd)What are the types of no-sleep ebugs?How to detect no-sleep ebugs?

2/19/13Cellular Networks and Mobile Computing (COMS 6998-10)Types of NoSleep Bugs and Detection6NoSleep Race ConditionsNoSleep Code PathsNoSleep DilationsCellular Networks and Mobile Computing (COMS 6998-10)Courtesy: Jindal et al2/12/13Static Data Flow AnalysisReaching Definitions Data Flow Problem6Review of Previous Lecture (Contd)How to build fine-grained power models?

2/19/13Cellular Networks and Mobile Computing (COMS 6998-10)Finite-State-Machine (FSM) as Power Model RepresentationUse Finite-State-Machine (FSM)Nodes: Power states Base State: No activity on phoneProductive state: Actual utilizationTail state: No-useful workEdges: Transition rulesSystem calls (start/completion)Workload (Ex: 50 pkts/sec)Timeout

State 1State 2State 3TransitionsCourtesy: Pathak et al8Cellular Networks and Mobile Computing (COMS 6998-10)2/12/138FSM Power Model ConstructionSystematic Brute Force ApproachStep 1 : Model Single System Call

Step 2 : Model Multiple System Calls for Same Component

Step 3 : Model Multiple Components (Entire Phone)

Requires domain knowledgeSemantics of system callsCourtesy: Pathak et al9Cellular Networks and Mobile Computing (COMS 6998-10)2/12/139Review of Previous Lecture (Contd)How to build an energy profiling tool such as Eprof?

2/19/13Cellular Networks and Mobile Computing (COMS 6998-10)Energy ProfilingTracking power activitiesSystem call based online power model

Tracking app activitiesIO: Backtrace system callsCPU: Just like gprof [PLDI 82]

Mapping power activities to app activitiesAccounting Policy: Lingering Energy Consumption11

Cellular Networks and Mobile Computing (COMS 6998-10)Courtesy: Pathak et al2/12/13Smart Phone Virtualization: on Servers/PCsBluestacks (Demo)MegaDroidOff-the-shelf PCs emulates a town of 300,000 Android phones Emulate cellular and GPS behaviorUsage: Tracing the wider effects of natural disastersHacking attemptsSoftware bugsAssist real phone (e.g. offload computation, virus check)Video: http://www.engadget.com/2012/10/03/sandia-labs-megadroid-project-simulates-300-000-android-phones/2/19/13Cellular Networks and Mobile Computing (COMS 6998-10)

Smart Phone Virtualization: on DevicesCells video: http://www.youtube.com/watch?v=i_F92AS9a6s

2/19/13Cellular Networks and Mobile Computing (COMS 6998-10)

Personal Phone

Business Phone

Developer Phone

Childrens Phone2/19/13Cellular Networks and Mobile Computing (COMS 6998-10)Courtesy: Jason Nieh et al.

Virtualization2/19/13Cellular Networks and Mobile Computing (COMS 6998-10)Courtesy: Jason Nieh et al.Bare-Metal HypervisorOSKernelOSKernelOSKernel

Hypervisor / VMMHardwareServer Virtualizationpoor device support / sharing2/19/13Cellular Networks and Mobile Computing (COMS 6998-10)Courtesy: Jason Nieh et al.OSOSHost OS KernelOSHypervisor / VMM

Hosted HypervisorDesktop VirtualizationkernelmoduleHardware

host user spacepoor device performanceemulateddevices2/19/13Cellular Networks and Mobile Computing (COMS 6998-10)Courtesy: Jason Nieh et al.OS KernelUser Space SDKNon-Virtualization

no standard appsless securecustom user space API for isolated appsHardware

2/19/13Cellular Networks and Mobile Computing (COMS 6998-10)Courtesy: Jason Nieh et al.

device diversity

mobile usage modelgraphics-accelerated UIKey ChallengesPowerButtonsWiFiGPSCell RadioFramebufferGPUBinder IPCTouchscreenAccelerometerCompasspmemmicrophoneheadsetspeakerscamera(s)h.264 accel.

RTC / Alarms2/19/13Cellular Networks and Mobile Computing (COMS 6998-10)Courtesy: Jason Nieh et al.CellsmicrophoneKey Observation

large: lots of windows/appssmall:one app at a time

2/19/13Cellular Networks and Mobile Computing (COMS 6998-10)Courtesy: Jason Nieh et al.CellsmicrophoneKey Observationscreen real-estate is limited, and mobile phone users are accustomed to interacting with one thing at time2/19/13Cellular Networks and Mobile Computing (COMS 6998-10)Courtesy: Jason Nieh et al.CellsmicrophoneUsage Modelforeground/ background2/19/13Cellular Networks and Mobile Computing (COMS 6998-10)Courtesy: Jason Nieh et al.Cellsmicrophonemultiple, isolated virtual phones (VPs) on a single mobile device100% device support in each VPunique phone numbers - single SIM!accelerated 3D graphics!Complete Virtualization2/19/13Cellular Networks and Mobile Computing (COMS 6998-10)Courtesy: Jason Nieh et al.Cellsmicrophoneless than 2% overhead in runtime testsimperceptible switch time among VPsEfficient Virtualization2/19/13Cellular Networks and Mobile Computing (COMS 6998-10)Courtesy: Jason Nieh et al.LinuxKernel

VP 3

VP 2

VP 1

Single Kernel: Multiple VPsvirtualize at OS interfaceisolated collectionof processes2/19/13Cellular Networks and Mobile Computing (COMS 6998-10)Courtesy: Jason Nieh et al.LinuxKernelSingle Kernel: Device SupportPowerCell RadioBinder IPCAccelerometerCompasspmemspeakerscamera(s)hw codecRTC / AlarmsVP 3

VP 2

VP 1

ButtonsWiFiGPSFramebufferGPUTouchscreenmicrophoneheadset

2/19/13Cellular Networks and Mobile Computing (COMS 6998-10)Courtesy: Jason Nieh et al.LinuxKernelSingle Kernel: Device Supportall VPs access the same device simultaneouslyVP 3

VP 2

VP 1

SensorsInputAndroid...Audio/Video

RTC / AlarmsWiFiCell RadioFramebufferPowerGPU2/19/13Cellular Networks and Mobile Computing (COMS 6998-10)Courtesy: Jason Nieh et al.LinuxKernelPowerWiFiCell RadioFramebufferGPURTC / AlarmsSensorsInputAndroid...Audio/VideoDevice Namespacessafely, correctly multiplex access to devices

device namespacesVP 3

VP 2

VP 1

2/19/13Cellular Networks and Mobile Computing (COMS 6998-10)Courtesy: Jason Nieh et al.Cells2/19/13Cellular Networks and Mobile Computing (COMS 6998-10)+device namespacesforeground/ background=Complete, Efficient, TransparentMobile VirtualizationCourtesy: Jason Nieh et al.LinuxKernel

PowerWiFiCell RadioFramebufferGPURTC / AlarmsSensorsInputAndroid...Audio/VideoGPUFramebufferdevice namespacesCell Radioefficient basic graphics virtualizationhardware accelerated graphicsproprietary/closed interface2/19/13Cellular Networks and Mobile Computing (COMS 6998-10)Courtesy: Jason Nieh et al.

virtual addressesphysical addressesscreen memoryApproach 1: Single Assignment

Framebuffer2/19/13Cellular Networks and Mobile Computing (COMS 6998-10)Courtesy: Jason Nieh et al.Framebuffervirtual state

screen memoryApproach 2: Emulated Hardware

emulated framebuffer

2/19/13Cellular Networks and Mobile Computing (COMS 6998-10)Courtesy: Jason Nieh et al.virtual addressesphysical addressesmux_fb

screen memory

VP 3

backgroundmux_fb presentsidentical deviceinterface to all VPsusing device namespacesswap virt addr mappings:point to different phys addr

Cells: Device NamespacesVP 1

FramebufferVP 2

backgroundforeground2/19/13Cellular Networks and Mobile Computing (COMS 6998-10)Courtesy: Jason Nieh et al.

screen memoryAccelerated GraphicsMMUcontextVP 2

OpenGLVP 1

contextOpenGLOpenGLcontextVP 3

graphics virtual addressesphysical addressesFramebufferGPUVP: just a setof processes!process isolation2/19/13Cellular Networks and Mobile Computing (COMS 6998-10)Courtesy: Jason Nieh et al.

GPUMMUgraphics virtual addressesphysical addresses

screen memoryDevice Namespace + Graphics ContextcontextVP 2

OpenGLVP 1

contextOpenGLOpenGLcontextVP 3

background

foregroundbackground2/19/13Cellular Networks and Mobile Computing (COMS 6998-10)Courtesy: Jason Nieh et al.2/19/13Cellular Networks and Mobile Computing (COMS 6998-10)LinuxKernelDriversBaseband: GSM / CDMARilDVendor RIL

VoIPVoIPVoIP?Courtesy: Jason Nieh et al.LinuxKernelGSM/CDMARilDDual-SIM?Vendor RIL

GSM / CDMADriversDriversRilDVendor RIL2/19/13Cellular Networks and Mobile Computing (COMS 6998-10)Courtesy: Jason Nieh et al.Root NamespaceLinuxKernelvendor APIDriversBaseband: GSM / CDMACells RILRilDVP 2

Cells RILRilDVP 1

RilDCells RILVP 3

Cells: User-Level Namespace ProxybackgroundbackgroundforegroundVendor RILproprietary hardware/software requires a well-defined interface.CellD2/19/13Cellular Networks and Mobile Computing (COMS 6998-10)Courtesy: Jason Nieh et al.Experimental ResultsSetupNexus Sfive virtual phonesoverhead vs. stock Android 2.3

2/19/13Cellular Networks and Mobile Computing (COMS 6998-10)Courtesy: Jason Nieh et al.Experimental ResultsSetupCPU Linpackgraphics Neocorestorage Quadrantweb browsing Sun Spidernetworking Custom WiFi Test2/19/13C

Recommended

View more >