Перевод с английского
<<  Theory W Software Management На зоопарк фон  >>
Mobile Software Development Framework: Adaptive Mobile Applications
Mobile Software Development Framework: Adaptive Mobile Applications
Outline
Outline
Admin
Admin
Recap: Example Mobile Cloud Services
Recap: Example Mobile Cloud Services
Recap: Push Notification Service
Recap: Push Notification Service
Recap: Track Service
Recap: Track Service
API Usage: Ride-Sharing Application
API Usage: Ride-Sharing Application
Outline
Outline
Storage/Sync Service
Storage/Sync Service
Storage/Sync Service Example: iCloud
Storage/Sync Service Example: iCloud
Problems Caused by Mobile Storage
Problems Caused by Mobile Storage
Approaches
Approaches
Amazon Silk Split-Browser
Amazon Silk Split-Browser
Outline
Outline
Adaptive Mobile App: Bigger Picture
Adaptive Mobile App: Bigger Picture
Outline
Outline
Example: iphone 5
Example: iphone 5
CPU Power Consumption Model
CPU Power Consumption Model
CPU Power Model
CPU Power Model
Dynamic Voltage Scaling
Dynamic Voltage Scaling
Architecture
Architecture
Demand Prediction
Demand Prediction
Observations
Observations
CPU Resource Allocation
CPU Resource Allocation
How Fast to Run the CPU
How Fast to Run the CPU
Why Not Uniform Speed
Why Not Uniform Speed
Stochastic DVS
Stochastic DVS
Example Speed Schedule
Example Speed Schedule
DVS
DVS
Implementation
Implementation
Evaluation: Normalized Energy
Evaluation: Normalized Energy
Odyssey: An Example Client Architecture
Odyssey: An Example Client Architecture
Client System Model
Client System Model
Outline
Outline
Server/Content Adaptation: Examples
Server/Content Adaptation: Examples
Example: Adapting Audio Content
Example: Adapting Audio Content
Example: Adapting Fidelity of Video/Image Content
Example: Adapting Fidelity of Video/Image Content
Frame Encoding: Block Transform Encoding
Frame Encoding: Block Transform Encoding
Discrete Cosine Transform
Discrete Cosine Transform
Basis Functions of DCT
Basis Functions of DCT
Example: MPEG Block Encoding
Example: MPEG Block Encoding
Examples
Examples
Outline
Outline
Example Benefit of Cloud (RTT -> Server)
Example Benefit of Cloud (RTT -> Server)
Example: MAUI
Example: MAUI
How Does a Programmer Use MAUI
How Does a Programmer Use MAUI
MAUI Proxy
MAUI Proxy
MAUI Profiler
MAUI Profiler
MAUI Solver
MAUI Solver
Is Global Program Analysis Needed
Is Global Program Analysis Needed
Is Global Program Analysis Needed
Is Global Program Analysis Needed
Is Global Program Analysis Needed
Is Global Program Analysis Needed
MAUI Implementation
MAUI Implementation
Questions
Questions
How much can MAUI reduce energy consumption
How much can MAUI reduce energy consumption
How much can MAUI improve performance
How much can MAUI improve performance
Latency to server impacts the opportunities for fine-grained offload
Latency to server impacts the opportunities for fine-grained offload
Can MAUI Run Resource-Intensive Applications
Can MAUI Run Resource-Intensive Applications
Can MAUI Adapt to Changing Conditions
Can MAUI Adapt to Changing Conditions
Case 1
Case 1
Case 2
Case 2
Bayou Write Operation: An Example
Bayou Write Operation: An Example
Can MAUI Adapt to Changing Conditions
Can MAUI Adapt to Changing Conditions
Bayou Write Operation: An Example
Bayou Write Operation: An Example
Motivation
Motivation
LBFS: Low-Bandwidth File System
LBFS: Low-Bandwidth File System
Flexible Chunk Size
Flexible Chunk Size
Bayou: Managing Update Conflicts
Bayou: Managing Update Conflicts

Презентация: «Apple на wwdc 2012». Автор: Yang Richard Yang. Файл: «Apple на wwdc 2012.ppt». Размер zip-архива: 4756 КБ.

Apple на wwdc 2012

содержание презентации «Apple на wwdc 2012.ppt»
СлайдТекст
1 Mobile Software Development Framework: Adaptive Mobile Applications

Mobile Software Development Framework: Adaptive Mobile Applications

10/23/2012 Y. Richard Yang

1

2 Outline

Outline

Admin Mobile cloud services Push notification service Track service Storage service

2

3 Admin

Admin

HW3 Project ideas

3

4 Recap: Example Mobile Cloud Services

Recap: Example Mobile Cloud Services

