Search Images Maps Play YouTube News Gmail Drive More »
Sign in
Screen reader users: click this link for accessible mode. Accessible mode has the same essential features but works better with your reader.

Patents

  1. Advanced Patent Search
Publication numberUS20060168567 A1
Publication typeApplication
Application numberUS 11/040,902
Publication dateJul 27, 2006
Filing dateJan 21, 2005
Priority dateJan 21, 2005
Also published asUS7581216
Publication number040902, 11040902, US 2006/0168567 A1, US 2006/168567 A1, US 20060168567 A1, US 20060168567A1, US 2006168567 A1, US 2006168567A1, US-A1-20060168567, US-A1-2006168567, US2006/0168567A1, US2006/168567A1, US20060168567 A1, US20060168567A1, US2006168567 A1, US2006168567A1
InventorsMark Kressin, Raymond Hornback, James Johnston, William Quinn
Original AssigneeInternational Business Machines Corporation
Export CitationBiBTeX, EndNote, RefMan
External Links: USPTO, USPTO Assignment, Espacenet
Preserving platform independence with native accelerators for performance critical program objects
US 20060168567 A1
Abstract
A method, system and apparatus for preserving platform independence of a program while supporting native accelerators for performance critical program objects. In a method for preserving platform independence of a program while supporting native accelerators for performance critical program objects, the method can include identifying a reference to a program object in a platform independent computer program and determining if a platform specific implementation of the program object has been separately stored in addition to a platform independent implementation of the program object. If it can be determined that a platform specific implementation of the program object has been separately stored in addition to a platform independent implementation of the program object, the platform specific implementation of the program object can be loaded in lieu of the platform independent implementation.
Images(3)
Previous page
Next page
Claims(12)
1. A runtime environment configured to preserve platform independence of a program while supporting native accelerators for performance critical program objects, the environment comprising:
a virtual machine;
a data store of platform independent program object implementations and a data store of platform specific program object implementations; and,
a class loader coupled to said virtual machine and programmed to selectively load platform specific program object implementations for performance critical program objects from said data store of platform specific program object implementations, and otherwise load platform independent program object implementations from said data store of platform independent program object implementations.
2. The runtime environment of claim 1, wherein said class loader is programmed to selectively load said platform specific program based upon selection logic disposed within said class loader.
3. The runtime environment of claim 1, wherein said class loader is programmed to selectively load said platform specific program based upon selection logic disposed within a separate program object and providing a selection to said class loader.
4. The runtime environment of claim 1, wherein said platform independent program object implementations are Java coded classes.
5. The runtime environment of claim 1, wherein said platform independent program object implementations are C# coded classes.
6. The runtime environment of claim 1, wherein said virtual machine comprises a Java runtime environment virtual machine.
7. A method for preserving platform independence of a program while supporting native accelerators for performance critical program objects, the method comprising the steps of:
identifying a reference to a program object in a platform independent computer program;
determining if a platform specific implementation of said program object has been separately stored in addition to a platform independent implementation of said program object; and,
if it is determined that a platform specific implementation of said program object has been separately stored in addition to a platform independent implementation of said program object, loading said platform specific implementation of said program object in lieu of said platform independent implementation.
8. The method of claim 7, wherein said determining step further comprises the step of further determining whether said program object is performance critical.
9. The method of claim 7, further comprising the step of performing said determining and loading steps in a class loader.
10. A machine readable storage having stored thereon a computer program for preserving platform independence of a program while supporting native accelerators for performance critical program objects, the computer program comprising a routine set of instructions which when executed by a machine causes the machine to perform the steps of:
identifying a reference to a program object in a platform independent computer program;
determining if a platform specific implementation of said program object has been separately stored in addition to a platform independent implementation of said program object; and,
if it is determined that a platform specific implementation of said program object has been separately stored in addition to a platform independent implementation of said program object, loading said platform specific implementation of said program object in lieu of said platform independent implementation.
11. The machine readable storage of claim 10, wherein said determining step further comprises the step of further determining whether said program object is performance critical.
12. The machine readable storage of claim 10, further comprising an additional set of instructions which when executed by the machine causes the machine to further perform the step of performing said determining and loading steps in a class loader.
Description
BACKGROUND OF THE INVENTION

