ESS2014!(X)

ßČùĊáùčýĉĎĂċĎè
A!Pathak!et!al,!Hotnets’11!(2011)!:!ebugs!=!energy!bugs!

sòõîąČ»ðāĎøôþĉõøÒx¦¼!

AppAggressive!
Power!save¹óýøâãß:3ÀØÕÉ¦dÒ)ª

Android!Framework!/!Linux

WakeLock
Power!Management!
API!
9¹§!
+D-3z~F,!XLCD(C)!Shin!NAKAJIMA­

NetworkConsumpOon
¦_6Á8Æ¾(C)!Shin!NAKAJIMA®¦dÒKÚ¾

Wi]Fi!STA!üċĎòĎþčăĎù¦de4ZÒ

Power!
(mW)

High!Power

500

High!PowerBeacon

500

Idle!Listen

Deep!
Sleep

Beacon

Idle!Listen

Deep!
Sleep
00.0

1.000.0InacOvity!Omer

Light!Sleep

Deep!
Sleep

3.0

Time!(s)

2.0

1.0

2.0

InacOvity!Omer

Light!Sleep

Deep!
Sleep

3.0

Time!(s)

»¦mE¼ÒmE}!
Data!transfer!
[(not!more)!]!
/!reset!inacOvity!Omer

High!Powerd¦!=¹mE}ÐaÊÌ

Pstj!=!Mst!x!(tj+1!–!tj)
P!=!Σj!Pstj!

J.!Manweiler!and!R.R.!Choudhury,!MobiSys’11,!(2011)!

(!

beacon!
[TIM]

Beacon!
![TIM]

Data!transfer!
[more]

AuthenOcaOon Idle!Listen
AssociaOon
beacon!
[not!TIM]
beacon!!
[(not!TIM)]
Deep!
Light!
Sleep
Sleep
expire!inacOvity!Omer

2014/10/22

Peripheral

BaFery2014/10/22äúĈçĎdÒPower!
(mW)

CPU!(DVFS)

ebugs!?
ÿĊýÞáĆÐ×Ú5Q\y

2014/10/22

Service(C)!Shin!NAKAJIMA¯

2014/10/22

(C)!Shin!NAKAJIMA

beacon!
[TIM]

beacon!!
[not!TIM]

°ßÿć5Î¨$TAc)vityresumed
onResume()
onStart()

• ÿĊýÞáĆÐ×ÚOb!

onPause()

started

created¦ûéÒ\y– ÿĊéĆĂ5Ð×Ú5e!
– Ce4ÒObÝBq!

pausedonResume()

onStart()
onRestart()

A!Pathak!et!al,!EuroSys!2012!!
L.Zhang!et!al,!CODES+ISSS!2012!!

onStop()

• ¾ÃËÀÒ)ªh!

stopped

onDestroy()

onCreate()

ebugs!! AcOve!WakeLock!

destroyed

remains!if!bug

Low!Memory!
Killer
Ready!for!!
a!quick!start– ¦dÓÿĊéĆĂ5Î¨$TĒFWKÒL!
– æûĉõïÒ)ªĒöðöàČéÎ$^!
– APIÒqĒVvÐÓºÒ#!
– 5če4p/Ò@©!

Flushed!out

2014/10/22

(C)!Shin!NAKAJIMA

±

2014/10/22

5Ò0

5Q

Nexus!7!(2012!Model)!…!NVIDIA!Tegra3!(ARM!Cores)

Wi]Fi!ßÿćêĎîąČÒ5Q

DVFS!ÒZ

2.5!
2!

;,5Q

(C)!Shin!NAKAJIMA

Òe4ďCPU!Ð7ÈÚ0Đ(total)!relaOve!error



1.5!

²

2×σ
μ

ē

1.2
3.8

ē 30!%

msec
5000.00!!

1!

2×σ!=!1.2!sec4500.00!!
4000.00!!