Push notification service Location based service, e.g., Track service (supporting location based services) Storage services, e.g., iCloud, Google Drive, Dropbox Proxy service, e.g., Kindle Split Browser Recognition/synthesis services

4

5 Recap: Push Notification Service

Recap: Push Notification Service

A single persistent connection between Push Notification Service (PNS) and Mobile Device Authorization App register with PNS Device app registers with PNS and forwards registration to PNS App can send only to registrations Scalability, fault tolerance, generality Send only notification, does not hold data

5

6 Recap: Track Service

Recap: Track Service

Creation

TC MakeCollection(GroupCriteria criteria, bool removeDuplicates)

Manipulation

TC JoinTrackCollections (TC tCs[], bool removeDuplicates) TC SortTracks (TC tC, SortAttribute attr) TC TakeTracks(TC tC, int count) TC GetSimilarTracks (TC tC, Track refTrack, float simThreshold) TC GetPassByTracks (TC tC, Area[] areas) TC GetCommonSegments(TC tC, float freqThreshold)

6

7 API Usage: Ride-Sharing Application

API Usage: Ride-Sharing Application

// get user’s most popular track in the morning TC myTC = MakeCollection(“name = Maya”, [0800 1000], true); TC myPopTC = SortTracks(myTC, FREQ); Track track = GetTracks(myPopTC, 0, 1); // find tracks of all fellow employees TC msTC = MakeCollection(“name.Employer = MS”, [0800 1000], true); // pick tracks from the community most similar to user’s popular track TC similarTC = GetSimilarTracks(msTC, track, 0.8); Track[] similarTracks = GetTracks(similarTC, 0, 20); // Verify if each track is frequently traveled by its respective owner User[] result = FindOwnersOfFrequentTracks(similarTracks);

8 Outline

Outline

Admin and recap Mobile Cloud Services Push notification service Location based service Storage service

8

9 Storage/Sync Service

Storage/Sync Service

Store content in cloud to be accessible by multiple selected devices Deployed services, e.g., iCloud Google Drive https://developers.google.com/drive/integrate-android-ui DropBox

9

10 Storage/Sync Service Example: iCloud

Storage/Sync Service Example: iCloud

Backend Hosted by Windows Azure and Amazon AWS Uses HTTPS to send to servers Client storage models Key Value Store UIDocument Core data More details: see iCloud sessions https://developer.apple.com/videos/wwdc/2012/?id=209

10

11 Problems Caused by Mobile Storage

Problems Caused by Mobile Storage

Read miss stalls progress (user has to wait for data) Synchronization/consistency user may see outdated data user modification may generate conflicts

11

12 Approaches

Approaches

Read miss explicit user file selection automatic hoarding/prediction, e.g., CODA, SEER Synchronization/consistency keep modification logs and develop merge tools, e.g., Bayou efficient file comparisons and merging, e.g., rsync, LBFS

12

13 Amazon Silk Split-Browser

Amazon Silk Split-Browser

Dynamic split browsing Intelligently partition work between local and Amazon cloud

13

http://www.extremetech.com/mobile/97587-amazon-silk-bridging-the-gap-between-desktop-and-tablet-web-browsers

14 Outline

Outline

Admin and recap Adaptive mobile applications

14

15 Adaptive Mobile App: Bigger Picture

Adaptive Mobile App: Bigger Picture

in-net proxy

device

in-net service

On-device app/sys adaptation

Device-aware service delivery

Service partition

15

16 Outline

Outline

Admin and recap Adaptive mobile applications Client adaptation

16

17 Example: iphone 5

Example: iphone 5

http://www.anandtech.com/show/6324/the-iphone-5-performance-preview

17

18 CPU Power Consumption Model

CPU Power Consumption Model

The power consumption rate P of a CMOS processor satisfies where k is a constant, C the capacitance of the circuit, f the CPU frequency, and V the voltage When the supply voltage V is lower, charging/discharging time is longer; thus frequency should be lower => P ~ O(V3)

18

19 CPU Power Model

CPU Power Model

Discussion: what voltage to operate on?

throughput

19

20 Dynamic Voltage Scaling

Dynamic Voltage Scaling

Basic idea: determining voltage according to program response time requirement For normal applications, give reasonable response time For multimedia applications, use the deadline to determine voltage

20

21 Architecture

Architecture

multimedia applications

monitoring

requirements

scheduling

scheduler

profiler

speed adaptor

CPU

demand distribution

time constraint

speed scaling

21

22 Demand Prediction

Demand Prediction

Online profiling and estimation: count number of cycles used by each job

CDF F(x) = P [X ? x]

1

cumulative probability

Cmin=b0

br=Cmax

br-1

22

23 Observations

Observations

Demand distribution is stable or changes slowly

23

24 CPU Resource Allocation

CPU Resource Allocation