1. Statement of the Technical Field

The present invention relates to the field of platform independent computing and more particularly to the management of platform independence for distributable objects in a platform independent computing application.

2. Description of the Related Art

Platform independent computing represents a modern advancement in computer science. The dawn of personal computing initially permitted only platform specific computing in which computer programs could be developed utilizing a particular computer programming language. To transform the generic source code of a computer program to object code required the use of a platform specific compiler and, for more complex programs, a platform specific linker. In particular, the platform specific compiler could be configured to translate the high level source code of the programming language to the specific machine instructions of a particular platform.

Several advantages are known to be associated with traditional, platform specific software development. Most notably, modern, platform specific compilers are known to be tightly coupled to hardware architecture of the underlying computing platform. Consequently, tremendous computing efficiencies can be recognized as the source code for a computer program can be tailored into very specific and highly efficient machine code for a target platform. Yet, platform specific software cannot be easily distributed across computing networks because in many circumstances, the ultimate host platform can differ from the target platform of the compiler which produced the platform specific code.

To address the desire to distribute computer programs to multiple, different host platforms without requiring the distribution of different versions of the same computing object, computer scientists developed platform independent computing technologies such as the Java, Erlang, Dylan and C# computing languages and associated development tools. Platform independent computing technologies allow software developers to develop a single set of source code for all target computing platforms. Compilers for platform independent computing languages typically produce intermediate byte code which can be interpreted at runtime in the target platform utilizing a virtual machine for a platform specific runtime environment.

A virtual machine within a runtime environment generally operates by loading required program objects when required through the operation of a class loader. In particular, class loaders provide the translation technology which can convert serialized byte code into named classes for execution in the virtual machine. Notably, class loaders can perform this conversion regardless of the storage means and location of the byte code. As a result, the virtual machine need not know the operational specifics associated with the file systems storing the byte code.

Given the pre-processing required by the virtual machine to interpret and translate the intermediate byte code of a platform independent computer program, it is well-known that platform independent code can be slower in execution than its platform specific counterparts. Even though some runtime environments can be highly optimized for a host platform, on occasion, different program objects can be created and utilized across multiple, different runtime environments. Hence, not all code in a platform independent computer program can remain optimized for a host platform.

Many assume that the performance problem of the platform independent paradigm has become insurmountable and have accepted the associated performance deficiencies. Yet others refuse to accept these deficiencies and, to address the operational deficiencies of such an environment, many developers resort to coding platform specific code for performance critical sections of a computer program. Yet, to do so can break the platform independence of the computer program.

SUMMARY OF THE INVENTION

The present invention addresses the deficiencies of the art in respect to platform independent computer programming and provides a novel and non-obvious method, system and apparatus for preserving platform independence with native accelerators for performance critical program objects. In this regard, a runtime environment which has been configured to preserve platform independence of a program while supporting native accelerators for performance critical program objects can include a virtual machine. The environment further can include a data store of platform independent program object implementations and a data store of platform specific program object implementations. Finally, the environment can include a class loader coupled to the virtual machine.

Importantly, the class loader can be programmed to selectively load platform specific program object implementations for performance critical program objects from the data store of platform specific program object implementations. Specifically, the class loader can load the platform specific program objects where such objects exist in addition to a platform independent implementation of the same program object. Otherwise the class loader can load platform independent program object implementations from the data store of platform independent program object implementations.

