Method for improving the performance of safe language multitasking
First Claim
1. A method for sharing a class among a plurality of applications in a multitasking computer system, the method comprising:
- a first thread of a first application invoking a method of the class, wherein the method comprises an identifier, and wherein the identifier initially comprises an original value which associates the method with the first thread;
modifying the identifier in response to the first thread invoking the method such that the identifier comprises a temporary value, wherein the temporary value indicates that a single copy of the class is to be shared by the plurality of applications in the multitasking computer system;
exiting the method; and
modifying the identifier in response to the exiting the method such that the identifier comprises the original value which associates the method with the first thread.
2 Assignments
0 Petitions
Accused Products
Abstract
A system and method are provided for isolating the execution of a plurality of applications which access shared data. A limited number of special classes encapsulate data that should be shared by all classes in the multitasking system. Static fields of all classes, including the special classes, are virtualized such that each application has its own copy of static fields and class monitors. However, a special class has special program code associated with it, such that an invocation of any of the methods of the special class causes a switch of an application ID associated with the thread (referred to herein as an effective thread application ID or TA-ID) to a constant value. Thus, the applications may access a single, shared copy of the special class. The TA-ID may be changed back to the original value upon exiting one of the methods. Although one instance of identifier-switching is typically more costly than one instance of determining whether a class is special, the identifier-switching may be performed only for special classes rather than for all classes. The common case may therefore be optimized.
60 Citations
32 Claims
-
1. A method for sharing a class among a plurality of applications in a multitasking computer system, the method comprising:
-
a first thread of a first application invoking a method of the class, wherein the method comprises an identifier, and wherein the identifier initially comprises an original value which associates the method with the first thread;
modifying the identifier in response to the first thread invoking the method such that the identifier comprises a temporary value, wherein the temporary value indicates that a single copy of the class is to be shared by the plurality of applications in the multitasking computer system;
exiting the method; and
modifying the identifier in response to the exiting the method such that the identifier comprises the original value which associates the method with the first thread. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11)
-
-
12. A system for sharing a class among a plurality of applications in a multitasking computer system, the system comprising:
-
a class comprising program instructions which are executable by a multitasking computer system; and
a plurality of applications which are executable by the multitasking computer system, wherein the plurality of applications comprises a first application, and wherein the first application comprises a first thread;
wherein the first thread of the first application is executable to invoke a method of the class, wherein the method comprises an identifier, and wherein the identifier initially comprises an original value which associates the method with the first thread; and
wherein the class is executable to;
modify the identifier in response to the first thread invoking the method such that the identifier comprises a temporary value, wherein the temporary value indicates that a single copy of the class is to be shared by the plurality of applications; and
modify the identifier in response to exiting the method such that the identifier comprises the original value which associates the method with the first thread. - View Dependent Claims (13, 14, 15, 16, 17, 18, 19, 20, 21)
-
-
22. A carrier medium comprising program instructions which are computer-executable to implement:
-
a first thread of a first application invoking a method of a class, wherein the method comprises an identifier, and wherein the identifier initially comprises an original value which associates the method with the first thread;
modifying the identifier in response to the first thread invoking the method such that the identifier comprises a temporary value, wherein the temporary value indicates that a single copy of the class is to be shared by a plurality of applications in a multitasking computer system;
exiting the method; and
modifying the identifier in response to the exiting the method such that the identifier comprises the original value which associates the method with the first thread. - View Dependent Claims (23, 24, 25, 26, 27, 28, 29, 30, 31, 32)
-
Specification