The present invention relates to computer systems, and particularly relates to a method and system of creating at least one functional equivalent code segment of at least one original code segment of a computer software program with a lower energy footprint, configured to operate on at least one computer system.
In the recent years, government incentives, emerging business models, and an awakening consciousness regarding the global environment has stewarded renewed interest, at least in corporations, in creating and implementing environmentally friendly saving initiatives throughout their organizations. In the information technology field, this effort has centered around reducing the energy consumption needs for the computer software programs and computer systems that are the backbone of information processing infrastructures.
To date, very little emphasis has been placed on the energy of computer software code. The energy of computer software code is the energy consumed when the piece of code is run on a particular piece of data on a particular computer system.
A computer system typically has a platform map. A platform map is a lookup table of the basic assembly language commands supported by the computer system in question (which is normally based on the chip and/or motherboard of the computer system) and the energy consumption needs of each of the commands. In other embodiments of this invention, the Platform Map is provided by the chipset or motherboard manufacturer.
One prior art system is a Green Hardware Solution (GHS). A GHS focuses on manipulating the power consumption of devices, irrespective of the applications being executed on the devices. A GHS system would typically make such a device go into standby mode after a set number of minutes of idle time and switching monitor intensity to the bare minimum. GHSs are targeted at particular devices that follow a specific manufacturing process and whose characteristics are known to the GHS maker.
An example of a GHS system are Transmeta techniques for lowering hardware power by manipulating the hardware. The techniques entail a “suite of advanced power management, leakage control and process compensation technologies that can diminish the negative effects of increasing power and process variations in advanced semiconductor designs.” Transmeta “provides supporting hardware blocks to enable rapid adoption of LongRun2 Technology into either existing designs or new designs.” “Active power is the amount of power a semiconductor device consumes during operation and is a combination of dynamic power and leakage power. While the leakage component was negligible in the 130 nm generation and prior, it is a significant component of power in 90 nm and finer geometries. LongRun2 Technology can reduce both the worst case active power as well as the nominal (or average) power consumption.” (See TransMeta LongRun2 Power Management Technology.)
Green Software Solution
Another prior art system is a Green Software Solution (GSS). A GSS focuses on reducing the power footprint of a computer software program to be executed. GSSs are targeted at all programs running on particular families of computer instruction sets.
One example of a GSS system is a “reduce power for laptop” tool. A “reduce power for laptop” tool focuses on strategies for manipulating the power states of a device in/on a computer system. Ultimately, a “reduce power for laptop” tool focuses on hardware management strategies, such as finding a (minimal) balance between switching power and leakage power or strategies for lowering standby power.
Another example of a GSS system is Dynamically Architected Instruction Set from Yorktown (DAISY). DAISY addresses the issue of lack of compatibility between VLIW (Very long Instruction Word) architectures and more popular architectures (e.g., PowerPC, Intel x86). DAISY works as follows: “Each time a new fragment of code (such as a page) is executed for the first time, the code is translated to simple RISC-like primitives, parallelized and saved in a portion of main memory not visible to the old architecture. Subsequent executions of the same fragment do not require a translation (unless cast out)”. DAISY “includes new fast compiler algorithms for accomplishing the dynamic translation and parallelization across multiple paths and loop iteration boundaries”. (See IBM TJ Watson Research Center, Dynamically Architected Instruction Set from Yorktown (DAISY) Research Report.) Namely,
Referring to
Therefore, a method and system of creating at least one functional equivalent code segment of at least one original code segment of a computer software program with a lower energy footprint, configured to operate on at least one computer system, is needed.
The present invention provides a method and system of creating at least one functional equivalent code segment of at least one original code segment of a computer software program with a lower energy footprint, configured to operate on at least one computer system. In an exemplary embodiment, the method and system include (1) creating at least one alternative code segment of the original code segment using at least one re-coding rule, (2) calculating a required energy consumption of the original code segment, (3) finding a required energy consumption of the alternative code segment, (4) comparing the required energy consumption of the original code segment with the required energy consumption of the alternative code segment, and (5) returning the functional equivalent code segment corresponding to the code segment with the minimum required energy consumption with respect to the results of the comparing. In an exemplary embodiment, the present invention further includes providing the difference between a required energy consumption of the functional equivalent code segment and the required energy consumption of the original code segment.
In an exemplary embodiment, the calculating includes (a) rewriting the original code segment into at least one computer instruction executable by the computer system, (b) determining the amount of energy required to be consumed for performing the instruction on the computer system, and (c) providing the required energy consumption of the original code segment based on the determining. In an exemplary embodiment, the rewriting includes converting the original code segment into at least one assembly language instruction executable by the computer system. In an exemplary embodiment, the determining includes determining the amount of energy required to be consumed for performing the instruction on the computer system from a platform map for the computer system.
In an exemplary embodiment, the finding includes (a) rewriting the alternative code segment into at least one computer instruction executable by the computer system, (b) determining the amount of energy required to be consumed for performing the instruction on the computer system, and (c) providing the required energy consumption of the alternative code segment based on the determining. In an exemplary embodiment, the rewriting includes converting the alternative code segment into at least one assembly language instruction executable by the computer system. In an exemplary embodiment, the determining includes determining the amount of energy required to be consumed for performing the instruction on the computer system from a platform map for the computer system.
The present invention provides a method and system of creating at least one functional equivalent code segment of at least one original code segment of a computer software program with a lower energy footprint, configured to operate on at least one computer system. In an exemplary embodiment, the method and system include (1) creating at least one alternative code segment of the original code segment using at least one re-coding rule, (2) calculating a required energy consumption of the original code segment, (3) finding a required energy consumption of the alternative code segment, (4) comparing the required energy consumption of the original code segment with the required energy consumption of the alternative code segment, and (5) returning the functional equivalent code segment corresponding to the code segment with the minimum required energy consumption with respect to the results of the comparing.
Referring to
Referring to
Referring to
Rewriting
Referring to
Determining
Referring to
Referring to
Rewriting
Referring to
Determining
Referring to
The present invention can take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment containing both hardware and software elements. In an exemplary embodiment, the present invention is implemented in software, which includes but is not limited to firmware, resident software, and microcode.
Furthermore, the present invention can take the form of a computer program product accessible from a computer-usable or computer-readable medium providing program code for use by or in connection with a computer system or any instruction execution system. The computer program product includes the instructions that implement the method of the present invention. A computer-usable or computer readable medium can be any apparatus that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device. The medium can be an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system (or apparatus or device) or a propagation medium. Examples of a computer-readable medium include a semiconductor or solid-state memory, magnetic tape, a removable computer diskette, a random access memory (RAM), a read-only memory (ROM), a rigid magnetic disk, and an optical disk. Current examples of optical disks include compact disk-read only memory (CD-ROM), compact disk-read/write (CD-R/W), and DVD.
A computer system suitable for storing and/or executing program code includes at least one processor coupled directly or indirectly to memory elements through a system bus. The memory elements include local memory employed during actual execution of the program code, bulk storage, and cache memories that provide temporary storage of at least some program code to reduce the number of times code is retrieved from bulk storage during execution. Input/output (I/O) devices (including but not limited to keyboards, displays, pointing devices, etc.) can be coupled to the computer system either directly or through intervening I/O controllers. Network adapters may also be coupled to the computer system in order to enable the computer system to become coupled to other computer systems or remote printers or storage devices through intervening private or public networks. Modems, cable modems, and Ethernet cards are just a few of the currently available types of network adapters. The computer system can also include an operating system and a computer file-system.
Having fully described a preferred embodiment of the invention and various alternatives, those skilled in the art will recognize, given the teachings herein, that numerous alternatives and equivalents exist which do not depart from the invention. It is therefore intended that the invention not be limited by the foregoing description, but only by the appended claims.