Are Mobile OS Ready for the Post-Smartphone Era? Felix Xiaozhu Lin - - PowerPoint PPT Presentation

are mobile os ready for the post smartphone era
SMART_READER_LITE
LIVE PREVIEW

Are Mobile OS Ready for the Post-Smartphone Era? Felix Xiaozhu Lin - - PowerPoint PPT Presentation

Are Mobile OS Ready for the Post-Smartphone Era? Felix Xiaozhu Lin Assistant Professor, Purdue ECE http://xsel.rocks In Collaboration with Prof. Feng Qian , Indiana University Sponsors: NSF and Google Post Smartphone Era


slide-1
SLIDE 1

Are Mobile OS Ready for the Post-Smartphone Era?

In Collaboration with Prof. Feng Qian, Indiana University Sponsors: NSF and Google Felix Xiaozhu Lin Assistant Professor, Purdue ECE http://xsel.rocks

slide-2
SLIDE 2

Post Smartphone Era

  • Smartphones have changed the

landscape of computing

  • More diverse devices are coming

– Wearables – IoT – AR/VR headsets

  • System software is lagging behind
slide-3
SLIDE 3

Top questions

  • Wearables should enjoy

– Baremetal performance – Baremetal efficiency

  • Commodity smart watches

– 80 million devices sold – How are they doing?

[MobiSys’16] “Understanding the Characteristics of Android Wear OS”, Renju Liu and Felix Xiaozhu Lin.

slide-4
SLIDE 4

A motivational case

  • The current performance & efficiency

are far from baremetal

  • Pacing – inefficient
  • face update: 400ms 88% busy

Clock face update

slide-5
SLIDE 5

A motivational case

  • The current performance & efficiency

are far from baremetal

  • Pacing – inefficient
  • face update: 400ms 88% busy
  • Racing – slow
  • Launch an in-mem app: 1 sec

Launch “settings”

slide-6
SLIDE 6

App UI shown User touch Launch action starts

What happens underneath?

810 ms 177 ms

slide-7
SLIDE 7

App UI shown User touch Launch action starts Power / mW

1000 500

What happens underneath?

810 ms 177 ms

slide-8
SLIDE 8

177 ms 810 ms Phase 1 Phase 2

Idle Busy with various tasks App UI shown User touch Launch action starts Power / mW CPU Exec.

1000 500

What happens underneath?

slide-9
SLIDE 9

177 ms 810 ms Phase 1 Phase 2 28 ms 130 ms 19 ms

Idle Busy with various tasks App UI shown User touch Launch action starts Power / mW CPU Exec.

1000 500

What happens underneath?

slide-10
SLIDE 10

Profiling – Core use scenarios

Wakeup Update notification wrist… Interaction Game notes navigation Sensing Accel heart baro Single Input launch apps palming voice…

slide-11
SLIDE 11

Four Lessons

  • Design for short interactions
  • Clean the cruft
  • Multicore is your friend
  • Repair, don’t rebuild (yet)
slide-12
SLIDE 12

Four Lessons

  • Design for short interactions
  • Clean the cruft
  • Multicore is your friend
  • Repair, don’t rebuild (yet)
slide-13
SLIDE 13

Idle anomalies are pervasive

250 500 750 update lch.set lch.game notes Device suspend Voice UI

  • Cont. interaction
  • Cont. interact.+NetI/O

Storage I/O User think Bluetooth tail time OS shell policy App policy 2000 4000 notif navi

Time (ms) Pct. Overall Episodes Pct. Explained

614.1 17.1% 376 100.0% notes 843.3 50.5% 352 100.0% voice 722.6 50.9% 205 99.9% lch.game 185.2 25.6% 110 92.9% lch.calc 153.6 15.6% 120 91.4% lch.set 16.8 10.6% 6 100.0% touch 223.0 61.2% 44 100.0% update 2173.0 52.80% 912 100.0% navi 4035.6 86.80% 277 100.0% notif

Time / ms

slide-14
SLIDE 14

Idle anomalies are pervasive

250 500 750 update lch.set lch.game notes Device suspend Voice UI

  • Cont. interaction
  • Cont. interact.+NetI/O

Storage I/O User think Bluetooth tail time OS shell policy App policy 2000 4000 notif navi

Time (ms) Pct. Overall Episodes Pct. Explained

614.1 17.1% 376 100.0% notes 843.3 50.5% 352 100.0% voice 722.6 50.9% 205 99.9% lch.game 185.2 25.6% 110 92.9% lch.calc 153.6 15.6% 120 91.4% lch.set 16.8 10.6% 6 100.0% touch 223.0 61.2% 44 100.0% update 2173.0 52.80% 912 100.0% navi 4035.6 86.80% 277 100.0% notif

Time / ms

Legacy/improper OS designs

Voice UI Anecdote

slide-15
SLIDE 15

Four Lessons

  • Design for short interactions
  • Clean the cruft
  • Multicore is your friend
  • Repair, don’t rebuild (yet)
