Method and system for dynamically adjustable and configurable garbage collector
First Claim
1. A method for managing memory in a data processing system, the method comprising the computer-implemented steps of:
- receiving, from an executing application, a configuration parameter for a garbage collector; and
managing deallocation of memory by the garbage collector executing in the data processing system according to a behavioral algorithm based on the configuration parameter.
1 Assignment
0 Petitions
Accused Products
Abstract
A method, system, and computer-program product for a dynamically adjustable and configurable garbage collector is provided. Values for an environment variable or set of variables or parameters are obtained by the dynamic garbage collector. The variables may be set through user input or upon configuration of a computer platform. The values of the variables may be modified or updated during execution of the garbage collector, which receives or retrieves the newly modified values. The garbage collector then performs memory management functions according to a behavioral algorithm that incorporates the values of the environment variables or parameters or according to a behavioral algorithm that is selected by the environment variable.
86 Citations
34 Claims
-
1. A method for managing memory in a data processing system, the method comprising the computer-implemented steps of:
-
receiving, from an executing application, a configuration parameter for a garbage collector; and
managing deallocation of memory by the garbage collector executing in the data processing system according to a behavioral algorithm based on the configuration parameter. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8)
operating the garbage collector in one of a plurality of garbage collecting modes; and
dynamically switching between garbage collection modes by setting the configuration parameter in the configuration file.
-
-
4. The method of claim 1 wherein the data processing system comprises a Java runtime environment.
-
5. The method of claim 4 further comprising:
-
monitoring a set of environment variables for the data processing system;
detecting an update of the control variable in the set of environment variables;
retrieving a value of the updated control variable by the garbage collector; and
selecting the behavioral algorithm based on the value of the updated control variable.
-
-
6. The method of claim 4 wherein the control variable represents one or more characteristics of the data processing system selected from the group of:
-
an amount of memory installed in the data processing system;
a number of processors installed in the data processing system;
a clock speed of a processor installed in the data processing system;
a machine type of the data processing system, wherein the machine type represents a server, a workstation, a desktop computer, a notebook computer, a handheld computer, or an embedded computer;
a selectable purpose for the data processing system, wherein the selectable purpose represents real-time data processing, data storage management, communications management or general purpose use;
an installed application;
a combination of installed applications;
an executing application;
a combination of executing applications;
a current time of day;
a current day of week; and
a processing load on the data processing system.
-
-
7. The method of claim 6 wherein performance of the behavioral algorithm is computed by weighting values of characteristics of the data processing system.
-
8. The method of claim 6 wherein a type of behavioral algorithm is selected by a table of characteristics of the data processing system.
-
9. A computer program product in a computer-readable medium for use in a data processing system for managing memory, the computer program product comprising:
-
first instructions for dynamically accepting a control variable from an executing application; and
second instructions for managing deallocation of memory by a garbage collector executing in the data processing system according to a behavioral algorithm based on the control variable. - View Dependent Claims (10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22)
instructions for monitoring a set of environment variables for the data processing system;
instructions for detecting an update of the control variable in the set of environment variables;
instructions for retrieving a value of the updated control variable by the garbage collector; and
instructions for selecting the behavioral algorithm based on the value of the updated control variable.
-
-
11. The computer program product of claim 9 further comprising:
-
instructions for registering a routine to be called for notification of an update of the control variable for the data processing system;
instructions for detecting an update of the control variable for the data processing system;
instructions for calling the registered routine; and
instructions for selecting the behavioral algorithm based on a value of the updated control variable.
-
-
12. The computer program product of claim 11 wherein the routine is registered as a hook.
-
13. The computer program product of claim 9 further comprising:
-
instructions for registering for a notification of an update of the control variable;
instructions for detecting an update of the control variable;
instructions for sending the notification of the update of the control variable; and
instructions for selecting the behavioral algorithm based on a value of the updated control variable.
-
-
14. The computer program product of claim 9 wherein the control variable is dynamically set by a user of the data processing system.
-
15. The computer program product of claim 9 wherein the control variable is dynamically set by a user invoking an update of the control variable through a command line interface.
-
16. The computer program product of claim 9 wherein the control variable represents one or more characteristics of the data processing system selected from the group of:
-
an amount of memory installed in the data processing system;
a number of processors installed in the data processing system;
a clock speed of a processor installed in the data processing system;
a machine type of the data processing system, wherein the machine type represents a server, a workstation, a desktop computer, a notebook computer, a handheld computer, or an embedded computer;
a selectable purpose for the data processing system, wherein the selectable purpose represents real-time data processing, data storage management, communications management or general purpose use;
an installed application;
a combination of installed applications;
an executing application;
a combination of executing applications;
a current time of day;
a current day of week; and
a processing load on the data processing system.
-
-
17. The computer program product of claim 16 wherein performance of the behavioral algorithm is computed by weighting values of characteristics of the data processing system.
-
18. The computer program product of claim 9 wherein the behavioral algorithm directs one or more characteristics of the garbage collector selected from the group of:
-
a frequency of memory managing actions;
an amount of processor time used for memory managing actions; and
a number of objects in memory to be checked by the garbage collector.
-
-
19. The computer program product of claim 9 wherein the control variable selects one of a set of discrete values for performance of the behavioral algorithm.
-
20. The computer program product of claim 19 wherein the set of discrete values comprises low, moderate, or high performance.
-
21. The computer program product of claim 9 wherein the control variable toggles on/off managing actions of the garbage collector.
-
22. The computer program product of claim 9 wherein the control variable selects a type of behavioral algorithm for the garbage collector.
-
23. A computer program product in a computer-readable medium for use in a data processing system for managing memory, the computer program product comprising:
-
first instructions for dynamically accepting a control variable that defines a characteristic of the computer system on which said computer program product is executing; and
second instructions for a garbage collector having a first behavior on a first computer system according to the control variable and a second behavior on a second computer system according to the control variable.
-
-
24. A data processing system comprising:
-
setting means for dynamically setting a control variable that defines a characteristic of said data processing system; and
managing means for managing deallocation of memory by a garbage collector executing in the data processing system according to a behavioral algorithm based on the control variable. - View Dependent Claims (25, 26, 27)
monitoring means for monitoring a set of environment variables for the data processing system;
detecting means for detecting an update of the control variable in the set of environment variables;
retrieving means for retrieving a value of the updated control variable by the garbage collector; and
selecting means for selecting the behavioral algorithm based on the value of the updated control variable.
-
-
26. The data processing system of claim 24 wherein the control variable selects one of a set of discrete values for performance of the behavioral algorithm.
-
27. The data processing system of claim 24 wherein the control variable selects a type of behavioral algorithm for the garbage collector.
-
28. A computer program product in a computer-readable medium for use in a data processing system for managing memory, the computer program product comprising:
-
a plurality of algorithms for managing deallocation of memory by a garbage collector executing in the data processing system, one of said plurality of algorithms being dynamically chosen for execution according to a value for at least one environmental variable, whereby said computer program product can be installed in a variety of processing systems without modification. - View Dependent Claims (29, 30, 31)
an amount of memory installed in the data processing system, a number of processors installed in the data processing system, a clock speed of a processor installed in the data processing system, a machine type of the data processing system, a selectable purpose for the data processing system, a property of one or more applications, a current time of day, a current day of week, and a processing load on the data processing system.
-
-
30. The computer program product of claim 28, wherein changes in a value of said at least one environmental variable is checked only when the data processing system boots up.
-
31. The computer program product of claim 28, wherein changes in a value of said at least one environmental variable can be determined during runtime.
-
32. A method for managing memory in a data processing system, the method comprising the computer-implemented steps of:
-
accepting a defining parameter that defines a parameter of the data processing system or a property of an application executing on said data processing system;
choosing an algorithm from a plurality of algorithms according to a value of said defining parameter, managing deallocation of memory using said algorithm. - View Dependent Claims (33, 34)
-
Specification