Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
en:multiasm:papc:chapter_6_14 [2025/11/15 12:36] ktokarzen:multiasm:papc:chapter_6_14 [2025/11/18 11:08] (current) ktokarz
Line 2: Line 2:
 Energy-efficient programming is crucial while we consider the influence of the program execution, computation, and data processing on the amount of energy which is consumed during the process. Energy-efficient programming is crucial while we consider the influence of the program execution, computation, and data processing on the amount of energy which is consumed during the process.
  
-During computations, the processor typically consumes the majority of the energy. On average, the CPU consumes almost 90% of the energy, with the remaining energy consumed mainly by memory((https://dl.acm.org/doi/10.1145/3136014.3136031)). This is true regardless of the programming language type. It does not matter if the language is compiled, interpreted, or virtual.+During computations, the processor typically consumes the majority of the energy. On average, the CPU consumes almost 90% of the energy, with the remaining energy consumed mainly by memory((https://dl.acm.org/doi/10.1145/3136014.3136031)). This is true regardless of the programming language type. It does not matter if the language is compiled or interpreted.\\
  
-== Cytaty == +Energy efficiency is going to be a popular topic in research and among major players in the information technology industryThis goal can be achieved through improvements in hardware technology. Modern processors and system-on-chip integrated circuits (which play the role of the processor in highly integrated gadgets like smartphones, tablets, IoT units and other similar devices) implement a selection of power modes allowing them to turn off the power for unused internal modules. Additionally, the operating system can adjust the clock frequency to meet the current software demand. These techniques drastically reduce the overall device's power consumption, but there is still a potential for further improvement through efficient software implementation. 
-Now, software energy efficiency is going mainstreamIt is increasingly common to see smartphone users avoiding CPU-intensive apps just to get a bit more out of the phone battery. Even cloud-based systems are paying attention to software energy efficiency because of its impact on the carbon emissions of data centers((https://www.digikey.pl/pl/blog/compact-code-and-energy-efficient-software)). +The need to reduce energy consumption in consumer electronics can influence the battery life of smartphones. Users try to avoid CPU-intensive apps to get a bit more time out of the phone battery. Owners of big data centres and cloud computing systems pay attention to software energy efficiency, understanding that it impacts the carbon emissions of data centres ((https://www.digikey.pl/pl/blog/compact-code-and-energy-efficient-software)).
  
-Consumed power by running code in a digital system is described by the formula: +The energy consumed by the computer running the software depends on the execution time, clock frequency and average power consumption of the hardware. It can't be expressed with a simple formulabut in general, all coefficients are directly proportional. If the power, time or frequency increases, the energy consumption also grows. It indicates where one can look for reductions in the energy needed to perform a task. It is worth noting that for the same code, the time and frequency are interdependentIf the system runs faster, the time of task execution will be shorterThis means that the code efficiency relies on the number of cycles the software requires to complete the task. This leads to the conclusion that reducing the number of instructions can further reduce energy consumption and make the computation more environmentally friendly. There are two main possible approaches to reduce the number of instructions: 
-P = ΔT x F x U x I +  * improve algorithm, 
-where F is the frequency clocking the digital componentsΔT the code run time and +  * optimise the executable code. 
-U and I are voltage value and current ratingMinimizing the average F is discussed at +Code optimisation is implemented well in modern compilers. The machine code is generated using techniques that reduce the number of unwanted instructions, like loop unrollingCompilers enable data parallelism with the extensive use of vector calculationsHowever, because they must be universal, the output code is always generic in some elements, and a good assembler programmer can identify places for improvement. 
-point BMinimizing ΔT means to cut the number of clocks at the average F using + 
-programming techniques on the HLL or use Parallel Assembly instructions for integer +In certain computer systems, it is possible to reduce energy consumption by modifying the approach to software implementation from continuous execution to interrupt-driven execution. In continuous executionthe software continually executes the infinite loop and reads data from the input elements at regular intervalsIn an interrupt-driven approachthe processor enters the idle state when there is nothing to be done. Input devices signal when new data appearsindicating a need to wake the processor up to execute the necessary part of the codeIn the Windows operating systempower management is implemented as part of system functionalityand user software can't control devices and their mode of operationDevices are controlled using drivers provided by their vendorsInterrupt handlers are elements of these drivers. 
-or float data types ((IossifovV(2021)Programming Techniques for Energy-Efficient Software. In: GeorgievI., KostadinovH., LilkovaE(eds) Advanced Computing in Industrial MathematicsBGSIAM 2018Studies in Computational Intelligencevol 961SpringerChamhttps://doi.org/10.1007/978-3-030-71616-5_15)).+ 
 +The most important thing to consider when writing a program in any programming language is to cooperate with the processor and not work against it. This includes the proper placement of data in memorytaking into account both alignment and cacheability, avoiding conditional jumps, manually unrolling loops, and utilising the maximum possible register sizes available in the machineThese are just a few examples. As a ruleassembly language programming, because the user knows what they want to achieve, usually allows for better code optimisation than compiler-generated codeOf course, this comes at the cost of more time spent writing the program and the increased potential for errorsIt also requires extensive knowledge and experience from the programmerHowever, it's essential to remember that a program written in assembly language does exactly what the programmer intended and is not dependent on fragments of code, sometimes completely unknown, when using external libraries.
  
-The course on energy efficient programming ((https://open.hpi.de/courses/cleanIT-x862022)). 
en/multiasm/papc/chapter_6_14.1763210209.txt.gz · Last modified: 2025/11/15 12:36 by ktokarz
CC Attribution-Share Alike 4.0 International
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0