slide-16
SLIDE 16

Four Lessons

  • Design for short interactions
  • Clean the cruft
  • Multicore is your friend
  • Repair, don’t rebuild (yet)
slide-17
SLIDE 17

OS execution dominates CPU usage.

0% 25% 50% 75% 100% update notif wrist touch lch.set lch.calc lch.game palming voice game notes navi accel heart baro Wakeup Single In. Interact. Sensing

slide-18
SLIDE 18

0% 25% 50% 75% 100% update notif wrist touch lch.set lch.calc lch.game palming voice game notes navi accel heart baro Idle Apps OS:Clockwork OS:daemons Wakeup Single In. Interact. Sensing

OS execution dominates CPU usage.

slide-19
SLIDE 19

0% 25% 50% 75% 100% update notif wrist touch lch.set lch.calc lch.game palming voice game notes navi accel heart baro Idle Apps OS:Clockwork OS:daemons Wakeup Single In. Interact. Sensing

OS execution dominates CPU usage.

slide-20
SLIDE 20

OS execution dominates CPU usage.

slide-21
SLIDE 21

OS execution dominates CPU usage.

slide-22
SLIDE 22

Costly OS services are likely cruft.

slide-23
SLIDE 23

Wearable suffers from uArch inefficiency

Cycles-per-instruction (lower is better)

2 -- 5 (high!)

slide-24
SLIDE 24

Wearable suffers from uArch inefficiency

Cycles-per-instruction (lower is better)

2 -- 5 (high!)

Smartphone as a comparison

1.3 -- 2.5 web rendering

slide-25
SLIDE 25

The major cause: complex OS code

(L1 icache, iTLB, and branch predictor)

uArch problem will NOT be gone with future wearable CPUs

slide-26
SLIDE 26

Four Lessons

  • Design for short interactions
  • Clean the cruft
  • Multicore is your friend
  • Repair, don’t rebuild (yet)
slide-27
SLIDE 27

Substantial TLP on a par with desktop

  • - due to short interactions.

# of concurrent threads TLP: avg. busy CPU cores (over non-idle time)

slide-28
SLIDE 28

Apps are mostly single-threaded; OS contributes to TLP significantly.

slide-29
SLIDE 29

Four Lessons

  • Design for short interactions
  • Clean the cruft
  • Multicore is your friend
  • Repair, don’t rebuild (yet)
slide-30
SLIDE 30

Hot OS daemon functions: highly skewed distribution Top 5 à >20% CPU cycles Top 50 à >50% CPU cycles

slide-31
SLIDE 31

Hot OS daemon functions: highly skewed distribution

Backlight UI layout low-mem killer Anecdotes

Top 5 à >20% CPU cycles Top 50 à >50% CPU cycles Manipulating basic data structures Legacy/improper OS designs

slide-32
SLIDE 32

Summary: four lessons

  • Design for short interactions

– User’s attention is precious

  • Clean the cruft

– which wastes CPU cycles and chokes uArch

  • Multicore is your friend

– OS is already multi-threaded; keep it that way

  • Repair, don’t rebuild (yet)

– Java is fine; Dalvik is fine; ARMv7a is fine… – Fix individual OS components first

slide-33
SLIDE 33

HOW ABOUT AFTER THAT? (I.E. “NEXT-GEN WEARABLE OS”)

slide-34
SLIDE 34
slide-35
SLIDE 35

We probably will reach a point when OS

  • verhaul/redesign is justified.

Specializing OS for common, single-app scenarios

slide-36
SLIDE 36

“In-place” OS specialization

Full Simple

OS Daemons Kernel

Full Simple Activity Manager Window Manager

slide-37
SLIDE 37

“In-place” OS specialization

Full Simple

OS Daemons Kernel

Full Simple Activity Manager Window Manager

Apps

slide-38
SLIDE 38

Simple Simple

“In-place” OS specialization

Full

OS Daemons Kernel

Full Activity Manager Window Manager

Apps

slide-39
SLIDE 39
  • Post-smartphone devices: unique usage

and hardware

  • Many OS tradeoffs become invalid

– efficiency v.s. flexibility & programming ease

  • Immediate actions: reusing/fixing

individual components

  • Future: specialization

xsel.rocks/p/wear Final takeaway

Tools, data, and benchmark videos

slide-40
SLIDE 40

Purdue ECE

41

  • Largest engineering dept in Purdue
  • 127 years
  • Consistently ranked as one US top 10
  • ~90 faculty members; ~500 PhD

students

  • 28 IEEE fellows, 4 NAE members and

more

  • $31M annual research fund
slide-41
SLIDE 41

Purdue ECE Is Unique

  • Diverse & Strong Computer Engineering

– ~20 faculty members – Hardcore computer research (OS, PL, compiler, architecture, mobile/emb system)

  • Active in various communities

– ISCA/MICRO/HPCA, PLDI/PPoPP, ASPLOS, Mobisys/MobiCom, etc…

42