How many cycles to allocate to a multimedia job? Application should meet ? percent of deadlines ? each job meets deadline with probability ? ? allocate C cycles, such that F (C ) =P [X ? C ] ? ?

24

25 How Fast to Run the CPU

How Fast to Run the CPU

Assume the strategy is to run job i at a fix (also called uniform) speed Si Assume it needs Ci cycles during a time duration of Pi Fact: since power is a convex function of frequency, if a job needs C cycles in a period P, then the optimal frequency is C/P, namely the lowest constant frequency.

25

26 Why Not Uniform Speed

Why Not Uniform Speed

Intuitively, uniform speed achieves - minimum energy if use the allocated exactly However, jobs use cycles statistically - often complete before using up the allocated - potential to save more energy ? stochastic DVS

26

27 Stochastic DVS

Stochastic DVS

For each job find speed Sx for each allocated cycle x time is 1/Sx and energy is (1 - F(x))S3x

27

28 Example Speed Schedule

Example Speed Schedule

cycle: speed:

100 MHz

200 MHz

400 MHz

Observation: speed up the processor with increasing clock cycles

28

29 DVS

DVS

A1

A2

A1

context switch Store speed for switched-out New speed for switched-in

speed up within job

switch back

speed

execution

29

30 Implementation

Implementation

Hardware: HP N5470 laptop Athlon CPU (300, 500, 600, 700, 800, 1000MHz) round speed schedule to upper bound

system call

process control block

DVS modules PowerNow speed scaling Soft real-time scheduling

standard Linux scheduler

Extension to Linux kernel 2.4.18 716 lines of C code

30

31 Evaluation: Normalized Energy

Evaluation: Normalized Energy

Reduces power consumption However, limited due to few speed options

31

32 Odyssey: An Example Client Architecture

Odyssey: An Example Client Architecture

Application indicates resource capabilities in its request to service Operating system maintains/monitors available resources no need to have each application re-implement the monitoring An application registers a resource descriptor and an upcall event handler with the OS OS notifies the application upon detecting resource changes Application adjusts requests to the server

32

33 Client System Model

Client System Model

33

34 Outline

Outline

Admin and recap Adaptive mobile applications Client adaptation Server adaptation

34

35 Server/Content Adaptation: Examples

Server/Content Adaptation: Examples

Objective: automating adaptation

35

36 Example: Adapting Audio Content

Example: Adapting Audio Content

Send a lower resolution stream as the redundant information, e.g. nominal stream at 64 kbps and redundant stream at 13 kbps (such as GSM)

2

3

36

37 Example: Adapting Fidelity of Video/Image Content

Example: Adapting Fidelity of Video/Image Content

Potentially many dimensions frame rate (for video) image size quality of image Usage: e.g., data acceleration offered by many carriers

37

38 Frame Encoding: Block Transform Encoding

Frame Encoding: Block Transform Encoding

DCT

Quantize

Zig-zag

011010001011101...

38

39 Discrete Cosine Transform

Discrete Cosine Transform

? ?

4C(u)C(v)

(2j+1)up

(2k+1)vp

f(j,k) cos

cos

F[u,v] =

n2

2n

2n

where

1

for w=0

? 2

C(w) =

for w=1,2,…,n-1

1

DCT is better at reducing redundancy than Discrete Fourier Transform but it is more computationally expensive

n-1 n-1

j=0 k=0

39

40 Basis Functions of DCT

Basis Functions of DCT

An image is a superposition of basis functions DCT computes the contribution of each basis function - F[u,v]: for the basis function at position [u, v]

40

41 Example: MPEG Block Encoding

Example: MPEG Block Encoding

Quantize

DCT

original image

zigzag

run-length and Huffman encoding of the stream

10011011100011...

Discussion: how to generate different encoding rates?

DC component

AC components

coded bitstream < 10 bits (0.55 bits/pixel)

41

42 Examples

Examples

42

43 Outline

Outline

Admin and recap Adaptive mobile applications Client adaptation Server adaptation Proxy and job partition

43

44 Example Benefit of Cloud (RTT -> Server)

Example Benefit of Cloud (RTT -> Server)

44

45 Example: MAUI

Example: MAUI

Maui server

Smartphone

Application

Application

Maui Controller

45

46 How Does a Programmer Use MAUI

How Does a Programmer Use MAUI

Goal: make it dead-simple to MAUI-ify apps Build app as a standalone phone app Add .NET attributes to indicate “remoteable” Follow a simple set of rules

47 MAUI Proxy

MAUI Proxy

Maui server

Smartphone

Application

Application

Handles Errors

Maui Controller

48 MAUI Profiler

MAUI Profiler

Profiler

Annotated Callgraph

CPU Cycles

State size

Device Profile

Execution Time

Network Latency

