Types for Energy Management Yu David Liu State University of New York (SUNY) at Binghamton OOPSLA13 PC Workshop.

Slides:



Advertisements
Similar presentations
Continuation of chapter 6…. Nested while loop A while loop used within another while loop is called nested while loop. Q. An illustration to generate.
Advertisements

Chapter 1.0 The Information Age & Digital Computers.
Programming Basic Concepts © Juhani Välimäki 2003.
Multimedia Specification Design and Production 2013 / Semester 1 / week 7 Lecturer: Dr. Nikos Gazepidis
CS3773 Software Engineering Lecture 01 Introduction.
Object-Oriented Design Patterns Composite Singleton State Observer … Autumn 2012UCN Technology: IT/Computer Science1.
Dr. Alexandra Fedorova August 2007 Introduction to Systems Research at SFU.
Keeping Hot Chips Cool Thermal Management for Green Computing Yang Ge Professor Qinru Qiu.
Nima Aghaee, Zebo Peng, and Petru Eles Embedded Systems Laboratory (ESLAB) Linkoping University Process-Variation and Temperature Aware SoC Test Scheduling.
1.2 Language Processing Activities The fundamental language processing activities divided into two parts. 1. Program generation activities 2. Program execution.
Gearbox Software PRODUCTION PIPELINE – JOBS TITLES – JOB DESCRIPTIONS.
Dr. José M. Reyes Álamo 1.  Course website  Syllabus posted.
CHAPTER 1 GC 101 Introduction to computers and programs.
Load Balancing Dan Priece. What is Load Balancing? Distributed computing with multiple resources Need some way to distribute workload Discreet from the.
Type-Specialized Staged Programming with Process Separation Yu David Liu, State University of New York at Binghamton Christian Skalka, University of Vermont.
School of Management & Information Systems
Low Power Techniques in Processor Design
Performance analysis and prediction of physically mobile systems Point view: Computational devices including Mobile phones are expanding. Different infrastructure.
① Computer aided design (CAD) It have been associated with computer system design with the development of the concept of computer-graphics but the concept.
© 2007 Pearson Addison-Wesley. All rights reserved 0-1 Spring(2007) Instructor: Qiong Cheng © 2007 Pearson Addison-Wesley. All rights reserved.
F LEX J AVA : Language Support for Safe and Modular Approximate Programming Jongse Park, Hadi Esmaeilzadeh, Xin Zhang, Mayur Naik, William Harris Alternative.
The Future of Networks and Computing Brad Templeton E.F.F., Foresight Inst. & SU June 2010.
Industrial Excellence Center (IXC) Embedded Applications Software Engineering (EASE) Prof. Per Runeson.
Object-Oriented Analysis and Design An Introduction.
Lecture on Computer Science as a Discipline. 2 Computer “Science” some people argue that computer science is not a science in the same sense that biology.
Spatial Note LCA assignment Chris Fitzner Thinh Luu Dung Nguyen.
Chapter 7 Applying UML and Patterns Craig Larman
Bringing it together Humans Computers Interaction Paradigms Design HCI in software development Design Rules Implementation Support – to come.
Areas of Computing Study. Artificial Intelligence Databases and Data Science Human-Centered Computing Networking Information Security System Software.
ICCS WSES BOF Discussion. Possible Topics Scientific workflows and Grid infrastructure Utilization of computing resources in scientific workflows; Virtual.
Computer supported cooperative work -Basic concepts
Optimizing Power and Energy Lei Fan, Martyn Romanko.
ICT – classes 1-2 – first language Basis: national core curriculum for basic education, its values, concept of learning, culture of action and goals of.
Acoustic localization for real-life wireless sensor network applications Michael Allen Cogent Computing ARC in collaboration with: Centre for Embedded.
ECE 751- Cells: A Virtual Mobile Smartphone Architecture Mikkel Nielsen
Chapter 1 Basic Concepts of Operating Systems Introduction Software A program is a sequence of instructions that enables the computer to carry.
Status Report #2 Walking Charger By: Carlos Benitez, Meryem Fennich, Srinath Kota, Jacksario Rosario September 15 st 2010 Description: Battery charger.
INTRODUCTION TO COMPUTER ENGINEERING (ECE 001) Dr. Ahmed Bayoumi Dr. Shady Yehia Elmashad 1.
EBIZ 509 Foundations of E-Business. 2 © UW Business School, University of Washington 2004 Agenda Today Class schedule and class plan Basic computer concepts.
Computer Science A 1. Course plan Introduction to programming Basic concepts of typical programming languages. Tools: compiler, editor, integrated editor,
Lecture Exam 1 Study Guide Albert Kalim. Chapter 1: Computer Basics 1. Explain why it’s essential to learn about computers today. 2. Discuss several ways.
What Causes Software Vulnerabilities? _____________________ ___________ ____________ _______________   flaws in developers own code   flaws resulting.
Match the following Operating System concepts with definition A to E.
CPSC 875 John D. McGregor Design Concept C5. ALISA
Industrial Automation Part I Real Time Control Embedded Systems.
Information Technology. *At Home *In business *In Education *In Healthcare Computer Uses.
4. History of Computing Technology
Android Mobile Application Development
Power Supply.
Canvas and Arrays in Apps
Introduction To Computer Engineering (ECE 001)
Prepared by: Raghad J Foqha Supervisor: Dr. Saed Tarapiah
Hardware and Software Hardware refers to the physical devices of the computer system e.g. monitor, keyboard, printer, RAM etc. Software is a set of programs,
Mobile Operating System
Aritra Sengupta Man Cao Michael D. Bond and Milind Kulkarni
Tool Support for Energy-Aware Programming
Green Software Engineering Prof
An Overview of Java.
3.2 Virtualisation.
Human Factors Issues Chapter 8 Paul King.
Claytronics By: Neeraj Agarwal E.C. 3rd (B).
Introduction To software engineering
Topic I Introduction to Computer Architecture and Organization
Energy Management System in Ad Hoc Wireless Networks
Hui Chen, Shinan Wang and Weisong Shi Wayne State University
Compiler Back End Panel
Compiler Back End Panel
CSCE , 510, 511, 512 Introduction to Program Design and Concepts Dr. J
Fundamentals of Human Computer Interaction (HCI)
Presentation transcript:

Types for Energy Management Yu David Liu State University of New York (SUNY) at Binghamton OOPSLA13 PC Workshop

2 Energy Efficiency in Computing PL & SE efforts PACT, ASPLOS OSDI, SOSP, SenSys, SIGCOMM ISCA, MICRO, HPCA VLSI, DAC operational cost phone battery life sensor network usability system reliability (overheating) environment

3 High-Level Questions What are the principles of energy management? recurring themes of software-hardware interactions recurring themes of static-dynamic interactions How can the principles be abided by at software construction time (or through software lifecycle)? What is the role of programmers in energy-efficient computing?

4 This Talk An energy-aware programming language design Core Idea: building the principles of energy management into a type system Static Typing: Michael Cohen, Haitao Steve Zhu, Senem Ezgi Emgin, Yu David Liu, "Energy Types," OOPSLA12. Hybrid Typing: ongoing work

5 Energy Types Phase A pattern of system (CPU, memory…) utilization math, graphics, audio… A level of energy state battery low, battery high, battery charged… Mode A type system to reason about energy management based on two concepts:

6 Energy Types Phase A pattern of system (CPU, memory…) utilization math, graphics, audio… A level of energy state battery low, battery high, battery charged Mode A type system to reason about energy management based on two concepts:

7 CPU-bound class Compute{ … void doCompute(){ for(int i = 0; i < N; i++){ pi += factor/(2 * i + 1); factor /= -3.0; }}} class Draw{ … void doDraw(){ for(int i = 0; i < NUM; i++) { canvas.drawL(x[i], y[i],); c.draw(getImg(), rect); }}} I/O-bound Phases in Programs

8 Draw draw = new Draw(); Compute cmpt = new Compute(); draw.doDraw(); cmpt.doCompute(); Draw draw = new Draw(); Phases in Programs

