Multiapplication concurrent-execution interpreter execution method therefor and computer-readable storage medium storing program therefor
First Claim
1. An interpreter for a programming language supporting class variables, said interpreter comprising:
- receiving means for receiving specifying information for specifying an application to be started;
generating means for generating an individual application area corresponding to the application specified by the specifying information, wherein the individual application area does not store the data to be shared by a plurality of applications;
loading means for loading in a shared area, data for a class required to execute the specified application and to be shared by a plurality of applications;
allocating means for allocating class variable areas for the class variables in the individual application area corresponding to the specified application if a new class, having class variables is detected from classes required to execute the specified application;
executing means for executing the specified application by accessing the class variables in the individual application area corresponding to the specified application when the class variables are to be accessed;
deleting means for deleting the individual application area corresponding to the specified application when the specified application is terminated;
determination means for determining, when the specified application is terminated, whether or not the class required to execute the specified application is used by any other applications; and
unloading means for unloading from the shared area, data for the class required to execute the specified application if the class is determined not to be used by any other applications.
1 Assignment
0 Petitions
Accused Products
Abstract
An interpreter serves for a programming language. It first receives information specifying names and the like of multiple applications written in the programming language. Then, the interpreter generates individual application areas corresponding to the applications for storing data required for execution of the applications. It also generates a task for each of the applications and executes the application in the task. If the interpreter detects a new class in required classes during execution of the individual applications, it loads bytecodes for the new class in a shared area. Also, if the new class has a class variable, the interpreter allocates a class variable area for the class variable which corresponds to the application. Furthermore, to access a class variable during execution of an application, the interpreter accesses a class variable area for the class variable in the individual application area corresponding to the application.
11 Citations
39 Claims
-
1. An interpreter for a programming language supporting class variables, said interpreter comprising:
-
receiving means for receiving specifying information for specifying an application to be started;
generating means for generating an individual application area corresponding to the application specified by the specifying information, wherein the individual application area does not store the data to be shared by a plurality of applications;
loading means for loading in a shared area, data for a class required to execute the specified application and to be shared by a plurality of applications;
allocating means for allocating class variable areas for the class variables in the individual application area corresponding to the specified application if a new class, having class variables is detected from classes required to execute the specified application;
executing means for executing the specified application by accessing the class variables in the individual application area corresponding to the specified application when the class variables are to be accessed;
deleting means for deleting the individual application area corresponding to the specified application when the specified application is terminated;
determination means for determining, when the specified application is terminated, whether or not the class required to execute the specified application is used by any other applications; and
unloading means for unloading from the shared area, data for the class required to execute the specified application if the class is determined not to be used by any other applications. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19)
counters for individual classes for indicating the number of applications using the classes;
decrement means for decreasing a value of the counter for the class used by the application when an application is terminated; and
unloading means for unloading bytecodes for a class for which the value of the counter is zero.
-
-
16. An interpreter as claimed in claim 9, wherein said allocating means judges whether or not the new class has a class variable by analyzing the bytecodes of the class, which are stored in said shared area.
-
17. An interpreter as claimed in claim 9, further comprising initializing means for analyzing the bytecodes to judge if the class variable of the new class must be initialized, and for initializing the class variable of the new class if the class variable must be initialized.
-
18. An interpreter as claimed in claim 17, wherein said initializing means judges the class variable to be initialized if the bytecodes include initial data for the class variable, and uses the initial data to initialize the class variable.
-
19. An interpreter as claimed in claim 17, wherein said initializing means judges the class variable to be initialized if the bytecodes include a class-variable initializing method, and executes the class-variable initializing method to initialize the class variable.
-
20. A method of executing applications by an interpreter for a programming language supporting class variables, said method comprising:
-
a receiving step of receiving specifying information for specifying an application to be started;
a generating step of generating an individual application area corresponding to the application specified by the specifying information, wherein the individual application area does not store the data to be shared by plurality of applications;
a loading step of loading in a shared area, data for a class required to execute the specified application and to be shared by a plurality of applications;
an allocating step of allocating class variable areas for the class variables in the individual application area corresponding to the specified application if a new class having class variables is detected from classes required to execute the specified application;
an executing step of executing the specified application by accessing the class variables in the individual application area corresponding to the specified application when the class variables are to be accessed;
a deleting step of deleting the individual application area corresponding to the specified application when the specified application is terminated;
a determination step of determining, when the specified application is terminated, whether or not the class required to execute the specified application is used by any other applications; and
an unloading step of unloading from the shared area data for the class required to execute the specified application if the class is determined not to be used by any other applications. - View Dependent Claims (21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38)
a counting step of, for individual classes, indicating the number of applications using the classes;
a decrement step of decreasing a value of the counter for the class used by the application when an application is terminated; and
an unloading step of unloading bytecodes for a class for which the value of the counter is zero.
-
-
35. A method as claimed in claim 28, wherein said allocating step judges whether or not the new class has a class variable by analyzing the bytecodes of the class, which are stored in the shared area.
-
36. A method as claimed in claim 28, further comprising an initializing step of analyzing the bytecodes to judge if the class variable of the new class must be initialized, and for initializing the class variable of the new class if the class variable must be initialized.
-
37. A method as claimed in claim 36, wherein said initializing step judges the class variable to be initialized if the bytecodes include initial data for the class variable, and uses the initial data to initialize the class variable.
-
38. A method as claimed in claim 36, wherein said initializing step judges the class variable to be initialized if the bytecodes include a class-variable initializing method, and executes the class-variable initializing method to initialize the class variable.
-
39. A computer-readable program stored on a computer readable medium for controlling a computer to perform functions of an interpreter for a programming language supporting class variables, the program comprising codes for instructing the computer to perform a method comprising:
-
a receiving step of receiving specifying information for specifying an application to be started;
a generating step of generating an individual application area corresponding to the application specified by the specifying information, wherein the individual application area does not store the data to be shared by a plurality of applications;
a loading step of loading in a shared area, data for a class required to execute the specified application and to be shared by a plurality of applications;
an allocating step of allocating class variable areas for the class variables in the individual application area corresponding to the specified application if a new class having class variables is detected from classes required to execute the specified application;
an executing step of executing the specified application by accessing the class variables in the individual application area corresponding to the specified application when the class variables are to be accessed;
a deleting step of deleting the individual application area corresponding to the specified application when the specified application is terminated;
a determination step of determining when the specified application is terminated, whether or not the class required to execute the specified application is used by any other applications; and
an unloading step of unloading from the shared area, data for the class required to execute the specified application if the class is determined not to be used by any other applications.
-
Specification