Callgraph

Network Bandwidth

49 MAUI Solver

MAUI Solver

A sample callgraph

C 5000 mJ 3000 ms

10000 mJ

B 900 mJ 15ms

1000mJ

25000 mJ

D 15000 mJ 12000 ms

Energy and delay for state transfer

A

Computation energy and delay for execution

50 Is Global Program Analysis Needed

Is Global Program Analysis Needed

InitializeFace Recognizer 5000 mJ

10000 mJ

FindMatch 900 mJ

User Interface

1000mJ

25000 mJ

DetectAndExtract Faces 15000 mJ

Cheaper to do local

51 Is Global Program Analysis Needed

Is Global Program Analysis Needed

InitializeFace Recognizer 5000 mJ

10000 mJ

FindMatch 900 mJ

User Interface

1000mJ

25000 mJ

DetectAndExtract Faces 15000 mJ

Cheaper to do local

Cheaper to do local

52 Is Global Program Analysis Needed

Is Global Program Analysis Needed

20900mJ

InitializeFace Recognizer

User Interface

FindMatch

1000mJ

DetectAndExtract Faces

Cheaper to offload

53 MAUI Implementation

MAUI Implementation

Platform Windows Mobile 6.5 .NET Framework 3.5 HTC Fuze Smartphone Monsoon power monitor Applications Chess Face Recognition Arcade Game Voice-based translator

54 Questions

Questions

How much can MAUI reduce energy consumption? How much can MAUI improve performance? Can MAUI Run Resource-Intensive Applications?

55 How much can MAUI reduce energy consumption

How much can MAUI reduce energy consumption

Face Recognizer

Big savings even on 3G

An order of magnitude improvement on Wi-Fi

56 How much can MAUI improve performance

How much can MAUI improve performance

Face Recognizer

Improvement of around an order of magnitude

57 Latency to server impacts the opportunities for fine-grained offload

Latency to server impacts the opportunities for fine-grained offload

Arcade Game

Solver would decide not to offload

Up to 40% energy savings on Wi-Fi

58 Can MAUI Run Resource-Intensive Applications

Can MAUI Run Resource-Intensive Applications

Translator

Can be run on the phone with MAUI

CPU Intensive even on a Core 2 Duo PC

59 Can MAUI Adapt to Changing Conditions

Can MAUI Adapt to Changing Conditions

11KB + missiles

11KB + missiles

11KB + missiles

missiles

Required state is smaller

Complexity increases with # of missiles

*Missiles take around 60 bytes each

60 Case 1

Case 1

Zero Missiles Low latency (RTT < 10ms)

HandleEnemies

DoFrame

DoLevel

HandleBonuses

Offload starting at DoLevel

HandleMissiles

Computation cost is close to zero

*Missiles take around 60 bytes each

61 Case 2

Case 2

5 Missiles Some latency (RTT = 50ms)

HandleEnemies

DoFrame

DoLevel

HandleBonuses

Very expensive to offload everything

Little state to offload

HandleMissiles

Only offload Handle Missiles

Most of the computation cost

*Missiles take around 60 bytes each

62 Bayou Write Operation: An Example

Bayou Write Operation: An Example

62

63 Can MAUI Adapt to Changing Conditions

Can MAUI Adapt to Changing Conditions

Adapt to: Network Bandwidth/Latency Changes Variability on method’s computational requirements Experiment: Modified off the shelf arcade game application Physics Modeling (homing missiles) Evaluated under different latency settings

64 Bayou Write Operation: An Example

Bayou Write Operation: An Example

64

65 Motivation

Motivation

The CODA system assumes that modifications are kept as logs (CML) a user sends the logs to the servers to update If the storage of a client is limited, it may not be able to save logs then upon reconnection, the cache manager needs to find the difference between the stored file and its local cached copy same problem exists for the rsync tool ! Question: how to efficiently compare the differences of two remote files (when the network connection is slow)?

65

66 LBFS: Low-Bandwidth File System

LBFS: Low-Bandwidth File System

Break Files into chunks and transfer only modified chunks Fixed chunk size does not work well why?

66

67 Flexible Chunk Size

Flexible Chunk Size

Compute hash value of every 48 byte block if the hash value equals to a magic value, it is a chunk boundary

67

68 Bayou: Managing Update Conflicts

Bayou: Managing Update Conflicts

Basic idea: application specific conflict detection and update Two mechanisms for automatic conflict detection and resolution dependency check merge procedure

http://zoo.cs.yale.edu/classes/cs422/2011/bib/terry95managing.pdf

68

«Apple на wwdc 2012»
http://900igr.net/prezentacija/anglijskij-jazyk/apple-na-wwdc-2012-236709.html
cсылка на страницу
Урок

Английский язык

29 тем
Слайды