Computer-implemented sharing of java classes for increased memory efficiency and communication method
First Claim
1. In a computer system, a method of sharing Java classes comprising the steps of:
- a) a first Java Virtual Machine (JVM) loading an instantiation of a first Java class into a shared memory pool;
b) registering a name of said first Java class into a name table that is used for said shared memory pool;
c) querying said name table on behalf of a second JVM to determine if said first Java class is stored in said shared memory pool, wherein said second JVM is operating on said computer system simultaneously with said first JVM; and
d) said second JVM accessing and utilizing said instantiation of said first Java class from said shared memory pool in lieu of creating a separate instantiation of said first Java class for its own use.
3 Assignments
0 Petitions
Accused Products
Abstract
A computer-implemented method and system for allowing Java classes to be shared among many Java virtual machines (JVMs) including a communication system allowing Java and native applications to readily interoperate. An implementation of the JVM on an operating system platform, e.g., the Aperios AV/OS, allows a variety of applications including desktop applications, applets and Internet based applications, home networking applications, MHEG-6 applets, gaming, gaming applications and next generation audio visual applications to operate with the operating system. The present invention provides a shared memory pool (SMP) into which a JVM and store and register a particular Java class. The stored and registered Java class is then accessible by other JVMs using the SMP and a Java layer class manager that is implemented in software. The Java layer class manager requires other JVMs to access a key for the stored class in order to synchronize access to the Java class among several installed and operating JVMs of the computer system. By sharing common Java classes in this fashion, the memory resource overhead required to operate multiple JVMs on a common computer system is drastically reduced thereby allowing a multiple JVM platform to be operable on an embedded computer system. A novel communication method is also disclosed for communicating information between a JVM application and a native application using the computer system'"'"'s operating system. The novel communication method also allows multiple JVM applications to communicate using the shared memory pool. These functions are incorporated into a JavaLayer that supports the full PersonalJava™ platform.
219 Citations
20 Claims
-
1. In a computer system, a method of sharing Java classes comprising the steps of:
-
a) a first Java Virtual Machine (JVM) loading an instantiation of a first Java class into a shared memory pool;
b) registering a name of said first Java class into a name table that is used for said shared memory pool;
c) querying said name table on behalf of a second JVM to determine if said first Java class is stored in said shared memory pool, wherein said second JVM is operating on said computer system simultaneously with said first JVM; and
d) said second JVM accessing and utilizing said instantiation of said first Java class from said shared memory pool in lieu of creating a separate instantiation of said first Java class for its own use. - View Dependent Claims (2, 3, 4, 5, 6, 7)
said second JVM loading an instantiation of a second Java class into said shared memory pool;
registering a name of said second Java class into said name table;
querying said name table on behalf of a third JVM to determine if said second Java class is stored in said shared memory pool, wherein said third JVM is operating on said computer system simultaneously with said first and said second JVMs; and
said third JVM accessing and utilizing said instantiation of said second Java class from said shared memory pool in lieu of creating a separate instantiation of said second Java class for its own use.
-
-
3. A method as described in claim 1 wherein said step a) comprises the steps of
a1) accessing a write lock associated with said first Java class; -
a2) granting write access of said first Java class to said first JVM when said write lock associated with said first Java class becomes free; and
a3) said first JVM writing said instantiation of said first Java class in response to said step a2).
-
-
4. A method as described in claim 3 wherein said step a3) comprises the steps of:
-
loading said instantiation of said first Java class into blocks of said shared memory space and registering offset and size information regarding said blocks; and
linking said offset and size information with said name of said first Java class.
-
-
5. A method as described in claim 1 wherein said step d) comprises the steps of
d1) accessing a read lock associated with said first Java class; -
d2) granting access of said first Java class to said second JVM when said read lock associated with said first Java class becomes free; and
d3) said second JVM accessing said instantiation of said first Java class in response to said step d2).
-
-
6. A method as described in claim 1 wherein said first JVM has an associated first Java application and wherein said second JVM has an associated second Java application.
-
7. A method as described in claim 1 wherein said first Java class is a Java IO class.
-
8. An embedded computer system having a processor coupled to a bus and a memory device coupled to said bus wherein said memory device contains instructions stored therein that implement a method of sharing Java classes, said method comprising the steps of:
-
a) a first Java Virtual Machine (JVM) loading an instantiation of a first Java class into a shared memory pool;
b) registering a name of said first Java class into a name table that is used for said shared memory pool;
c) querying said name table on behalf of a second JVM to determine if said first Java class is stored in said shared memory pool, wherein said second JVM is operating on said computer system simultaneously with said first JVM; and
d) said second JVM accessing and utilizing said instantiation of said first Java class from said shared memory pool in lieu of creating a separate instantiation of said first Java class for its own use. - View Dependent Claims (9, 10, 11, 12, 13, 14)
said second JVM loading an instantiation of said second Java class into said shared memory pool;
registering a name of said second Java class into said name table;
querying said name table on behalf of a third JVM to determine if said second Java class is stored in said shared memory pool, wherein said third JVM is operating on said computer system simultaneously with said first and said second JVMs; and
said third JVM accessing and utilizing said instantiation of said second Java class from said shared memory pool in lieu of creating a separate instantiation of said second Java class for its own use.
-
-
10. A computer system as described in claim 8 wherein said step a) comprises the steps of
a1) accessing a write lock associated with said first Java class; -
a2) granting write access of said first Java class to said first JVM when said write lock associated with said first Java class becomes free; and
a3) said first JVM writing said instantiation of said first Java class in response to said step a2).
-
-
11. A computer system as described in claim 10 wherein said step a3) comprises the steps of:
-
loading said instantiation of said first Java class into blocks of said shared memory space and registering offset and size information regarding said blocks; and
linking said offset and size information with said name of said first Java class.
-
-
12. A computer system as described in claim 8 wherein said step d) comprises the steps of
d1) accessing a read lock associated with said first Java class; -
d2) granting access of said first Java class to said second JVM when said read lock associated with said first Java class becomes free; and
d3) said second JVM accessing said instantiation of said first Java class in response to said step d2).
-
-
13. A computer system as described in claim 8 wherein said first JVM has an associated first Java application and wherein said second JVM has an associated second Java application.
-
14. A computer system as described in claim 8 wherein said first Java class is a Java 10 class.
-
15. In a computer system, a method of communicating between applications comprising the steps of:
-
a) a first Java Virtual Machine (JVM) loading an instantiation of a first Java class into a shared memory pool;
b) registering a name of said first Java class into a name table that is used for said shared memory pool;
c) querying said name table on behalf of a second JVM to determine if said first Java class is stored in said shared memory pool, wherein said second JVM is operating on said computer system simultaneously with said first JVM;
d) said second JVM accessing and utilizing said instantiation of said first Java class from said shared memory pool in lieu of creating a separate instantiation of said first Java class for its own use; and
e) a first Java application of said first JVM communicating messages to a native application by writing said messages into said shared memory pool and said native application reading said messages from said shared memory pool. - View Dependent Claims (16, 17, 18, 19, 20)
a1) accessing a write lock associated with said first Java class; a2) granting write access of said first Java class to said first JVM when said write lock associated with said first Java class becomes free; and
a3) said first JVM writing said instantiation of said first Java class in response to said step a2).
-
-
19. A method as described in claim 18 wherein said step a3) comprises the steps of:
-
loading said instantiation of said first Java class into blocks of said shared memory space and registering offset and size information regarding said blocks; and
linking said offset and size information with said name of said first Java class.
-
-
20. A method as described in claim 15 wherein said step d) comprises the steps of
d1) accessing a read lock associated with said first Java class; -
d2) granting access of said first Java class to said second JVM when said read lock associated with said first Java class becomes free; and
d3) said second JVM accessing said instantiation of said first Java class in response to said step d2).
-
Specification