In a method for preserving platform independence of a program while supporting native accelerators for performance critical program objects, the method can include identifying a reference to a program object in a platform independent computer program and determining if a platform specific implementation of the program object has been separately stored in addition to a platform independent implementation of the program object. If it can be determined that a platform specific implementation of the program object has been separately stored in addition to a platform independent implementation of the program object, the platform specific implementation of the program object can be loaded in lieu of the platform independent implementation.

Notably, aside from the clear performance benefits of the present invention, the present invention also can provide significant development time and cost savings benefits. Specifically, through the use of the present invention, a software vendor can create a platform independent implementation of a program object and, only when required, need the vender provide a native implementation in order to enhance performance on key platforms. Thus, these native implementations can become a “drop in” and can be used only if found. Another advantage of this “drop in” native implementation approach is that it can be easy for a software vendor to pass the burden of the development of native implementations of performance critical program objects to other venders.

Additional aspects of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. The aspects of the invention will be realized and attained by means of the elements and combinations particularly pointed out in the appended claims. It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention, as claimed.

BRIEF DESCRIPTION OF THE DRAWINGS

The accompanying drawings, which are incorporated in and constitute part of this specification, illustrate embodiments of the invention and together with the description, serve to explain the principles of the invention. The embodiments illustrated herein are presently preferred, it being understood, however, that the invention is not limited to the precise arrangements and instrumentalities shown, wherein:

FIG. 1 is a schematic illustration of a virtual machine configured to preserve platform independence with native accelerators for performance critical program objects; and,

FIG. 2 is a flow chart illustrating a process for preserving platform independence with native accelerators for performance critical program objects.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

The present invention is a method, system and apparatus for preserving platform independence with native accelerators for performance critical program objects. In accordance with the present invention, a virtual machine can be configured with a custom class loader programmed to selectively load program objects based upon whether the named program object is deemed performance critical. For a program object deemed to be performance critical in nature, the class loader first can attempt to load a platform specific, “native” implementation of the program object. If a platform specific implementation of the program object cannot be located or loaded, a platform independent, “generic” implementation of the program object can be loaded instead.

In this way, the platform independence of the computer program can be preserved, while platform specific implementation of critical program objects can be utilized to avoid the performance deficiencies of the conventional virtual machine. In this regard, a purely platform independent architecture always can be presumed excepting for when a performance critical object is to be loaded. Even then, however, a platform independent program object can be loaded unless a native accelerated implementation can be located. Consequently, at any time a native accelerated implementation for a performance critical program object can be provided without breaking the platform independent nature of the computer program.

In further illustration, FIG. 1 is a schematic illustration of a virtual machine configured to preserve platform independence with native accelerators for performance critical program objects. The virtual machine 110 can include a class loader 200 programmed to load designated program objects, for instance according to the name of the program object. Unlike conventional class loaders, however, the class loader 200 of the present invention can attempt to load designated program objects referenced within a platform independent program 100 by first seeking a native, accelerated, platform specific form of the objects 150 in a data store of platform specific objects 130. To the extent that a platform specific form of a reference program object cannot be located in the data store of platform specific objects 130, a default, platform independent form of the objects 140 can be loaded from a data store of platform independent objects 120.

In more particular illustration, FIG. 2 is a flow chart illustrating a process for preserving platform independence with native accelerators for performance critical program objects. Beginning in block 210, a platform independent computer program can be loaded which can reference one or more program objects such as Java classes and the like. In block 220, the loaded program can be interpreted and program object references can be identified and processed until the program ends in decision block 240 leading to block 290.

Whenever an object reference is identified in decision block 230, in block 250 a data store of native, accelerated, platform specific object implementations can searched to determine if a native, accelerated, platform specific implementation for the referenced object can be located. If in decision block 260 a native, accelerated, platform specific implementation for the referenced object can be located, in block 270 the located program object can be loaded. Otherwise, in block 280, a default, platform independent implementation of the referenced program object can be loaded.

