Computer system with multiple heaps

Electrical computers and digital processing systems: memory – Address formation – Address mapping

Reexamination Certificate

Rate now

  [ 0.00 ] – not rated yet Voters 0   Comments 0

Details

C711S206000, C711S170000

Reexamination Certificate

active

06804765

ABSTRACT:

FIELD OF THE INVENTION
The invention relates to a computer system supporting an object-oriented environment having storage, at least a portion of which is divided into multiple heaps.
BACKGROUND OF THE INVENTION
Programs written in the Java programming language (Java is a trademark of Sun Microsystems Inc) are generally run in a virtual machine environment, rather than directly on hardware. Thus a Java program is typically compiled into byte-code form, and then interpreted by a Java virtual machine (JVM) into hardware commands for the platform on which the JVM is executing. The JVM itself is an application running on the underlying operating system. An important advantage of this approach is that Java applications can run on a very wide range of platforms, providing of course that a JVM is available for each platform.
Java is an object-oriented language. Thus a Java program is formed from a set of class files having methods that represent sequences of instructions (somewhat akin to subroutines). A hierarchy of classes can be defined, with each class inheriting properties (including methods) from those classes which are above it in the hierarchy. For any given class in the hierarchy, its descendants (i.e. below it) are call subclasses, whilst its ancestors (i.e. above it) are called superclasses. At run-time objects are created as instantiations of these class files, and indeed the class files themselves are effectively loaded as objects. One Java object can call a method in another Java object. In recent years Java has become very popular, and is described in many books, for example “Exploring Java” by Niemeyer and Peck, O'Reilly & Associates, 1996, USA, and “The Java Virtual Machine Specification” by Lindholm and Yellin, Addison-Wedley, 1997, USA.
The standard JVM architecture is generally designed to run only a single application, although this can be multi-threaded. In a server environment used for database transactions and such-like, each transaction is typically performed as a separate application, rather than as different threads within an application. This is to ensure that every transaction starts with the JVM in a clean state. In other words, a new JVM is started for each transaction (i.e. for each new Java application). Unfortunately however this results in an initial delay in running the application (the reasons for this will be described in more detail later). The overhead due to this frequent starting and then stopping a JVM as successive transactions are processed is significant, and seriously degrades the scalability of Java server solutions.
Various attempts have been made to mitigate this problem. EP-962860-A describes a process whereby one JVM can fork into a parent and a child process, this being quicker than setting up a fresh JVM. The ability to run multiple processes in a Java-like system, thereby reducing overhead per application, is described in “Processes in KaffeOS: Isolation, Resource Management, and Sharing in Java” by G back, W Hsieh, and J Lepreau.
Another approach is described in “Oracle JServer Scalability and Performance” by Jeremy Litzt, July 1999. The JServer product available from Oracle Corporation, USA, supports the concept of multiple sessions (a session effectively representing a transaction or application), each session including a JServer session. Resources such as read-only bytecode information are shared between the various sessions, but each individual session appears to its JServer client to be dedicated conventional JVM.
U.S. patent application Ser. No. 09/304,160, filed 30 Apr. 1999, now U.S. Pat. No. 6,694,346 (“A long Running Reusable Extendible Virtual Machine”), assigned to IBM Corporation (IBM docket YOR9-1999-0170), discloses a virtual machine (VM) having two types of heap, a private heap and a shared heap. The former is intended primarily for storing application classes, whilst the latter is intended primarily for storing system classes and, as its name implies, is accessible to multiple VMs. A related idea is described in “Building a Java virtual machine for server applications: the JVM on OS/390 by Dillenberger et at, IBM Systems Journal, Vol 39/1, January 2000. Again this implementation uses a shared heap to share system and potentially application classes for reuse by multiple workers, with each worker JVM also maintaining a private or local heap to store data private to that particular JVM process.
The above documents are focused primarily on the ability to easily run multiple JVMs in parallel. A different (and potentially complementary) approach is based on a serial rather than parallel configuration. Thus it is desirable to run repeated transactions (i.e. applications) on the same JVM, since this could avoid having to reload all the system classes at the start of each application. However, one difficulty with this is that each application expects to run on a fresh, clean, JVM. There is a danger with serial re-use of a JVM that the state left from a previous transaction somehow influences the outcome of a new transaction. This unpredictability is unacceptable in most circumstances.
U.S. patent application Ser. No. 09/584,641 filed 31 May 2000 “pending” in the name of IBM Corporation (IBM docket number GB9-2000-0061) discloses an approach for providing a JVM with a reset capability. U.S. provisional application No. 60/208,268 also filed 31 May 2000 in the name of IBM Corporation (IBM docket number YOR9-2000-0359) discloses the idea of having two heaps in a JVM. One of these is a transient heap, which is used to store transaction objects that will not persist into the next transaction, whilst a second heap is used for storing objects, such as system objects, that will persist. This approach provides potentially an ongoing process throughout the running of a program.
SUMMARY OF THE INVENTION
Accordingly the invention provides a computer system providing an object-based environment, said computer system including storage, at least a portion of which is logically divided into two or more heaps in which objects can be stored, each heap being subdivided into slices of memory, said system including a two-level lookup structure for determining whether a given storage address corresponds to a particular heap, said lookup structure comprising:
a first level having one or more lookup substructures, each corresponding to a unit of memory representing a predetermined number of slices, and indicating for each of these slices the particular heap, if any, that the slice belongs to; and
a second level providing means for determining for a given memory address the first level lookup substructure that includes the slice containing that address.
In the preferred embodiment, a given memory address is processed by firstly using the second level lookup means to determine the relevant first level lookup substructure, and secondly using the determined first level lookup substructure to identify the heap, if any, that the slice containing the given memory address belongs to. This provides a very quick mechanism for determining, for any given memory address, which heap that address is in (if any). This is particularly useful, for example, in a situation where the properties of the heaps, such as their garbage collection characteristics, are different.
Preferably, storage is only added to or removed from a heap in terms of an integral number of slices, to avoid the complexity of handling part slices. Typically the size of a slice is significantly greater than the minimum size of an object on the heap, thereby reducing the overall size of the lookup structure.
In the preferred embodiment, each first level lookup substructure comprises a linear array of bytes, with the Nth byte in the array corresponding to the Nth slice in the first level lookup substructure, and identifying which particular heap it belongs to. Similarly the second level lookup means comprises a linear array of pointers, in which the Nth pointer in the array references the first level lookup substructure corresponding to the Nth memory unit. This configuration ensures that

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

Computer system with multiple heaps does not yet have a rating. At this time, there are no reviews or comments for this patent.

If you have personal experience with Computer system with multiple heaps, we encourage you to share that experience with our LandOfFree.com community. Your opinion is very important and Computer system with multiple heaps will most certainly appreciate the feedback.

Rate now

     

Profile ID: LFUS-PAI-O-3313880

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