
Optimizing Code Offloading in Mobile Cloud Environments
"Explore the concept of code offloading with least context migration in the mobile cloud, focusing on system design, technical details, and evaluation. Discover challenges and solutions for offloading in mobile computing scenarios. Dive into various offloading methods and their implications. Delve into the complexities of offloading decisions, system frameworks, and application contexts in the context of mobile cloud computing. Understand the trade-offs and benefits of offloading computations from mobile devices to remote servers." (296 characters)
Download Presentation

Please find below an Image/Link to download the presentation.
The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.
You are allowed to download the files provided on this website for personal or commercial use, subject to the condition that they are used lawfully. All files are the property of their respective owners.
The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.
E N D
Presentation Transcript
Code Offload with Least Context Migration in the Mobile Cloud Yong Li and Wei Gao The University of Tennessee, Knoxville IEEE INFOCOM 2015
Outline Introduction Motivation and related works System design Technical details Evaluation IEEE INFOCOM 2015
Outline Introduction Motivation and related works System design Technical details Evaluation IEEE INFOCOM 2015
Cloud Computing for Mobile Devices Contradiction between limited battery and complex mobile applications Mobile Cloud Computing (MCC) Offloading local computations to remote execution IEEE INFOCOM 2015
General Problems for Offloading What to offload Developers annotation, such as MAUI, ThinkAir Online profiling, such as Odessa, COMET How to offload (Our Focus) Wrap the offloading method as RPC, like MAUI VM synthesis, like CloneCloud, COMET IEEE INFOCOM 2015
Outline Introduction Motivation and related works System design Technical details Evaluation IEEE INFOCOM 2015
Existing Work Restrict to a specific set of system frameworks and mobile applications Unable to support existing mobile applications without modification, like MAUI and ThinkAir Migrate a large amount of application contexts Unnecessary contexts have been sent, like CloneCloud and COMET Wireless communication is expensive! IEEE INFOCOM 2015
Motivation Only part of memory contexts are necessary. 1 class Sample extends Activity { 2 public void calculate() { 3 TestObject[] objs = new TestObject[5]; 4 TestObject[] subobjs = new TestSubObject[4]; 5 int result = bar(objs[0], subobjs[1]); 6 } Heap Thread Stack Frame 0 1 2 3 4 Program Counter Method:calculate Reg: objs Reg: subObjs 0 1 2 3 7 int bar(TestObject to1, TestObject to2) { 8 String val; 9 if(TestObject.si > 3) 10 val = to1.getS(); 11 else val = to2.getS(); 12 return TestObject.si++; 13 }} Reg: this obj0 subObj1 Stack Frame Program Counter Method:bar Reg: val Sample 14 class TestObject { 15 static int si = 5; String str = "str"; 16 public String getS() { return str; } 17 } Reg: this Reg: to1 Reg: to2 18 class TestSubObject extends TestObject { 19 double num = 3.2; String substr = "substr"; 20 public String getS() { return substr; } 21 } Reg = Local variables & Parameters IEEE INFOCOM 2015
Motivation Only part of memory contexts are necessary. IEEE INFOCOM 2015
Outline Introduction Motivation and related works System design Technical details Evaluation IEEE INFOCOM 2015
Insights Integrate with Android OS Support existing application without modification Automatic method offloading in Dalvik VM Migrate least but sufficient memory context Offline parsing to identify relevant memory context for a method Utilize parsing result metadata to screen memory contexts during run-time execution IEEE INFOCOM 2015
System Design Components: Offline parsing - identify the relevant contexts Run-time migration handle offloading process Offline Parsing Mobile Cloud 1. Parsing req Application Installer Method Argument Parsing Component Class Static Field Parsing Component Application Method Metadata 2. Send back Method Metadata APK 3. load Dalvik Virtual Machine Dalvik Virtual Machine Thread 1 Thread 2 Thread 1 4. Migrate to cloud 5. Context load & execute Calculate() ... bar() Heap Calculate() Heap 6. Migrate back TCPMUX Communicate TCPMUX IEEE INFOCOM 2015 Run-time Migration
Outline Introduction Motivation and related works System design Technical details Evaluation IEEE INFOCOM 2015
Input data sources for method Two input data sources for a method: Method arguments Class static fields this IEEE INFOCOM 2015
Offline Parsing Components Method Argument Parsing Component To determine which fields in the input arguments may be accessed during method execution. Go through all the possible execution paths Emulate the instruction effects to find out the accessing field of an object Class Static Field Parsing Component To find out which class and its static fields may be operated by a method. Parse only the static field access instructions IEEE INFOCOM 2015
Method Argument Parsing Component Go through all the possible execution paths bar() Control statements TestObject.si <=3 >3 to1.getS() to2.getS() TestSubObject .getS() TestObject .getS() TestObject .getS() TestSubObject .getS() return return return return Polymorphism IEEE INFOCOM 2015
Method Argument Parsing Component Emulate the instruction effects to find out the accessing field of an object public String getS() { return str; } iget-object v0, v1, LTestObject;.str v0 Object Manipulation (Read): v1 put str to v0 to1: str num substr IEEE INFOCOM 2015
Class Static Field Parsing Component Identify relevant class static field Parsing instructions manipulating class static field Not considering execution paths if (TestObject.si > 3) sget v1, LTestObject;.si v1 put si to v1 si TestObject: IEEE INFOCOM 2015
Metadata Maintenance Java object can be organized as a tree-based structure Record Parsing result by breadth-first traversal of the object trees IEEE INFOCOM 2015
Run-time Migration Component 1. Method Invocation Tracking Cloud Mobile Dalvik Virtual Machine Dalvik Virtual Machine 2. Context Migration to the Cloud Thread 1 Thread 1 3. Context Reload on the Cloud Calculate() bar() Calculate() Heap Heap 4. Context Migration Back to Local Device IEEE INFOCOM 2015
Context Migration to the Cloud Offline parsing result metadata Dirty flag for every memory object by DSM Mobile Heap Context Cloud Heap Context Migrate str str num substr str to1: to1: str Migrate substr str num substr str num substr to2: str num substr to2: Migrate si si si TestObject: si TestObject: Migrate si back IEEE INFOCOM 2015
Outline Introduction Motivation and related works System design Technical details Evaluation IEEE INFOCOM 2015
Performance Evaluations Evaluation metrics: Method execution time Amount of energy saved Amount of data transmission Comparison with existing work: For some experiments, we compare our system with COMET on data transmission and overhead IEEE INFOCOM 2015
Evaluation Setup Evaluation against real Android mobile apps Metro trip planner, Poker assistant, Sudoku game Offloading decision Same as COMET - History average execution time over a threshold Experiments 30 times with different input datasets for each application IEEE INFOCOM 2015
Offloading Effectiveness 5 times speed up 40% energy saved IEEE INFOCOM 2015
Offloading Effectiveness Amount of data transmission during workload offloading Reduce 40% of data transmission for the first time offloading Reduce 70% of data transmission after first time offloading IEEE INFOCOM 2015
Parsing complexity By reducing the nested branching depth, we can reduce the parse time significantly without affecting too much parsing method coverage IEEE INFOCOM 2015
Offloading Overhead Measured as average amount of time spent on collecting the memory contexts to be migrated Slightly less overhead IEEE INFOCOM 2015
Thank you! Questions? The paper and slides are also available at: http://web.eecs.utk.edu/~weigao IEEE INFOCOM 2015