Importantly, native versions of performance critical program objects can be implemented for any desired platform that enjoys the use of a class loader paradigm through a virtual machine or other platform independent code interpreter. The class loader can locate the native implementations where available and otherwise the class loader can utilize default implementations. Consequently, it is not necessary to deliver all native accelerators for a target platform at once. Rather, if a native version of a performance critical program object is found among those delivered, it is used. If not, the default version can be used until such time as a native version can be located.

In an alternative and preferred aspect of the invention, a class loader which differs from a standard class loader need not be provided. Rather, in the alternative aspect of the invention, both a native implementation and a default implementation of a program object can be provided and logic within the default program object can be provided to specify to the default class loader which implementation to utilize at runtime. In this way, providing a custom class loader to include the foregoing logic as described in FIG. 2 will not be required. Rather, the logic can be provided within a program object.

The present invention can be realized in hardware, software, or a combination of hardware and software. An implementation of the method and system of the present invention can be realized in a centralized fashion in one computer system, or in a distributed fashion where different elements are spread across several interconnected computer systems. Any kind of computer system, or other apparatus adapted for carrying out the methods described herein, is suited to perform the functions described herein.

A typical combination of hardware and software could be a general purpose computer system with a computer program that, when being loaded and executed, controls the computer system such that it carries out the methods described herein. The present invention can also be embedded in a computer program product, which comprises all the features enabling the implementation of the methods described herein, and which, when loaded in a computer system is able to carry out these methods.

Computer program or application in the present context means any expression, in any language, code or notation, of a set of instructions intended to cause a system having an information processing capability to perform a particular function either directly or after either or both of the following a) conversion to another language, code or notation; b) reproduction in a different material form. Significantly, this invention can be embodied in other specific forms without departing from the spirit or essential attributes thereof, and accordingly, reference should be had to the following claims, rather than to the foregoing specification, as indicating the scope of the invention.

Referenced by
Citing PatentFiling datePublication dateApplicantTitle
US7546593 *May 28, 2004Jun 9, 2009Sap AgCommon class loaders
US7703089Apr 29, 2005Apr 20, 2010Sap AgCompatibility framework using versioning class loaders
US7904547Feb 21, 2006Mar 8, 2011International Business Machines CorporationMethod, system, and program product for optimizing monitoring and discovery services for a grid computing environment
US8117611 *Mar 1, 2006Feb 14, 2012International Business Machines CorporationMethod, system, and program product for deploying a platform dependent application in a grid environment
US8286157Feb 28, 2005Oct 9, 2012International Business Machines CorporationMethod, system and program product for managing applications in a shared computer infrastructure
US8612960May 6, 2009Dec 17, 2013Sap AgCommon class loaders
US8683453Nov 30, 2006Mar 25, 2014Motorola Mobility LlcSystem for overriding interpreted byte-code with native code
US20130097596 *Jun 6, 2012Apr 18, 2013Google Inc.Selective notification of native applications
WO2008067357A2Nov 28, 2007Jun 5, 2008Motorola IncSystem for overriding bytecode, which should be interpreted, with native code, which can be directly executed
Classifications
U.S. Classification717/124
International ClassificationG06F9/44
Cooperative ClassificationG06F9/44536
European ClassificationG06F9/445
Legal Events
DateCodeEventDescription
Jul 30, 2013SULPSurcharge for late payment
Jul 30, 2013FPAYFee payment
Year of fee payment: 4
Apr 8, 2013REMIMaintenance fee reminder mailed
Sep 14, 2010CCCertificate of correction
Feb 15, 2005ASAssignment
Owner name: INTERNATIONAL BUSINESS MACHINES CORPORATION, NEW Y
Free format text: ASSIGNMENT OF ASSIGNORS INTEREST;ASSIGNORS:KRESSIN, MARK S.;HORNBACK, RAYMOND R., JR.;JOHNSTON, JAMES S.;AND OTHERS;REEL/FRAME:015721/0764;SIGNING DATES FROM 20050113 TO 20050118