Cellular Networks and Mobile Computing COMS 6998-7, Spring 2014

Download Cellular Networks and Mobile Computing COMS 6998-7, Spring 2014

Post on 25-Feb-2016

40 views

Category:

Documents

1 download

Embed Size (px)

DESCRIPTION

Cellular Networks and Mobile Computing COMS 6998-7, Spring 2014. Instructor: Li Erran Li ( lierranli@cs.columbia.edu ) http://www.cs.columbia.edu/~lierranli/coms6998-7Spring2014/ 2 / 24 / 2014: Smart phone virtualization and storage. Announcements. - PowerPoint PPT Presentation

TRANSCRIPT

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

Cellular Networks and Mobile ComputingCOMS 6998-7, Spring 2014Instructor: Li Erran Li (lierranli@cs.columbia.edu)http://www.cs.columbia.edu/~lierranli/coms6998-7Spring2014/2/24/2014: Smart phone virtualization and storage

1AnnouncementsMarch 3: lab session on iOS and HW3 by WilliamMarch 7: lecture 6HW2: due on March 52/19/13Cellular Networks and Mobile Computing (COMS 6998-10)OutlineAnnouncementsReview of Previous LectureVirtualizationAndroid Virtualization on X86 Servers (TODO)Android Virtualization on Mobile DeviceRunning iOS apps on Android DeviceARM/KVM VirtualizationStorage 2/19/13Cellular Networks and Mobile Computing (COMS 6998-10)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 zero2/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 al6Cellular 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 Detection8NoSleep Race ConditionsNoSleep Code PathsNoSleep DilationsCellular Networks and Mobile Computing (COMS 6998-10)Courtesy: Jindal et al2/12/13Static Data Flow AnalysisReaching Definitions Data Flow Problem8Review 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 al10Cellular Networks and Mobile Computing (COMS 6998-10)2/12/1310FSM 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 al11Cellular Networks and Mobile Computing (COMS 6998-10)2/12/1311Review 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 Consumption13

Cellular Networks and Mobile Computing (COMS 6998-10)Courtesy: Pathak et al2/12/13OutlineAnnouncementsReview of Previous LectureVirtualizationAndroid Virtualization on X86 Servers (TODO)Android Virtualization on Mobile DeviceRunning iOS apps on Android DeviceARM/KVM VirtualizationStorage 2/19/13Cellular Networks and Mobile Computing (COMS 6998-10)Smart 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)

OutlineAnnouncementsReview of Previous LectureVirtualizationAndroid Virtualization on X86 Servers (TODO)Android Virtualization on Mobile DeviceRunning iOS apps on Android DeviceARM/KVM VirtualizationStorage 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 / CD

Recommended

View more >