0.5!

μ!=!3.8!sec
σ!=!0.6!sec3500.00!!
3000.00!!

0!
1! 2! 3! 4! 5! 6! 7! 8! 9! 10!11!12!13!14!15!16!17!18!19!20!21!22!23!24!25!

]Ñ4ď&cN«f!<!MAXĐ#Threads!(CPU!Loads)

2500.00!!
2000.00!!

ÔØËÂ!

1500.00!!

ćßĈôáĂCÁlj

1000.00!!
500.00!!

ďR1&cNf!=!MAXÍ5Đ

0.00!!
0! 1! 2! 3! 4! 5! 6! 7! 8! 9! 10! 11! 12! 13! 14! 15! 16! 17!

9Ē32014/10/22

(C)!Shin!NAKAJIMASIGSS!2014.3
³

¶¹ðĉõùčðêïĄĎćČé,!
¹¹«Wi]Fi!"Ò>Æ,!
!!!!!!!…!

#Threads!(CPU!Loads)
2014/10/22

(C)!Shin!NAKAJIMA´ă÷ĈĀĎðÒY¦dåĎøāøČďPCAĐ
S.!Nakajima,!ACES]MB’13,!(2013)!

WiFi]STA

¦d
KÚ¾

^

Data!transfer!
[(not!more)!]!
/!reset!inacOvity!Omer

High!Power
Beacon!
![TIM]

beacon!
[TIM]

\[C

beacon!
[not!TIM]

Ċïõèčă÷Ĉ\[AuthenOcaOon
AssociaOon

Data!transfer!
[more]

Idle!Listen

beacon!!
[(not!TIM)]
Deep!
Sleep(C)!Shin!NAKAJIMAµWi]Fi!STA!with!WiFiLockHigh!Powerbeacon!
[TIM]

beacon!
[not!TIM]

2014/10/22

2014/10/22

beacon!!
[not!TIM]

(C)!Shin!NAKAJIMA­¬¦dåĎøāøČÒ?<• nÇÉ¾ÄÎ!

Data!transfer!
[(not!more)!and!(not!locked)]!
/!reset!inacOvity!Omer– ¤M}¹đ¹ôáāčôáĂßâø!
– mEÍ¦d!
•  Q ½ÉÙÒ¦d«M!
¹!=>!guQ «Δt!ÒQºM!*!Δt!

Beacon!
![TIM]

Data!transfer!
[more]
Data!transfer!
[(not!more)!
Idle!Listen!!and!locked]!
AuthenOcaOon
beacon!
AssociaOon
beacon!!
[TIM]
[not!TIM!
beacon!!
and!locked]!
[(not!TIM)!
and!(not!locked)] Light!
Deep!
Sleep
Sleep
beacon!!
expire!inacOvity!Omer
[not!TIM]

(C)!Shin!NAKAJIMA

Light!
Sleep
expire!inacOvity!Omer9ĒDSIGEMB!2013.99ĒDSIGEMB!2014.9
2014/10/22

beacon!
[TIM]

edge!!<label,!guard,!update!>!

dPst/dt!=!Mst9ĒPVóýø|3­­

2014/10/22

(C)!Shin!NAKAJIMA

!2014.9­®fWLTL\[<Ò\[CStQďÍÒëðø)ªØÀÒObÍJ4ÆÛÉĐStQ!!(T)ÍÒ¦d(E)ÓĕT
originPxOme

EPu

Pv

<>Fτx.Fmu.(!IdleListen!·!
!!!!!!!!!!!!!!<>Fτy.Fmv.(expire!·!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!(x!<!y!¸!x!+!1000)·!(u!<!v!¸!u!+!50))!)

Py
x!=!QhÒ!
u!=!ÕÒÏÎÇÌºPx!=!Puº«Py!=!Pv¹ÎÈÚÎ<>(!IdleListen!!·!<>(expire)!)

StÏ TmE

expire
mE'ª

fWLTL!:!¢2ÝIËLTLÍn(C)!Shin!NAKAJIMA­¯

2014/09/17

YÒOb
Ċïõèčă÷Ĉ\[Data!transfer!
[(not!more)!]!
/!reset!inacOvity!Omer

Beacon!
![TIM]

beacon!
[TIM]

[](!IdleListen!]>!<>expire!)

AuthenOcaOon
beacon!
[not!TIM]

MTL

fWLTLo<[](!IdleListen!]>!<>{<100}!expire!)
τLight!
Sleep
expire!inacOvity!Omer

