Bringing Green Software to Computer Science Curriculum: Perspectives from Researchers and Educators
Status:: 🟩
Links:: Teaching Green Software Engineering
Metadata
Authors:: Saraiva, João; Zong, Ziliang; Pereira, Rui
Title:: Bringing Green Software to Computer Science Curriculum: Perspectives from Researchers and Educators
Date:: 2021
Publisher:: Association for Computing Machinery
URL:: https://doi.org/10.1145/3430665.3456386
DOI:: 10.1145/3430665.3456386
Bibliography
Saraiva, J., Zong, Z., & Pereira, R. (2021). Bringing Green Software to Computer Science Curriculum: Perspectives from Researchers and Educators. Proceedings of the 26th ACM Conference on Innovation and Technology in Computer Science Education V. 1, 498–504. https://doi.org/10.1145/3430665.3456386
Zotero
Type:: #zotero/conferencePaper
Zotero::
Keywords:: [✅, Teaching]
Relations
Abstract
Only recently has the software engineering community started conducting research on developing energy efficient software, or green software. This is shadowed when compared to the research already produced in the computer hardware community. While research in green software is rapidly increasing, several recent studies with software engineers show that they still miss techniques, knowledge, and tools to develop greener software. Indeed, all such studies suggest that green software should be part of a modern Computer Science Curriculum. In this paper, we present survey results from both researchers' and educators' perspective on green software education. These surveys confirm the lack of courses and educational material for teaching green software in current higher education. Additionally, we highlight three key pedagogical challenges in bringing green software to computer science curriculum and discussed existing solutions to address these key challenges. We firmly believe that 'green thinking" and the broad adoption of green software in computer science curriculum can greatly benefit our environment, society, and students in an era where software is everywhere and evolves in an unprecedented speed.
Notes & Annotations
📑 Annotations (imported on 2023-03-31#14:10:35)
While in the previous century both computer manufacturers and software developers were mainly focused in producing very fast computer systems, now energy consumption is becoming the main bottleneck when developing such systems
Despite the considerable progress in hardware energy efficiency, only recently have the programming language and software engineering communities started conducting research on developing energy efficient software, or green software.
Research Events
- ICT4S conference
- IGSC conference
- GREENS workshop
- RE4SuSy workshop
- MeGSuS workshop
Publications
Green Data Structures
- Samir Hasan, Zachary King, Munawar Hafiz, Mohammed Sayagh, Bram Adams, and Abram Hindle. 2016. Energy profiles of java collections classes. In Proceedings of the 38th International Conference on Software Engineering. ACM, 225–236.
- Rui Pereira, Marco Couto, Joã Saraiva, Jácome Cunha, and Joã Paulo Fernandes. 2016. The Influence of the Java Collection Framework on Overall Energy Consumption. In Proceedings of the 5th International Workshop on Green and Sustainable Software (GREENS ’16). ACM, 15–21.
- Rui Pereira, Pedro Simão, Jácome Cunha, and João Saraiva. 2018. jStanley: Placing a Green Thumb on Java Collections. In Proceedings of the 33rd ACM/IEEE International Conference on Automated Software Engineering (Montpellier, France) (ASE 2018). ACM, New York, NY, USA, 856–859. https://doi.org/10.1145/3238147.3240473
Green software libraries
- Mario Linares-Vásquez, Gabriele Bavota, Carlos Bernal-Cárdenas, Rocco Oliveto, Massimiliano Di Penta, and Denys Poshyvanyk. 2014. Mining energy-greedy API usage patterns in Android apps: an empirical study. In Proceedings of the 11th Working Conference on Mining Software Repositories. ACM, 2–11.
Green rankings of programming languages
- Rui Pereira, Marco Couto, Francisco Ribeiro, Rui Rua, Jácome Cunha, Joã Paulo Fernandes, and Joã Saraiva. 2017. Energy Efficiency Across Programming Languages: How Do Energy, Time, and Memory Relate?. In Proceedings of the 10th ACM SIGPLAN International Conference on Software Language Engineering (Vancouver, BC, Canada) (SLE 2017). ACM, New York, NY, USA, 256–267. https://doi.org/10.1145/3136014.3136031
Green programming practices/patterns
- Marco Couto, João Saraiva, and João Paulo Fernandes. 2020. Energy Refactorings for Android in the Large and in the Wild. In 2020 IEEE 27th International Conference on Software Analysis, Evolution and Reengineering (SANER). 217–228.
- Luis Cruz and Rui Abreu. 2017. Performance-based Guidelines for Energy Efficient Mobile Applications. In Proceedings of the 4th International Conference on Mobile Software Engineering and Systems (Buenos Aires, Argentina) (MOBILESoft ’17). IEEE Press, Piscataway, NJ, USA, 46–57. https://doi.org/10.1109/MOBILESoft.2017.19
- Ding Li and William G. J. Halfond. 2014. An Investigation into Energy-saving Programming Practices for Android Smartphone App Development. In Proceedings of the 3rd International Workshop on Green and Sustainable Software (Hyderabad, India) (GREENS 2014). ACM, New York, NY, USA, 46–53. https://doi.org/10.1145/2593743.2593750
- Sepideh Maleki, Cuijiao Fu, Arun Banotra, and Ziliang Zong. 2017. Understanding the Impact of Object Oriented Programming and Design Patterns on Energy Efficiency. In 2017 International Workshop on Sustainability in Multi-Many-Core Systems in conjunction with International Green and Sustainable Computing Conference. IEEE.
- R. Morales, R. Saborido, F. Khomh, F. Chicano, and G. Antoniol. 2018. EARMO: An Energy-Aware Refactoring Approach for Mobile Apps. IEEE Transactions on Software Engineering 44, 12 (2018), 1176–1206.
Green software metrics and development
- Sarah Abdulsalam, Ziliang Zong, Qijun Gu, and Meikang Qiu. 2015. Using the Greenup, Powerup, and Speedup metrics to evaluate software energy efficiency. In Proceedings of the 6th International Green and Sustainable Computing Conference. IEEE, 1–8.
- Blake Ford and Ziliang Zong. 2021. PortAuthority: Integrating Energy Efficiency Analysis into Cross-Platform Development Cycles via Dynamic Program Analysis. Journal of Sustainable Computing (2021).
Green repositories
- Rui Rua, Marco Couto, and João Saraiva. 2019. GreenSource: A Large-Scale Collection of Android Code, Tests and Energy Metrics. In 2019 IEEE/ACM 16th International Conference on Mining Software Repositories (MSR). 176–180.
Energy optimization for database
- Divya Mahajan, Cody Blakeney, and Ziliang Zong. 2019. Improving the Energy Efficiency of Relational and NoSQL Databases via Query Optimizations. Journal of Sustainable Computing 22 (2019), 120–133.
Green web
- Bradford Everman and Ziliang Zong. 2018. GreenWeb:Hosting High-Load Websites Using Low-Power Servers. In 2018 International Green and Sustainable Computing Conference (IGSC’18).
Green cloud
- Bradford Everman, Narmadha Rajendrana, Xiaomin Li, and Ziliang Zong. 2021. Improving the Cost Efficiency of Large-scale Cloud Systems Running Hybrid Workloads - A Case Study of Alibaba Cluster Traces. Journal of Sustainable Computing (2021).
- Keke Gai, Meikang Qiu, Hui Zhao, Lixin Tao, and Ziliang Zong. 2016. Dynamic energy-aware cloudlet-based mobile cloud computing model for green computing. Journal of Network and Computer Applications 59 (2016), 46–54.
- Meikang Qiu, Zhong Ming, Jiayin Li, Keke Gai, and Ziliang Zong. 2015. PhaseChange Memory Optimization for Green Cloud with Genetic Algorithm. IEEE Trans. Comput. 64 (2015), 3528 – 3540.
Green AI
- Cody Blakeney, , Xiaomin Li, Yan Yan, and Ziliang Zong. 2021. Parallel Blockwise Knowledge Distillation for Deep Neural Network Compression. IEEE Transactions on Parallel and Distributed Systems 32 (2021), 1765–1776.
- Da Li, Xinbo Chen, Becchi Michela, and Ziliang Zong. 2016. Evaluating the Energy Efficiency of Deep Convolutional Neural Networks on CPUs and GPUs. In 2016 IEEE International Conference on Sustainable Computing and Communications.
- Roy Schwartz, Jesse Dodge, Noah Smith, and Oren Etzioni. 2019. Green AI. https://arxiv.org/abs/1907.10597.
Infrastructure supporting green computing research and education
- Ziliang Zong, Rong Ge, and Qijun Gu. 2017. Marcher: A Heterogeneous System Supporting Energy-Aware High Performance Computing and Big Data Analytics. Journal of Big Data Research 8 (2017), 27–38.
While research in green software is rapidly increasing, several recent studies with software engineers show that they still miss techniques and tools to develop greener software
In fact, all those recent studies show that academia should not only advance state-of-the-art research in green software design, but also educate software engineers towards greener software development. Obviously, this education is best provided from the very beginning of a software engineer career. Unfortunately, today’s undergraduate computer science (CS) education often fails to address our social and environmental responsibility
Question: On a scale of (Highly Disagree) 1-5 (Highly Agree), do you agree that there is enough teaching material available to support a course on green software/computing?
The quickly surging demand for energy efficient computing makes it no longer sufficient for traditional computer science curriculum to train our students with only performance-oriented programming skills and mindset. It is paramount to encourage students to "think green" and write greener code.
Topics covered by the master level course "Green Software Engineering" (University of Minho):
- strategic and aspect oriented programming (compute metrics and transform/refactor source code)
- monitor energy consumption (with RAPL)
- Red smalls + green refactorings (e.g. greeness of Java collections)
- Concept "Energy debt" + monitoring (with E-Debitum plugin for SonarQube)
- fault localization techniques e.g. SPELL)
- Automatic energy-aware program repair
the instructor hosts a green programming competition towards the end of the course. The difficulty of the competition problem is at the medium level of the ACM International Collegiate Programming Contest (ICPC) [3]. Students can choose different programming languages, algorithms, data structures, CPU/GPU with the goal to minimize the energy consumption when solving the same problem with identical input size. For fair comparison, all codes are submitted to and evaluated by the Greencode cloud programming portal
opics include history and road map of hardware energy efficiency, best practices in building green data centers, theories and practices of reducing software energy consumption, energy-aware resource management and scheduling, hands-on experiences on power-measurable systems and software optimizations for energy efficiency. In addition, two weeks of class time are reserved to cover emerging research topics such as green AI, power-aware 5G, and edge computing.
Project Description: Write a program that calculates how many Happy Prime numbers (numbers that are both prime and happy) between 1 and 1 million. A happy or sad number is defined by the following process: Starting with any positive integer, replace the number by the sum of the squares of its digits, and repeat the process until the number either equals 1 (happy) or loops endlessly (sad).
Figure 5 shows the energy consumption results of students’ first and second submissions. Before training, students submitted programs that are highly energy inefficient. For example, 15% of students submitted codes that consumed over 1,000J of energy and no one submitted a solution that consumed less than 5J. After training, 23% of students submitted codes that consumed less than 5J and no one submitted code that consumed over 1,000J.
We strongly recommend integrating green computing/software modules “early” and “often” to existing courses in a way that enhances what is already taught and that melds naturally in a given course.
It is hard to train students how to write green software if we cannot measure the energy consumption of software. Therefore, easy-touse tools that can provide detailed and accurate power measurement play a critical role in green computing and green software education. The lacking of such tools and low cost infrastructure that can support lab experiments in green software courses is clearly one of the key obstacles that prevent educators from introducing green computing/software topics to the CS curriculum.
Since 2015, GreenCode has received nearly 30,000 code submissions and served users from the United States, Asia, Europe, Canada, and South America. It provides instructors and students a free “virtual lab” in the cloud, which significantly reduces the time and cost in setting up a similar power measurable system by themselves. GreenSoft [4] is another platform that allows researchers, educators, and students to publish blogs and share their latest research, teaching and learning experiences in green computing. It helps foster and grow the research and education community in green computing and green software design.
A number of useful tools are also available for energy analysis of applications running on mobile devices. For example, the Android Qualcomm Trepn app [20] can profile hardware usage (GPS, Wifi, etc.), resource usage (memory, CPU), and the power consumption of both the system and any standalone Android app that run on a Snapdragon chipset. PETRA [13] is another model-based tool that can estimate the energy consumption of Android apps at a coarse-grained level. Hardware-based power measurement tools that provide high frequency and high precision profiling (e.g. Monsoon [29]) are also available but they are generally expensive.