Thesis Outline
Total Page:16
File Type:pdf, Size:1020Kb
ENERGY AND RUN-TIME PERFORMANCE PRACTICES IN SOFTWARE ENGINEERING DISSERTATION FOR THE AWARD OF THE DOCTORAL DIPLOMA ATHENS UNIVERSITY OF ECONOMICS AND BUSINESS 2021 Stefanos Georgiou Department of Management Science and Technology Athens University of Economics and Business ii Department of Management Science and Technology Athens University of Economics and Business Email: sgeorgiou@aueb.gr Copyright 2021 Stefanos Georgiou This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License. iii Supervised by Professor Diomidis Spinellis iv In loving memory of my grandma Contents 1 Introduction 1 1.1 Context ..................................... 1 1.2 Problem Statement ............................... 2 1.3 Proposed Solutions and Contributions ..................... 3 1.4 Thesis Outline .................................. 4 1.5 How to Read this Thesis ............................. 5 2 Related Work 6 2.1 Background ................................... 6 2.1.1 Methodology .............................. 7 2.1.2 Energy Efficiency in the Context of SDLC ................ 8 2.2 Requirements .................................. 9 2.2.1 Survey Studies ............................. 9 2.2.2 Empirical Evaluation Studies ...................... 10 2.3 Design ...................................... 11 2.3.1 Empirical Evaluation of Design Patterns ................ 11 2.3.2 Energy Optimisation of Design Patterns ................ 12 2.4 Implementation ................................. 13 2.4.1 Parallel Programming .......................... 13 2.4.1.1 Experimental Studies .................... 13 2.4.1.2 Algorithms .......................... 14 2.4.2 Approximate Computing ........................ 15 2.4.2.1 Programming Frameworks .................. 15 2.4.2.2 Annotation-Based Extensions ................ 16 2.4.2.3 Directive-Based Extensions ................. 17 2.4.2.4 Memoisation ......................... 17 2.4.3 Source Code Analysis .......................... 17 2.4.3.1 System Calls ......................... 18 2.4.3.2 Optimisation Tools ...................... 19 2.4.3.3 Tests Generation Framework ................ 19 2.4.3.4 Line-by-Line ......................... 19 2.4.4 Programming Languages ........................ 19 2.4.4.1 Different Programming Languages ............. 20 2.4.4.2 Compiler Optimizations ................... 22 2.4.5 Data Structures ............................. 23 2.4.5.1 Experimental Studies .................... 23 v vi 2.4.5.2 Tooling Support ....................... 24 2.4.6 Coding Practices ............................ 25 2.4.7 IPC Technologies ............................ 27 2.5 Verification ................................... 28 2.5.1 Benchmarks ............................... 28 2.5.2 Monitoring Tools ............................ 29 2.5.2.1 Software Energy Monitoring Tools .............. 30 Workstations and Servers .................... 30 Virtual Machines ........................ 32 SmartPhones .......................... 32 2.5.2.2 Hardware Energy Monitoring Tools ............. 33 Workstation and Server Monitoring Tools ........... 34 Smartphone Monitoring Tools ................. 34 2.6 Maintenance .................................. 34 2.6.1 Empirical Evaluation of Code Refactoring ............... 35 2.6.2 Tools for Refactoring .......................... 36 2.7 Research Opportunities ............................. 37 3 Methodology 39 3.1 Research Objectives ............................... 39 3.1.1 Programming Languages Research Questions ............. 39 3.1.2 IPC Research Questions ......................... 40 3.1.3 Safeguards Research Questions .................... 41 3.2 Software Systems and Tools ........................... 42 3.2.1 Programming Languages Subject Systems ............... 42 3.2.2 IPC Subject Systems ........................... 46 3.2.3 Safeguards Subject Systems ...................... 49 3.3 Research Method ................................ 51 3.3.1 Programming Languages Measurements Collection .......... 51 3.3.2 IPC Measurements Collection ..................... 52 3.3.3 Accuracy of obtained Results ...................... 52 3.3.4 Safeguards Measurements Collection ................. 54 3.4 Threats to Validity ................................ 55 3.4.1 Programming Languages Limitations .................. 55 3.4.2 IPC Limitations ............................. 56 3.4.3 Safeguards Limitations ......................... 56 4 Results 57 4.1 Programming Languages Results ........................ 57 4.1.1 PL-RQ1. Which programming languages are the most EDP-efficient and inefficient for particular tasks? ................... 57 4.1.1.1 Embedded System Results .................. 59 4.1.1.2 Laptop System Results .................... 61 4.1.1.3 Server System Results .................... 61 4.1.1.4 Range of results ....................... 62 4.1.2 PL-RQ2. Which types of programming languages are, on average, more EDP-efficient and inefficient for each of the platforms? ..... 64 vii 4.1.3 PL-RQ3. How much does the EDP of each programming language differ among the selected platforms? ................. 65 4.2 IPC Results .................................... 66 4.2.1 IPC-RQ1. Which IPC technology implementation offers the most energy- and run-time performance-efficient results? ......... 66 4.2.1.1 Intel platforms ........................ 67 4.2.1.2 ARM platforms ........................ 67 4.2.1.3 Range of results ....................... 68 4.2.2 IPC-RQ2. What are the reasons that make certain IPC technologies more energy and run-time performance-efficient? .......... 69 4.2.2.1 Platforms’ System Calls ................... 71 4.2.2.2 Identifying the Facts ..................... 71 4.2.3 IPC-RQ3. Is the energy consumption of the IPC technologies propor- tional to their run-time performance or resource usage? ....... 72 4.2.3.1 Energy consumption and run-time performance ...... 73 4.2.3.2 Energy consumption and resource usage .......... 73 4.3 Safeguards Results Analysis ........................... 75 4.3.1 SG-RQ1. What are the energy and run-time performance implica- tions of the security mechanisms on a computer system? ....... 75 4.3.1.1 CPU Vulnerability Patches .................. 76 4.3.1.2 Communication-related Security .............. 86 4.3.1.3 Memory-related Protection ................. 87 4.3.1.4 Compiler-related Safeguards ................ 87 4.3.2 SG-RQ2. Is the energy consumption of the examined security mech- anisms proportional to their run-time performance? ......... 90 4.3.2.1 CPU-related Vulnerability Patches .............. 90 4.3.2.2 Communication-related Security .............. 91 4.3.2.3 Memory-related Protection ................. 91 4.3.2.4 Compiler-related Safeguards ................ 91 4.3.3 SG-RQ3. How do security mechanisms affect the energy consump- tion and the run-time performance of different applications andutil- ities? .................................. 92 4.3.3.1 CPU-related Vulnerability Patches .............. 92 4.3.3.2 Compiler-related Safeguards ................ 93 5 Discussion 94 5.1 Programming Languages Findings ....................... 94 5.1.1 Champions ............................... 94 5.1.2 Impact ................................. 95 5.2 IPC Findings ................................... 96 5.2.1 Interpreting the Findings ........................ 96 5.2.2 Lessons learned ............................. 96 5.3 Safeguards Findings ............................... 97 5.3.1 CPU Vulnerability Patches and GCC Safeguards ............ 97 viii 6 Conclusions and Future Work 98 6.1 Contributions of the Thesis ........................... 98 6.2 Future Work ................................... 99 A Appendix I: Heatmaps from Programming Languages Study 102 Bibliography 112 B List of Publications 130 B.1 Accepted publications based on this thesis ................... 130 B.2 Submitted articles based on this thesis ..................... 130 B.3 Relevant accepted publications not part of the thesis ............. 130 List of Figures 2.1 Software Development Life Cycle for Energy Efficiency Taxonomy ....... 8 3.1 Experiment setup for Intel and ARM systems .................. 47 3.2 Client (top) and server (bottom) waveforms of gRPC task implemented in JavaScript running on ARM platforms ...................... 53 4.1 Server’s EDP with Weighted Function 2 ..................... 58 4.2 EDP box plots. The points show outliers. The vertical scale is the logarithmic ratio log10(p=pmin) where p is the measurement and pmin is the minimum of the measurements for that task, corresponding to the most EDP-friendly language. .................................... 63 4.3 Intel and ARM computer platforms results ................... 69 4.4 Computer Platforms System Calls ........................ 70 4.5 The first figure (left) illustrates the energy consumption and the run-time per- formance of the Intel platform. The second figure (right) presents the energy consumption and the run-time perfomrance of the ARM platform. ...... 73 4.6 The first figure (left) illustrates the energy consumption and the maximum resident set size results of the Intel platform. The second figure (right) presents the energy consumption and the maximum resident set size results of the ARM platform. .............................. 74 4.7 The figures illustrate the energy consumption and the major page faultsre- sults of the Intel (left) and the ARM (right) platforms. ............. 74 4.8 The first figure (left) illustrates the energy consumption and the majorpage faults results of the Intel platform, while the second figure