A Design Method for Modular Energy-Aware Software OUrsi @ OU.NL - - PowerPoint PPT Presentation

a design method for modular energy aware software
SMART_READER_LITE
LIVE PREVIEW

A Design Method for Modular Energy-Aware Software OUrsi @ OU.NL - - PowerPoint PPT Presentation

OUrsi @ ON.NL Christoph Bockisch March 31, 2015 1 A Design Method for Modular Energy-Aware Software OUrsi @ OU.NL March 31, 2015 Christoph Bockisch (christoph.bockisch@ou.nl) A design method for modular energy-aware software OUrsi @


slide-1
SLIDE 1

A design method for modular energy-aware software

A Design Method for Modular Energy-Aware Software

OUrsi @ OU.NL March 31, 2015

Christoph Bockisch (christoph.bockisch@ou.nl)

March 31, 2015 OUrsi @ ON.NL – Christoph Bockisch

1

slide-2
SLIDE 2

A design method for modular energy-aware software March 31, 2015 OUrsi @ ON.NL – Christoph Bockisch

2

Research Overview Software Engineering Method for Energy-Aware Systems Tool support Conclusion

slide-3
SLIDE 3

A design method for modular energy-aware software

Career

March 31, 2015 OUrsi @ ON.NL – Christoph Bockisch

3

2003 – 2008 PhD studies Dissertation: An Efficient and Flexible Implementation of Aspect- Oriented Languages 2009 – 2014 Assistant Professor for Software Composition

  • Software architectures for reliability & adaptivity
  • Energy-optimization for embedded systems
  • Language technology for aspect-oriented programming

Overview Method Tooling Conclusion

since 2014 Assistant Professor in Software Engineering

  • Data analytics in education
  • Energy-optimization in software
  • Verification in concurrent systems
slide-4
SLIDE 4

A design method for modular energy-aware software

Ziele Ziele

Research Approach

Technologies Language abstractions Software engineering methods Development tools Execution environments Goals Aspect-orientation Adaptive optimization Complex events Reliability Adaptability Energy-efficiency Modularity Adaptive embedded systems

March 31, 2015 OUrsi @ ON.NL – Christoph Bockisch

4 Overview Conclusion

Energy-aware components in embedded software Debugging for AOP, Verification and concurrency

Method Tooling

slide-5
SLIDE 5

A design method for modular energy-aware software

Engineering Energy-Aware Embedded Software

  • Common goal in software engineering: modularity
  • Energy issues do not respect module boundaries
  • They are a cross-cutting concern
  • Conventional approaches cannot separate energy-related code

March 31, 2015 OUrsi @ ON.NL – Christoph Bockisch

5 Overview Method Tooling Conclusion

joint work with

Approach: method for systematic design

  • f energy-aware embedded software
  • Make resources explicit at component

interface (energy is one possible resource)

  • Facilitate implementing energy-optimization

in separate components

  • Adapt & adopt tools to support design

process

slide-6
SLIDE 6

A design method for modular energy-aware software

Project Scope

Software controlling energy-consuming devices/resources (Printer parts, mobile device components/activities, etc.) Modular implementation of energy-related code Reducing energy consumption of program execution itself Inventing new

  • ptimization

algorithms

Our focus Not our focus

March 31, 2015 OUrsi @ ON.NL – Christoph Bockisch

6 Overview Method Tooling Conclusion

slide-7
SLIDE 7

A design method for modular energy-aware software

Case Study: Smart Phone

March 31, 2015 OUrsi @ ON.NL – Christoph Bockisch

7

  • S. Malakuti, S. te Brinke, L. Bergmans, and C. Bockisch. Towards Modular

Resource-Aware Applications. In: VariComp 2012 Overview Method Tooling Conclusion

Media player on a mobile phone, streaming music over the network

slide-8
SLIDE 8

A design method for modular energy-aware software

Case Study: Smart Phone

March 31, 2015 OUrsi @ ON.NL – Christoph Bockisch

8

Media Player 3G Driver Media Player Wifi Driver VOIP Application 3G Driver Optimization Optimization Media player on a mobile phone, streaming music over the network Optimization

