Management of user-defined routine libraries in database environments
First Claim
1. A computer program product for a computer programming environment comprising a database system, the database system comprising a memory device for storing user-defined routine libraries and a working memory for storing working copies of user-defined routine libraries, the computer program product comprising a computer usable medium having computer readable code means embodied in said medium for managing libraries of user-defined routines in the database system, comprising:
- computer readable program code means for defining and launching an unload thread for unloading inactive libraries from the working memory, and computer readable program code means for defining and maintaining an identifying data structure for specifying locations in the working memory, the identifying data structure comprising entries, each entry specifying an associated loaded library stored in the working memory and having an associated last loaded value, the unload thread comprisingcomputer readable program code means for periodically accessing the identifying data structure to identify unload candidate libraries on an unload timing interval, each unload candidate library having an associated entry in the identifying data structure in which the last loaded value indicates that the unload candidate library has been inactive over the preceding unload timing interval;
computer readable program code means for defining and maintaining a timing counter,computer readable program code means for incrementing the timing counter on a periodic basis related to the unload timing interval, andcomputer readable program code means for defining the last loaded values in entries in the identifying data structure based on the value of the timing counter, and in which the computer readable program code means for periodically accessing the identifying data structure to identify unload candidate libraries comprises means for comparing the last loaded values for entries in the identifying data structure with the timing counter.
1 Assignment
0 Petitions
Accused Products
Abstract
Library management for libraries of user-defined routines in a database system. Libraries are stored in a long-term storage device and loaded into working memory in the database system when routines in the libraries are to be executed. An unload thread is defined to carry out the process of unloading libraries from the working memory when such libraries are inactive. The unload thread becomes active on a defined timing interval. The unload thread accesses a hash table and a most recently used list to determine which of the loaded libraries is inactive and which of the libraries ought to be unloaded. The hash table maintains information as to which libraries have been accessed in the most recent past defined timing interval. The size of the most recently used list can be defined such that all libraries associated with the list are retained in working memory.
-
Citations
21 Claims
-
1. A computer program product for a computer programming environment comprising a database system, the database system comprising a memory device for storing user-defined routine libraries and a working memory for storing working copies of user-defined routine libraries, the computer program product comprising a computer usable medium having computer readable code means embodied in said medium for managing libraries of user-defined routines in the database system, comprising:
-
computer readable program code means for defining and launching an unload thread for unloading inactive libraries from the working memory, and computer readable program code means for defining and maintaining an identifying data structure for specifying locations in the working memory, the identifying data structure comprising entries, each entry specifying an associated loaded library stored in the working memory and having an associated last loaded value, the unload thread comprising computer readable program code means for periodically accessing the identifying data structure to identify unload candidate libraries on an unload timing interval, each unload candidate library having an associated entry in the identifying data structure in which the last loaded value indicates that the unload candidate library has been inactive over the preceding unload timing interval; computer readable program code means for defining and maintaining a timing counter, computer readable program code means for incrementing the timing counter on a periodic basis related to the unload timing interval, and computer readable program code means for defining the last loaded values in entries in the identifying data structure based on the value of the timing counter, and in which the computer readable program code means for periodically accessing the identifying data structure to identify unload candidate libraries comprises means for comparing the last loaded values for entries in the identifying data structure with the timing counter. - View Dependent Claims (2, 3, 4, 5, 6)
-
-
7. A computer program product for a computer programming environment comprising a database system, the database system comprising a memory device for storing user-defined routine libraries and a working memory for storing working copies of user-defined routine libraries, the computer program product comprising a computer usable medium having computer readable code means embodied in said medium for managing libraries of user-defined routines in the database system, comprising:
-
computer readable program code means for defining and launching an unload thread for unloading inactive libraries from the working memory, and computer readable program code means for defining and maintaining an identifying data structure for specifying locations in the working memory, the identifying data structure comprising entries, each entry specifying an associated loaded library stored in the working memory and having an associated last loaded value, the unload thread comprising computer readable program code means for periodically accessing the identifying data structure to identify unload candidate libraries on an unload timing interval, each unload candidate library having an associated entry in the identifying data structure in which the last loaded value indicates that the unload candidate library has been inactive over the preceding unload timing interval; computer readable program code means for defining and maintaining a most recently used list data structure, the most recently used list comprising list items, each list item specifying a corresponding entry in the identifying data structure, the list items in the most recently used list being ordered to reflect the order in which libraries associated with identifying data structure entries have been accessed to commence execution of user-defined routines. - View Dependent Claims (8, 9)
-
-
10. A sub-system for managing libraries of user-defined routines in a database system, the database system comprising a memory device for storing user-defined routine libraries and a working memory for storing working copies of user-defined routine libraries, the sub-system comprising:
-
means for defining and launching an unload thread for unloading inactive libraries from the working memory, and means for defining and maintaining an identifying data structure for specifying locations in the working memory, the identifying data structure comprising entries, each entry specifying an associated loaded library stored in the working memory and having an associated last loaded value, the unload thread comprising means for periodically accessing the identifying data structure to identify unload candidate libraries on an unload timing interval, each unload candidate library having an associated entry in the identifying data structure in which the last loaded value indicates that the unload candidate library has been inactive over the preceding unload timing interval, means for defining and maintaining a most recently used list data structure, the most recently used list comprising list items, each list item specifying a corresponding entry in the identifying data structure, the list items in the most recently used list being ordered to reflect the order in which libraries associated with identifying data structure entries have been accessed to commence execution of user-defined routines. - View Dependent Claims (11, 12, 13, 14, 15, 16, 17)
-
-
18. A sub-system for managing libraries of user-defined routines in a database system, the database system comprising a memory device for storing user-defined routine libraries and a working memory for storing working copies of user-defined routine libraries, the sub-system comprising:
-
means for defining and launching an unload thread for unloading inactive libraries from the working memory, and means for defining and maintaining an identifying data structure for specifying locations in the working memory, the identifying data structure comprising entries, each entry specifying an associated loaded library stored in the working memory and having an associated last loaded value, the unload thread comprising means for periodically accessing the identifying data structure to identify unload candidate libraries on an unload timing interval, each unload candidate library having an associated entry in the identifying data structure in which the last loaded value indicates that the unload candidate library has been inactive over the preceding unload timing interval; means for defining and maintaining a timing counter, means for incrementing the timing counter on a periodic basis related to the unload timing interval, and means for defining the last loaded values in entries in the identifying data structure based on the value of the timing counter, and in which the means for periodically accessing the identifying data structure to identify unload candidate libraries comprises means for comparing the last loaded values for entries in the identifying data structure with the timing counter.
-
-
19. A method for managing user-defined routine libraries in a database system, the database system comprising a memory device for storing user-defined routine libraries and a working memory for storing working copies of user-defined routine libraries, the database system responding to requests to execute user-defined routines stored in the user-defined routine libraries, the method comprising:
-
defining and launching an unload thread for unloading inactive libraries from the working memory, and defining and maintaining an identifying data structure for specifying locations in the working memory, the identifying data structure comprising entries, each entry specifying an associated loaded library stored in the working memory and having an associated last loaded value, periodically accessing the identifying data structure to identify unload candidate libraries on an unload timing interval, each unload candidate library having an associated entry in the identifying data structure in which the last loaded value indicates that the unload candidate library has been inactive over the preceding unload timing interval, defining and maintaining a timing counter, defining a last loaded value for the new entry to be the value of the timing counter, when the identified user-defined routine library is loaded in the working memory at the time of the request, updating the last loaded value for the associated entry in the identifying data structure entry to be the value of the timing counter, wherein each unload candidate library has an associated entry in the identifying data structure, and the method includes comparing the last loaded values for entries in the identifying data structure with a timing counter to determine that the unload candidate library has been inactive over the preceding unload timing interval, and incrementing the timing counter on a periodic basis related to the unload timing interval. - View Dependent Claims (20, 21)
-
Specification