9 Draw draw = new Draw(); cmpt = new Compute(); draw.doDraw(); cmpt.doCompute(); draw = new Draw(); phases { graphics <cpu math} Phases as Type Qualifiers

10 DVFS in Energy Management Energy = Power * Time Dynamic Voltage & Frequency Scaling (DVFS) Power = c * Frequency * V 2

11 Phase-based Energy Management What: divide execution into distinct system utilization phases, and scale down CPU frequency when a phase is not CPU-bound Why: minimum performance degradation with maximum energy savings Energy Types Solution: use (declared or inferred) phase types to guide DVFS A case of software-hardware interaction for energy management

12 Draw draw = new Draw(); cmpt = new Compute(); draw.doDraw(); cmpt.doCompute(); draw = new Draw(); phases { graphics <cpu math} Phases as Type Qualifiers CPU frequency scaled through compiler instrumentation Energy Management through Type-Directed DVFS: 1. tap programmer knowledge 2. tap type systems ability for consistency checking, type propagation and inference

13 Invariants Phase distinction: No object can commit to more than one phase Phase isolation: an object can only send messages to an object belonging to the same phase Inter-phase messaging is only allowed through explicit type coercion Promoting phased behaviors

14 Type System Details Based on region types: phases are regions Parametric polymorphism: Different objects of the same class can have different phases Finer-grained support through method polymorphism Explicit form: generic phases Implicit form: polymorphic inference to allow for arbitrary qualifier elision Type Soundness

15 Energy Types Phase A pattern of CPU and memory utilization math, graphics, audio A level of energy state expectation battery low, battery high, battery charged Mode A type system to reason about energy management based on two concepts

16 Renderer m1 = new Renderer(0.99); Renderer m2 = new Renderer(0.5); Objects of different qualities Mode-based Energy Management class Renderer{ Renderer(double quality){ int loopNum = 1000 * quality; for(int i = 0; i < loopNum; i++){ render(canvas, i); }} }

17 Renderer m1 = new Renderer(0.99); Renderer m2 = new Renderer(0.5); Modes as Type Qualifiers modes { low <: hi; } m1 = new Renderer(0.99); m2 = new Renderer(0.5); Encouraging Application-Specific Energy Savings

18 Invariants waterfall Invariant: an object can only send messages to an object of the same mode, or of a lower mode in the partial order A program in high energy state can invoke code supposed to be used in low energy state The other way around requires explicit type coercion Regulating Energy States

19 Type System Details Based on region types: modes are regions Parametric polymorphism: Different objects of the same class can have different modes Finer-grained support through method polymorphism Explicit form: generic modes Implicit form: polymorphic inference to allow for arbitrary qualifier elision Type Soundness

20 Ongoing Effort: Hybrid Typing class Network { void send() {…} } class Client { … Network n = new Network(); while (…) { n.send(); }}

21 Ongoing Effort: Hybrid Typing class Network { void send() {…} } class Client { … n = new Network(); while (…) { n.send(); }} Hmm..

22 Ongoing Effort: Hybrid Typing class Network { void send() {…} } class Client { … n = new Network(); while (…) { n.send(); }} Hmm..

23 Dynamic Types class Network { void send() {…} } class Client { … n = new Network(); while (…) { n.send(); }}

24 From Dynamic to Static (One Possible Design) class Network { void send() {…} } class Client { … n = new Network(); while (…) { }} Client Makes Decision Hmm..

25 From Dynamic to Static (Our Design) class Network { void send() {…} ~ Network () { if (…) return hi else return low; } class Client { … n = new Network(); while (…) { attribute n to low { n.send(); } }} Bi-Directional Decision

26 Implementation and Evaluation Prototyped compiler for Android Apps Static typing: benchmarking results show promising energy savings with minimal performance loss For some game benchmarks, 40% energy savings and 2% performance loss with phases; application-specific with modes Hybrid typing: under development

27 Conclusions New language designs may capture and facilitate complex software/hardware static/dynamic interactions in energy management Principles of energy management may be enforced by type systems Energy-aware programming broadens the scope of energy optimization by bringing in programmer knowledge

28 Q&A