Overview Method Tooling Conclusion

slide-9
SLIDE 9

A design method for modular energy-aware software

Case Study: Smart Phone

March 31, 2015 OUrsi @ ON.NL – Christoph Bockisch

9

Media Player 3G Driver Media Player Wifi Driver VOIP Application 3G Driver Optimization Optimization Optimization

Overview Method Tooling Conclusion

Media player on a mobile phone, streaming music over the network

slide-10
SLIDE 10

A design method for modular energy-aware software

Case Study: Smart Phone

March 31, 2015 OUrsi @ ON.NL – Christoph Bockisch

10

Media Player 3G Driver Media Player Wifi Driver VOIP Application 3G Driver Optimization Optimization Optimization

Overview Method Tooling Conclusion

Media player on a mobile phone, streaming music over the network

slide-11
SLIDE 11

A design method for modular energy-aware software

Case Study: Smart Phone

March 31, 2015 OUrsi @ ON.NL – Christoph Bockisch

11

Media Player 3G Driver Optimization

Overview Method Tooling Conclusion

Media player on a mobile phone, streaming music over the network

slide-12
SLIDE 12

A design method for modular energy-aware software

Case Study: Smart Phone

March 31, 2015 OUrsi @ ON.NL – Christoph Bockisch

12

VOIP Application 3G Driver Optimization

Overview Method Tooling Conclusion

Media player on a mobile phone, streaming music over the network

slide-13
SLIDE 13

A design method for modular energy-aware software

Case Study: Smart Phone

March 31, 2015 OUrsi @ ON.NL – Christoph Bockisch

13

Media Player Wifi Driver Optimization

Overview Method Tooling Conclusion

Media player on a mobile phone, streaming music over the network

slide-14
SLIDE 14

A design method for modular energy-aware software

Case Study: Smart Phone

March 31, 2015 OUrsi @ ON.NL – Christoph Bockisch

14

3G Driver VOIP Application Media Player Optimization

Overview Method Tooling Conclusion

Media player on a mobile phone, streaming music over the network

slide-15
SLIDE 15

A design method for modular energy-aware software

Case Study: Professional Printers

  • Industrial case: Océ
  • Printer has few main states (start, idle, standby, running)
  • All finishers have similar states
  • All finishers must be in the same state
  • Otherwise, system complexity unmanageable
  • Problem statement
  • Gluer can have hot or cold glue
  • Leads to two separate running states
  • Increases number of states of all finishers
  • Increases complexity

March 31, 2015 OUrsi @ ON.NL – Christoph Bockisch

15

Start Idle Standby Running

Overview Method Tooling Conclusion

slide-16
SLIDE 16

A design method for modular energy-aware software

Case Study: Professional Printers

  • Printer is connected to many finishers
  • Finisher can be connected to various printers

March 31, 2015 OUrsi @ ON.NL – Christoph Bockisch

16

Printer Gluer Stacker Optimization

Overview Method Tooling Conclusion

slide-17
SLIDE 17

A design method for modular energy-aware software

Resource-Aware Component Interface

  • Dedicated component model
  • Resource ports

Service ports

  • Resource Utilization

Model (RUM)

  • RUM defined as state chart
  • States model stable resource usage
  • Services or internal events trigger transitions

March 31, 2015 OUrsi @ ON.NL – Christoph Bockisch

17

Resource port Service port

radio power bandwidth receive send disconnect connect IDLE

radio power ≈ 0 mW bandwidth ≈ 0 kbps

CELL DCH

radio power ≈ 800 mW bandwidth ≈ 100 kbps

CELL FACH

radio power ≈ 460 mW bandwidth ≈ 20 kbps

Network Manager of a 3G Network

send ∨ receive send ∨ receive [inactivity timer = y] ∨ disconnect disconnect [inactivity timer = y] connect

Resource Utilization Model

Overview Method Tooling Conclusion

slide-18
SLIDE 18

A design method for modular energy-aware software

Case Study: Smart Phone

