27
Smartphones as distributed system with extreme heterogeneity Lin Zhong Rice Efficient Computing Group (recg.org) Dept. of Electrical & Computer Engineering Rice University

Smartphones as distributed system with extreme heterogeneity

  • Upload
    maris

  • View
    15

  • Download
    0

Embed Size (px)

DESCRIPTION

Smartphones as distributed system with extreme heterogeneity . Lin Zhong Rice Efficient Computing Group (recg.org) Dept. of Electrical & Computer Engineering Rice University. Today’s smartphone. Application processor. rackspace. Heterogeneous multiprocessor. Application processor. - PowerPoint PPT Presentation

Citation preview

Page 1: Smartphones  as distributed  system with extreme heterogeneity

Smartphones as distributed system with extreme heterogeneity

Lin ZhongRice Efficient Computing Group (recg.org)

Dept. of Electrical & Computer EngineeringRice University

Page 2: Smartphones  as distributed  system with extreme heterogeneity

Today’s smartphone

2

Application processor

Page 3: Smartphones  as distributed  system with extreme heterogeneity

rackspace

Page 4: Smartphones  as distributed  system with extreme heterogeneity

4

Heterogeneous multiprocessor

Application processor

µ-controller

Turducken-like systems

Page 5: Smartphones  as distributed  system with extreme heterogeneity

5

Heterogeneous body-area network

Page 6: Smartphones  as distributed  system with extreme heterogeneity

Smartphone 2020

6

Application processor

µ-controller

µ-controller

µ-controller

Cloud processor

Cloud processor

Cloud processor

Cloud processor

Cloud processor

Cloud processor

Cloud processor

Page 7: Smartphones  as distributed  system with extreme heterogeneity

Challenges to programming

• Resource disparity– ISA disparity

7

Application processor

µ-controller

µ-controller

µ-controller

Cloud processor

Cloud processor

Cloud processor

Cloud processor

Cloud processor

Cloud processor

Cloud processor

Page 8: Smartphones  as distributed  system with extreme heterogeneity

Challenges to programming

• Resource limitation on “small” processors– Virtual machine and coherent memory difficult

8

Application processor

µ-controller

µ-controller

µ-controller

Cloud processor

Cloud processor

Cloud processor

Cloud processor

Cloud processor

Cloud processor

Cloud processor

Page 9: Smartphones  as distributed  system with extreme heterogeneity

Challenges to programming

• Separation of hardware vendors, application developers, and users– Developer blind of external computing resources and runtime context

9

Application processor

µ-controller

µ-controller

µ-controller

Cloud processor

Cloud processor

Cloud processor

Cloud processor

Cloud processor

Cloud processor

Cloud processor

Page 10: Smartphones  as distributed  system with extreme heterogeneity

Challenges to programming

• Established programming model and OS

10

Application processor

µ-controller

µ-controller

µ-controller

Cloud processor

Cloud processor

Cloud processor

Cloud processor

Cloud processor

Cloud processor

Cloud processor

Page 11: Smartphones  as distributed  system with extreme heterogeneity

Existing solutions

11

Complete transparency No transparency

Single ISA

Prohibitively expensive High burden on application developers

Virtual machine

Turducken-like cohort systems

Offloading systems (active disk, Hydra etc.)

CPU+GPU systems

mPlatform etc.

Page 12: Smartphones  as distributed  system with extreme heterogeneity

Reflex: Transparent programming of heterogeneous mobile systems

http://reflex.recg.rice.edu/

Inspired by the heterogeneous distributed nervous system

Page 13: Smartphones  as distributed  system with extreme heterogeneity

Enough transparency

13

ReflexSingle ISA Turducken-like

cohort systems

Offloading systems (active disk, Hydra etc.)Virtual machine

CPU+GPU systems

Complete transparency No transparency

• Ease of programming• Execution efficiency

mPlatform etc.

Page 14: Smartphones  as distributed  system with extreme heterogeneity

Key ideas

• Light weight virtualization of sensor data acquisition, timer, and memory management

14

Application processor

µ-controller

µ-controller

µ-controller

Cloud processor

Cloud processor

Cloud processor

Cloud processor

Cloud processor

