Method and apparatus for sharing code containing references...

Data processing: database and file management or data structures – Database design – Data structure types

Reexamination Certificate

Rate now

  [ 0.00 ] – not rated yet Voters 0   Comments 0

Details

C707S793000

Reexamination Certificate

active

06799173

ABSTRACT:

BACKGROUND
1. Field of the Invention
The present invention relates to operating systems for computers. More specifically, the present invention relates to a method and an apparatus that facilitates sharing objects between multiple processes, wherein the objects contain embedded references to non-shared objects.
2. Related Art
The idea of sharing executable code among operating system processes gained widespread acceptance in mid-1980s, with the introduction of shared libraries. The use of shared libraries lowers the system-wide memory footprint and enables faster application start-up. Moreover, providing support for sharing libraries at the operating system level frees programmers from having to code the sharing themselves. Today, shared libraries are an entrenched concept, available in optimized forms in most operating systems.
As a result of the popularity of the Java™ programming language, many computers have the Java virtual machine (JVM™) installed on them. (The terms “Sun Microsystems”, “Java”, “Java virtual machine” and “JVM” are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and other countries.) Each such computer may be running many Java applications at any given time. One may ask whether in these settings the concept of sharing executable code (which in the context of the JVM includes runtime representation of classes, methods, their bytecodes, and compiled code of methods generated by a just-in-time or dynamic compiler) across multiple virtual machines might be as beneficial for the scalability of the JVM as the notion of shared libraries has been for operating systems.
Several characteristics of the Java programming language and of the JVM make sharing of executable code challenging. First, dynamic class loading makes the granularity of sharable unit small—at most a class. Second, the size and format of executable code evolve during program execution as the JVM identifies target methods for optimizations and compiles selected methods. Third, executable code is often intertwined with the runtime state of a program. For example, references to objects subject to garbage collection are often embedded in executable code.
Despite these challenges, sharing of metadata remains attractive because of its potential to decrease the memory footprint of virtual machines and to factor out costs related to on-demand class loading (e.g., parsing, verification, dynamic link resolution) and to architecture neutrality of class files (e.g., runtime quickening of interpreted code and runtime compilations).
What is needed is method and an apparatus that facilitates sharing code between multiple virtual machines and/or processes in a manner that efficiently deals with the above-described challenges.
SUMMARY
One embodiment of the present invention provides a system that facilitates sharing an object containing embedded references to non-shared objects, which may be located at different virtual memory addresses in different processes. During operation, the system looks up the object in a shared memory area, wherein the shared memory area is mapped to the same virtual address by all sharing processes. If the object does not exist in the shared memory area, the system creates the object within the shared memory area, and sets embedded references in the object to point to entries in an indirection table located at a second virtual address, wherein each sharing process maintains its own private version of the indirection table at the same second virtual address. Next, the system performs a private initialization operation on the object for a specific process by setting references in the private version of the indirection table for the specific process to point to non-shared objects located in a private memory area for the specific process. In this way, the system allows each sharing process to maintain its own private versions of the non-shared objects.
In a variation on this embodiment, setting embedded references in the object to point to entries in the indirection table involves first allocating space in the indirection table for the embedded references.
In a variation on this embodiment, prior to looking up the object, the system initializes the shared memory area so that the shared memory area can be accessed by all sharing processes. The system also ensures that all sharing processes map the shared memory area to the same first virtual address. It also ensures that all sharing processes map their private versions of the indirection table to the same second virtual address.
In a variation on this embodiment, the object includes a software component.
In a variation on this embodiment, the object includes class metadata. In this variation, the object lookup takes place during a dynamic class loading process.
In a variation on this embodiment, the object includes a compiled method that is compiled from platform-independent code into processor native code. In this variation, the object lookup takes place during a dynamic compilation process.
In a variation on this embodiment, each of the sharing processes executes a separate instance of a platform-independent virtual machine.


REFERENCES:
patent: 6067577 (2000-05-01), Beard
patent: 6216237 (2001-04-01), Klemm et al.
patent: 6519605 (2003-02-01), Gilgen et al.
patent: 6584487 (2003-06-01), Saboff
patent: 6728963 (2004-04-01), Forin et al.

LandOfFree

Say what you really think

Search LandOfFree.com for the USA inventors and patents. Rate them and share your experience with other people.

Rating

Method and apparatus for sharing code containing references... does not yet have a rating. At this time, there are no reviews or comments for this patent.

If you have personal experience with Method and apparatus for sharing code containing references..., we encourage you to share that experience with our LandOfFree.com community. Your opinion is very important and Method and apparatus for sharing code containing references... will most certainly appreciate the feedback.

Rate now

     

Profile ID: LFUS-PAI-O-3227189

  Search
All data on this website is collected from public sources. Our data reflects the most accurate information available at the time of publication.