2014/10/22

expire

100!UfTPTL
[](!Fτx.IdleListen!]>!<>Fτy.(expire!·!(x!<!y!<!x!+!100))!)

beacon!
[TIM]

beacon!!
[(not!TIM)]
Deep!
Sleep

IdleListenm

Idle!Listen

AssociaOon

­°<>Fτx.Fmu.(!IdleListen!·!

Ėē !!!!!!!!!!!!<>F y.F v.(expire!·!

!!!!!!!!!!!!!!!!!!!!!!!(x!<!y!¸!x!+!1000)·!(u!<!v!¸!u!+!50))!)

Data!transfer!
[more]

(C)!Shin!NAKAJIMALTL¢0NÒWp/PCAKÚ¾

y!=!QhÒ!
v!=!ÕÒĒćßĈôáĂQwoA,!!Γ Ėē ψ

High!PowerC(x,y;!u,v)Ý\[IdleListenmE'ª

(0!<!T(IdleListen,!expire)!¸!1000)!·!(0!<!E(IdleListen,!expire)!¸!50)

2014/10/22ëðø!C(x,y;!u,v)

fWLTL!ÓTPTLÒH=

beacon!!
[not!TIM]

(C)!Shin!NAKAJIMA

­±

2014/10/22

(C)!Shin!NAKAJIMA

­²ĒUPPAAL

ă÷Ĉ\[)ªÒ£Æ• KÚ¾!
– QyØÛÌ¾Ú5¾ÃËÀĒ`4!CåĎøāøČďSafety!Timed!AutomatonĐ!

Metric!Temporal!Logic!Òă÷Ĉ\[ďTimed!AutomataĐĒ¤MQ ÒÕ!!
TPTL!(=!LTL!+!QhÐ¡ÈÚ¢2«Fτx!)ÓMTLÝ%Ö!
ConstraintLTLďFτxÎFmuÒOĐĒ¤MQ ÀË"ÒÕ!

èĊõè0N!X¹Ē¹dX/dt!=!1!

• \[C!

→¹PCA/fWLTL!Òă÷Ĉ\[Ó`4

– TCTLÒíþèĆð!
– A[]!p(X),!E<>!p(X),!A<>!p(X),!E[]!p(X),!A[](p(X)!]]>!A<>!q(X))!

*¥ÆÒÏor!

• \ßĈìćñĂ!

Q ¹ĎĔ¹i¢ÒmE!
ëðøÒn!
¢2Ò.F!

– "ă÷Ĉ\[¹Ē¹\[<ÅÎÒßĈìćñĂ!
!
2014/10/22

(C)!Shin!NAKAJIMA

­³¿ÜÙÐ• ¦dÒ)ª!
– Ċïõèčă÷Ĉ\[ÎÇÌ4<!
– nÁ1Â¾ÄÎÀØ`4!

• RÒz~¹→¹\[!

9Ē3SIGSS!2014.10

– fWLTLÒíþòõø!
– \[üôĎČÒ¢4!

• Cyber]Physical!Systems!(CPS)!
– č{4ÏÒ ÙG¾!
– ¦dÒ)ª¹→¹CPSÒkA

2014/10/22

(C)!Shin!NAKAJIMA

­µ

2014/10/22

(C)!Shin!NAKAJIMA­´