March 31, 2015 OUrsi @ ON.NL – Christoph Bockisch

18

Optimizing Controller Power Supply

radio power bandwidth connection receive send disconnect connect download disconnect connect

Media Player Application (on a smart phone)

stopped paused

connection [until next m seconds are buffered]

playing

connection [until next m seconds are buffered

  • r

when n seconds of the buffer is consumed]

stop stop stop play play pause play pause play IDLE

radio power ≈ 0 mW bandwidth ≈ 0 kbps

CELL DCH

radio power ≈ 800 mW bandwidth ≈ 100 kbps

CELL FACH

radio power ≈ 460 mW bandwidth ≈ 20 kbps

Network Manager of a 3G Network

send ∨ receive send ∨ receive [inactivity timer = y] ∨ disconnect disconnect [inactivity timer = y] connect

Overview Method Tooling Conclusion

slide-19
SLIDE 19

A design method for modular energy-aware software

Analyze system resource behavior

March 31, 2015 OUrsi @ ON.NL – Christoph Bockisch

19

Select most suitable

  • ptimizer

components Identify

  • ptimizer

components Identify functional components new

Design Method for Energy-Aware Embedded Software

Overview Method Tooling Conclusion

Identify key properties of RUM Model resource behavior existing

  • S. te Brinke, S. Malakuti, C. Bockisch, L.

Bergmans, M. Akşit. A Design Method For Modular Energy-Aware Software. In SAC, ACM, 2013

slide-20
SLIDE 20

A design method for modular energy-aware software

Analyze system resource behavior

March 31, 2015 OUrsi @ ON.NL – Christoph Bockisch

20

Select most suitable

  • ptimizer

components Identify

  • ptimizer

components Identify functional components new

Design Method for Energy-Aware Embedded Software

Identify key properties of RUM Model resource behavior existing Can be tool-supported for components with existing implementation.

Overview Method Tooling Conclusion

slide-21
SLIDE 21

A design method for modular energy-aware software

Purpose of RUM at design-time

  • Guarantee liveness and safety properties for all

concretizations

→ Over-approximation

  • Human-readable

→ Abstraction must be minimal

March 31, 2015 OUrsi @ ON.NL – Christoph Bockisch

21

Must be abstraction

  • f resource

behavior Specification for component implementations Understand resource behavior Prove correctness

  • f optimization

Pick most effective

  • ptimization

Overview Method Tooling Conclusion

slide-22
SLIDE 22

A design method for modular energy-aware software

A Formal Method for Extracting RUMs

  • Counterexample-Guided Abstraction Refinement (CEGAR) [16]
  • Can be applied to create RUMs for existing components

March 31, 2015 OUrsi @ ON.NL – Christoph Bockisch

22

Model check (initial) RUM Simulate counterexample Spurious counterexample Automatically refine RUM Success  final RUM Real counterexample  key properties

  • r implementation

wrong

Overview Method Tooling Conclusion

  • S. te Brinke, S. Malakuti, C. Bockisch, L. Bergmans, M.

Akşit, S. Katz. A Tool-Supported Approach for Modular Design of Energy-Aware Software. In SAC, ACM, 2014

slide-23
SLIDE 23

A design method for modular energy-aware software

Extract RUM using CEGAR

  • Initial abstraction
  • Identify maximum power consumption
  • Specify one re-entrant state
  • With power consumption <= maximum
  • Example key property: in all execution sequences, the media player

consumes less than 10 J for playing 20 s of music

  • Counter example exists in abstract model
  • This counterexample does not exist in concrete model because of time-out

and IDLE state

March 31, 2015 OUrsi @ ON.NL – Christoph Bockisch

23

power <= 1J/s

IDLE power <= 0.1 J/s dl speed = 0s music per s ACTIVE power <= 1 J/s dl speed = 3s music per s request done ¬done Overview Method Tooling Conclusion S., te Brinke, C. Bockisch, L., Bergmans, S. Malakuti, M. Aksit, S. Katz. Deriving Minimal Models for Resource Utilization. In: GIBSE, ACM, 2013