Cloud processor

Cloud processor

Page 15: Smartphones  as distributed  system with extreme heterogeneity

Key ideas

• Distributed runtime for transparent message passing

15

Application processor

µ-controller

µ-controller

µ-controller

Cloud processor

Cloud processor

Cloud processor

Cloud processor

Cloud processor

Cloud processor

Cloud processor

Reflex runtime

Reflex runtime

Reflex runtime

Reflex runtime

Reflex runtime

Page 16: Smartphones  as distributed  system with extreme heterogeneity

Key ideas

• Automatic code partition through a collaboration between runtime and compiler

16

Application processor

µ-controller

µ-controller

µ-controller

Cloud processor

Cloud processor

Cloud processor

Cloud processor

Cloud processor

Cloud processor

Cloud processor

Reflex runtime

Reflex runtime

Reflex runtime

Reflex runtime

Reflex runtime

Page 17: Smartphones  as distributed  system with extreme heterogeneity

Key ideas

• Identify a small coherent memory segment – Maintain by message passing through the runtime

17

Application processor

µ-controller

µ-controller

µ-controller

Cloud processor

Cloud processor

Cloud processor

Cloud processor

Cloud processor

Cloud processor

Cloud processor

Reflex runtime

Reflex runtime

Reflex runtime

Reflex runtime

Reflex runtime

Page 18: Smartphones  as distributed  system with extreme heterogeneity

Key ideas

• Type safety for dynamic process migration

18

Application processor

µ-controller

µ-controller

µ-controller

Cloud processor

Cloud processor

Cloud processor

Cloud processor

Cloud processor

Cloud processor

Cloud processor

Reflex runtime

Reflex runtime

Reflex runtime

Reflex runtime

Reflex runtime

Page 19: Smartphones  as distributed  system with extreme heterogeneity

19

Reflex Prototype (board integration)

• Programmable accelerometer (TI MSP430)• Wired sensor through UART port

Rice Orbit Sensor

Nokia N810

Serial connection

Page 20: Smartphones  as distributed  system with extreme heterogeneity

Fall detection with N810

Average Power 100mW

20mW

Legacy Reflex

The secret: we do not fall very often

20

Page 21: Smartphones  as distributed  system with extreme heterogeneity

Coded as part of Smartphone program

21

class SenseletFall : public SenseletBase {public: SenseletFall () { _avg_energy = 0; }; void OnCreate() { RegisterSensorData(ACCEL, 50); };

void OnData(uint8_t *readings, uint16_t len) { uint16_t energy = readings[0]*readings[0] + \ readings[1]*readings[1] + \ readings[2]*readings[2]; //do a simple low-pass filtering _avg_energy = _avg_energy / 2 + energy / 2; // detect fall accident with the filtered energy if (_avg_energy > THRESHOLD) { theMainBody.FallAlert(); //RMI } }

void OnDestroy() { UnRegisterSensorData(ACCEL); };

private: uint16_t _avg_energy; };

Page 22: Smartphones  as distributed  system with extreme heterogeneity

22

Page 23: Smartphones  as distributed  system with extreme heterogeneity

Even accelerometer is power-hungry!

2mW

90mW

7mW

Nokia N90023

200mW

Standby Accelerometer Read Read & simple calculation

Page 24: Smartphones  as distributed  system with extreme heterogeneity

Energy-proportional computing

• Energy consumption = a × Work24

Work per unit time, e.g. CPU utilization and bandwidth utilization

Ideal: Power

Page 25: Smartphones  as distributed  system with extreme heterogeneity

Cruel reality: disproportionality

• Energy = f (Work) + C25

Work per unit time, e.g. CPU utilization and bandwidth utilization

Ideal: Power Power

Page 26: Smartphones  as distributed  system with extreme heterogeneity

Cruel reality: disproportionality

• Energy = f (Work) + C26

Work per unit time, e.g. CPU utilization and bandwidth utilization

Ideal: Power Ideal: Energy per workPower Energy per work

Page 27: Smartphones  as distributed  system with extreme heterogeneity

Ongoing work

• Automatic code partition

• Global variables/memory to a small coherent shared memory

• Message passing to maintain the coherency

27