slide-24
SLIDE 24

A design method for modular energy-aware software

Overview Method Tooling Conclusion

CEGAR for Extracting RUMs

March 31, 2015 OUrsi @ ON.NL – Christoph Bockisch

24

model check (initial) RUM simulate counterexample spurious counterexample automatically refine RUM

success  final RUM real counter- example time execute and profile analyze profile relate profile to events JBCPP JBCPP to Uppaal Trepn

slide-25
SLIDE 25

A design method for modular energy-aware software

Tool support

  • Developed JBCPP
  • Ecore-based model of Java bytecode
  • Extensible (e.g., energy/time information)
  • Adapted MAGIC
  • CEGAR-implementation
  • Extract RUM from C source code
  • Optimize resulting RUM
  • Adopted Trepn
  • Energy profiling Android applications
  • Adopted UPPAAL
  • Compose and analyze system resource behavior
  • Simulate using model checking

March 31, 2015 OUrsi @ ON.NL – Christoph Bockisch

25 Overview Method Tooling Conclusion

slide-26
SLIDE 26

A design method for modular energy-aware software

Identify key properties of RUM Model resource behavior

March 31, 2015 OUrsi @ ON.NL – Christoph Bockisch

26

Select most suitable

  • ptimizer

components Identify

  • ptimizer

components Identify functional components new

Design Method for Energy-Aware Embedded Software

existing Analyze system resource behavior When RUM is specified formally, it can be analyzed by model-checking tools.

Overview Method Tooling Conclusion

slide-27
SLIDE 27

A design method for modular energy-aware software

Analyzing System Resource Behavior with UPPAAL

  • Commercially used model checker
  • Model, verify, and validate timed automata
  • Models are finite-state machines with numeric and clock

variables (RUM)

  • Transitions react to events (invocation of provided service)
  • Create events (invoke required service)
  • Variables (can represent resource consumption)
  • Key properties
  • Subset of timed computation tree logic

March 31, 2015 OUrsi @ ON.NL – Christoph Bockisch

27 Overview Method Tooling Conclusion

slide-28
SLIDE 28

A design method for modular energy-aware software

Analyzing System Resource Behavior with UPPAAL

  • Consistency checks:
  • nly use specified services and

resources

  • Liveness checks:
  • Simulate model to determine

resource usage

  • Cannot automatically choose the best composition

March 31, 2015 OUrsi @ ON.NL – Christoph Bockisch

28 Overview Method Tooling Conclusion

slide-29
SLIDE 29

A design method for modular energy-aware software

Summary

  • Iterative method for developing energy-aware software
  • Software controlling energy-intensive hardware
  • Modular implementation of optimizations
  • Specify energy (resource) behavior at interface
  • Tool for extracting resource utilization model
  • Based on formal method
  • Yields timed automaton
  • Analysis of system's resource utilization
  • Not shown here:

Programming language support for automatic, online tracking of resource state

March 31, 2015 OUrsi @ ON.NL – Christoph Bockisch

29 Overview Method Tooling Conclusion

slide-30
SLIDE 30

A design method for modular energy-aware software

Future Work

  • Improve energy profiling
  • Software Energy Footprint lab:

Dedicated hardware measuring energy consumption

  • High accuracy
  • Use analysis result to improve profiling automatically
  • Time Performance Improvement with Parallel Processing

Systems

  • Use model checker simulate system with soft real-time constraints
  • Identify bottlenecks and propose optimizations

March 31, 2015 OUrsi @ ON.NL – Christoph Bockisch

30 Overview Method Tooling Conclusion

slide-31
SLIDE 31

A design method for modular energy-aware software

Next Research Idea

Optimize energy consumption of execution itself

  • Create extensive profile:
  • Energy consumption
  • Non-deterministic behavior, such as:

thread-switching, optimization decisions, garbage collection

  • Discover dependencies with data mining
  • Derive heuristics for non-deterministic decisions
  • Possibly develop online optimizations

March 31, 2015 OUrsi @ ON.NL – Christoph Bockisch

31 Overview Method Tooling Conclusion