Method and apparatus for “Just-in-Time” dynamic loading and unloading of computer software libraries
First Claim
1. A method for dynamically and automatically loading and unloading a software library to and out of memory in a computer, said software library including one or more library routines and capable of being referenced by an application or other software module, said method comprising the steps of:
- determining which software libraries are potentially needed during execution of the application or other software module;
loading into memory a library loader for each potentially needed library, said loading occurring anytime before a library routine of the potentially needed library is executed by the application or other software module;
loading into memory a library implementation module for a software library, said loading occurring prior to when a library routine of the software library is to be executed by the application or other software module;
executing the loaded library implementation module for the library routine being executed; and
automatically unloading from memory the library implementation module after the execution of the library routine is completed, wherein the software library is unloaded automatically without an explicit unload request from the application or other software module.
2 Assignments
0 Petitions
Accused Products
Abstract
A method and system for providing “just-in-time” dynamic loading and unloading of libraries. Library code is loaded into memory just prior to the actual execution of a routine in that library and is unloaded from memory after the execution of the library routine is completed. According to the present invention, a library structure having a library loader and a library implementation module. The library loader provides the same entry points as the library itself and contains code to drive the loading and unloading of the library implementation module which actually contains the code to implement the library call. At the beginning of the execution of an application or other software module, the library loaders for libraries needed by that application or other software module, are loaded into memory and unloaded upon completion of that application or other software module. The library loaders control the loading and unloading of the library implementation modules, which contain the actual code which implements the library call, so that the library code itself is only in memory while in use during execution of the library call. A sequence of library calls to the same library is preferably detected and managed so as to avoid unnecessary unloading/reloading of the same library.
-
Citations
77 Claims
-
1. A method for dynamically and automatically loading and unloading a software library to and out of memory in a computer, said software library including one or more library routines and capable of being referenced by an application or other software module, said method comprising the steps of:
-
determining which software libraries are potentially needed during execution of the application or other software module;
loading into memory a library loader for each potentially needed library, said loading occurring anytime before a library routine of the potentially needed library is executed by the application or other software module;
loading into memory a library implementation module for a software library, said loading occurring prior to when a library routine of the software library is to be executed by the application or other software module;
executing the loaded library implementation module for the library routine being executed; and
automatically unloading from memory the library implementation module after the execution of the library routine is completed, wherein the software library is unloaded automatically without an explicit unload request from the application or other software module. - View Dependent Claims (2, 3)
-
-
4. A method for dynamically and automatically loading and unloading a software library to and from memory in a computer, said software library capable of being referenced by an application or other software module, said method comprising the steps of:
-
determining which libraries are potentially needed during execution of the application or other software module;
loading into memory a library loader for each potentially needed library, said loading occurring anytime before any library of the potentially needed library is executed by the application or other software module;
loading into memory a library implementation module for a software library containing a library routine, said loading occurring prior to when said library routine is to be executed by the application or other software module, said loading comprising the steps of;
determining whether the library implementation module is in memory;
if the library implementation module is not in memory, then loading the library implementation module; and
if the library implementation module is in memory and scheduled to be unloaded, then canceling the scheduled unloading of the library implementation module;
executing the loaded library implementation module for the library routine being executed;
automatically scheduling the unloading of the library implementation module; and
unless the scheduled unload has been cancelled, automatically unloading the library implementation module as scheduled, wherein the software library is scheduled for unload and unloaded automatically without an explicit unload request from the application or other software module. - View Dependent Claims (5, 6, 7, 8, 9, 10, 35, 77)
-
-
11. A method for dynamically loading a software library into memory in a computer, said software library capable of being used by a plurality of applications or other software modules, said method comprising the steps of:
-
loading a software library into memory prior to or contemporaneous with execution of a library routine in said software library; and
automatically unloading said software library from memory after completion of execution of said library routine if it is determined that the software library is not being referenced by any application or other software module, wherein the software library is unloaded automatically without an explicit unload request from the application or other software module.
-
-
12. A method for dynamically loading and unloading a software library of one or more software routines into and out of memory in a computer, said software library capable of being referenced by an application or other software module, said method comprising the steps of:
-
loading a software library into memory; and
after completion of execution of a library routine in said software library, delaying for a delay period unloading of said software library from memory. - View Dependent Claims (13, 14, 15, 16, 17)
canceling a delayed unloading of a software library if a library routine of the software library is referenced by an application or other software module during the delay period.
-
-
16. The method as defined in claim 12 wherein said delay period is based on system resources.
-
17. The method as defined in claim 12 wherein said step of scheduling the unloading of the library implementation module comprises the steps of:
-
setting an associated criteria;
unsetting an associated criteria if said scheduled unloading is cancelled; and
resetting the associated criteria if the library implementation module is again scheduled for unloading.
-
-
18. A library structure for a dynamic software library, said library structure stored in a computer-readable medium, said library structure comprising:
-
a library loader specifying entry points corresponding to entry points in the software library; and
a library implementation module containing computer code to implement the software library, wherein said library loader contains code for automatically unloading said library implementation module from memory such that the software library is unloaded automatically without an explicit unload request from the application or other software module. - View Dependent Claims (19, 20, 62)
-
-
21. A computer-readable medium having stored thereon instructions for causing a computer to perform the following steps:
-
determining one or more software libraries which are potentially needed during execution of an application or other software module;
loading into memory a library loader for each potentially needed library, said loading occurring anytime before a library routine of the potentially needed library is executed by the application or other software module;
loading into memory a library implementation module for a software library, said loading occurring prior to when a library routine of the software library is to be executed by the application or other software module;
executing the loaded library implementation module for the library routine being executed; and
automatically unloading from memory the library implementation module after the execution of the library routine is completed, wherein the software library is unloaded automatically without an explicit unload request from the application or other software module. - View Dependent Claims (22, 23)
-
-
24. A computer-readable medium having stored thereon instructions for causing a computer to perform the following steps:
-
determining one or more software libraries which are potentially needed during execution of an application or other software module, each software library containing one or more library routines;
loading into memory a library loader for each potentially needed library, said loading occurring anytime before a library routine of the potentially needed library is executed by the application or other software module;
loading into memory a library implementation module for a software library containing a library routine, said loading occurring just prior to when said library routine is to be executed by the application or other software module, said loading including determining whether the library implementation module is in memory, if the library implementation module is not in memory, then loading the library implementation module, and if the library implementation module is in memory and scheduled for unloading from memory, then canceling the scheduled unloading of the library implementation module;
executing the loaded library implementation module for the library routine being executed; and
automatically scheduling the unloading of the library implementation module; and
unless the scheduled unload has been cancelled, automatically unloading the library implementation module as scheduled, wherein the software library is scheduled for unload and unloaded automatically without an explicit unload request from the application or other software module. - View Dependent Claims (25, 26, 27, 28, 29, 30, 31, 32)
setting an associated criteria;
unsetting an associated criteria if said scheduled unloading is cancelled; and
resetting the associated criteria if the library implementation module is again scheduled for unloading.
-
-
33. A computer-readable medium having stored thereon instructions for causing a computer to perform the following steps:
-
loading a software library into memory; and
automatically unloading said software library from memory after completion of execution of said library routine by delaying the unloading for a delay period. - View Dependent Claims (76)
-
-
34. A method for dynamically and automatically loading and unloading a software library to and from memory in a computer, said software capable of being referenced by an application or other software module, said method comprising the steps of:
-
determining which software libraries are potentially needed during execution of the application or other software module;
loading into memory a library loader for each potentially needed library, said loading occurring anytime before any library of the potentially needed library is executed by the application or other software module;
loading into memory a library implementation module for a software library containing a library routine, said loading occurring after the start of execution of the application or other software module and prior to when said library routine is to be executed by the application or other software module;
executing the loaded library implementation module for the library routine being executed; and
automatically unloading from memory the library implementation module after the execution of the library routine is completed, wherein the software library is unloaded automatically without an explicit unload request from the application or other software module.
-
-
36. A method for dynamically loading a software library into memory in a computer, said software capable of being used by an application or other software module, said method comprising the steps of:
-
determining which software libraries are potentially needed during execution of the application or other software module;
loading into memory a library loader for each potentially needed library, said loading occurring anytime before any library of the potentially needed library is executed by the application or other software module;
loading into memory a library implementation module for a software library containing a library routine, said loading occurring just prior to when said library routine is to be executed by the application or other software module;
executing the loaded library implementation module for the library routine being executed; and
unloading from memory the library implementation module after the execution of the library routine is completed, wherein said loading of a library loader for each potentially needed library occurs after execution of the application or other software module begins but before any library of the potentially needed library is executed by the application or other software module.
-
-
37. A method for dynamically loading a software library into memory in a computer, said software library capable of being used by an application or other software module, said method comprising the steps of:
-
determining which libraries are potentially needed during execution of the application or other software module;
loading into memory a library loader for each potentially needed library, said loading occuring after execution of the application or other software module begins but before any library of the potentially needed library is executed by the application or other software module;
loading into memory a library implementation module for a software library containing a library routine, said loading occurring just prior to when said library routine is to be executed by the application or other software module, said loading comprising the steps of;
determining whether the library implementation module is in memory;
if the library implementation module is not in memory, then loading the library implementation module; and
if the library implementation module is in memory, then canceling the scheduled unloading of the library implementation module;
executing the loaded library implementation module for the library routine being executed; and
scheduling the unloading of the library implementation module.
-
-
38. A method for dynamically loading a software library into memory in a computer, said software library capable of being used by an application or other software module, said method comprising the steps of:
-
determining which libraries are potentially needed during execution of the application or other software module;
loading into memory a library loader for each potentially needed library, said loading occurring anytime before any library of the potentially needed library is executed by the application or other software module;
loading into memory a library implementation module for a software library containing a library routine, said loading occurring just prior to when said library routine is to be executed by the application or other software module, said loading comprising the steps of;
determining whether the library implementation module is in memory;
if the library implementation module is not in memory, then loading the library implementation module; and
if the library implementation module is in memory, then canceling the scheduled unloading of the library implementation module;
executing the loaded library implementation module for the library routine being executed; and
scheduling the unloading of the library implementation module, wherein said step of scheduling the unloading of the library implementation module includes setting a time delay and unloading the library implementation module if after said time delay has been met, said library implementation module is not in use. - View Dependent Claims (39, 40)
-
-
41. A method for dynamically loading a software library into memory in a computer, said software library capable of being used by an application or other software module, said method comprising the steps of:
-
determining which libraries are potentially needed during execution of the application or other software module;
loading into memory a library loader for each potentially needed library, said loading occurring anytime before any library of the potentially needed library is executed by the application or other software module;
loading into memory a library implementation module for a software library containing a library routine, said loading occurring just prior to when said library routine is to be executed by the application or other software module, said loading comprising the steps of;
determining whether the library implementation module is in memory;
if the library implementation module is not in memory, then loading the library implementation module; and
if the library implementation module is in memory, then canceling the scheduled unloading of the library implementation module;
executing the loaded library implementation module for the library routine being executed; and
scheduling the unloading of the library implementation module, wherein said step of scheduling the unloading of the library implementation module includes setting an associated critera based on system resources and unloading the library implementation module if after said associated criteria has been met, said library implementation module is not in use.
-
-
42. A method for dynamically loading a software library into memory in a computer, said software library capable of being used by an application or other software module, said method comprising the steps of:
-
determining which libraries are potentially needed during execution of the application or other software module;
loading into memory a library loader for each potentially needed library, said loading occurring anytime before any library of the potentially needed library is executed by the application or other software module;
loading into memory a library implementation module for a software library containing a library routine, said loading occurring just prior to when said library routine is to be executed by the application or other software module, said loading comprising the steps of;
determining whether the library implementation module is in memory;
if the library implementation module is not in memory, then loading the library implementation module; and
if the library implementation module is in memory, then canceling the scheduled unloading of the library implementation module;
executing the loaded library implementation module for the library routine being executed; and
scheduling the unloading of the library implementation module, wherein said step of scheduling the unloading of the library implementation module includes setting an associated criteria, unsetting an associated criteria if said scheduled unloading is cancelled, and resetting the associated criteria if the library implementation module is again scheduled for unloading.
-
-
43. A method for dynamically loading a software library into memory in a computer, said software library capable of being used by an application or other software module, said method comprising the steps of:
-
loading a software library into memory just prior to or contemporaneous with execution of a library routine in said software library; and
scheduling said software library from memory after completion of execution of said library routine, wherein said step of scheduling the unloading of the library implementation module includes setting a time delay and unloading the library implementation module if after said time delay has been met, said library implementation module is not in use. - View Dependent Claims (44, 45)
-
-
46. A method for dynamically loading a software library into memory in a computer, said software library capable of being used by an application or other software module, said method comprising the steps of:
-
loading a software library into memory just prior to or contemporaneous with execution of a library routine in said software library; and
scheduling said software library from memory after completion of execution of said library routine, wherein said step of scheduling the unloading of the library implementation module includes setting an associated criteria based on system resources and unloading the library implementation module if after said associated criteria has been met, said library implementation module is not in use.
-
-
47. A method for dynamically loading a software library into memory in a computer, said software library capable of being used by an application or other software module, said method comprising the steps of:
-
loading a software library into memory just prior to or contemporaneous with execution of a library routine in said software library; and
scheduling said software library from memory after completion of execution of said library routine, wherein said step of scheduling the unloading of the library implementation module includes setting an associated criteria, unsetting an associated criteria if said scheduled unloading is cancelled, and resetting the associated criteria if the library implementation module is again scheduled for unloading.
-
-
48. A computer-readable medium having stored thereon instructions for causing a computer to perform the following steps:
-
determining one or more software libraries which are potentially needed during execution of an application or other software module;
loading into memory a library loader for each potentially needed library, said loading occurring anytime before any library of the potentially needed library is executed by the application or other software module;
loading into memory a library implementation module for a software library containing a library routine, said loading occurring just prior to when said library routine is to be executed by the application or other software module, said loading including determining whether the library implementation module is in memory, if the library implementation module is not in memory, then loading the library implementation module, and if the library implementation module is in memory, then canceling the scheduled unloading of the library implementation module;
executing the loaded library implementation module for the library routine being executed; and
scheduling the unloading of the library implementation module, wherein said step of scheduling the unloading of the library implementation module includes setting an associated criteria based on system resources and unloading the library implementation module if after said associated criteria has been met, said library implementation module is not in use.
-
-
49. A computer-readable medium having stored thereon instructions for causing a computer to perform the following steps:
-
determining one or more software libraries which are potentially needed during execution of an application or other software module;
loading into memory a library loader for each potentially needed library, said loading occurring anytime before any library of the potentially needed library is executed by the application or other software module;
loading into memory a library implementation module for a software library containing a library routine, said loading occurring just prior to when said library routine is to be executed by the application or other software module, said loading comprising the steps of;
determining whether the library implementation module is in memory;
if the library implementation module is not in memory, then loading the library implementation module;
if the library implementation module is in memory, then canceling the scheduled unloading of the library implementation module;
executing the loaded library implementation module for the library routine being executed; and
scheduling the unloading of the library implementation module, wherein said step of scheduling the unloading of the library implementation module includes setting an associated criteria, unsetting an associated criteria if said scheduled unloading is cancelled, and resetting the associated criteria if the library implementation module is again scheduled for unloading.
-
-
50. A method for automatic unloading of a dynamically-loaded software library from memory in a computer, said software library including one or more library routines and capable of being referenced or otherwise invoked by an application or other software module, said method comprising the steps of:
-
determining whether any application or other software module is referencing the software library; and
automatically unloading the software library from memory if it is determined that the software library is not being referenced by any application or other software module, wherein the software library is unloaded automatically without an explicit unload request from the application or other software module. - View Dependent Claims (51, 52, 53, 54, 55, 56, 57, 58)
loading into memory a library loader for each potentially needed library, a library loader for a library being loaded by the time the application or other software module executes a routine in that library;
loading into memory a library implementation module for a software library, said loading occurring prior to when a library routine of the software library is executed by the application or other software module, said loading handled by the library loader for the software library; and
wherein the step of unloading the software library is handled by the library loader for that software library.
-
-
52. The method as defined in claim 50 wherein said step of automatically unloading the software library comprises the step of delaying the unloading of the software library for a specified delay and unloading the software library upon completion of the delay.
-
53. The method as defined in claim 52, wherein said step of automatically unloading the software library further comprises the steps of:
-
determining at completion of the delay whether the software library is being referenced by an application or other software module; and
unloading the software module only if the software library is not being referenced by an application or other software module.
-
-
54. The method as defined in claim 52 further comprising the steps of:
-
when an application or other software module references or otherwise invokes a routine in a software library, determining whether the software library is subject to a delayed unloading; and
if the software library is subject to a delayed unloading, cancelling the delayed unloading.
-
-
55. The method as defined in claim 52 wherein said specified delay is a time-based delay.
-
56. The method as defined in claim 55 wherein said time-based delay is fixed.
-
57. The method as defined in claim 55 wherein said time-based delay is variable.
-
58. The method as defined in claim 52 wherein said specified delay is based on system resources.
-
59. A method for dynamically and automatically loading and unloading a software library to and from memory in a computer, said software library capable of being referenced by an application or other software module, said method comprising the steps of:
-
determining which libraries are potentially needed during execution of the application or other software module;
loading into memory a library loader for each potentially needed library, said loading occurring anytime before any library of the potentially needed library is executed by the application or other software module;
loading into memory a library implementation module for a software library containing a library routine, said loading occurring prior to when said library routine is to be executed by the application or other software module, said loading comprising the steps of;
determining whether the library implementation module is in memory; and
if the library implementation module is not in memory, then loading the library implementation module; and
executing the loaded library implementation module for the library routine being executed;
scheduling the unloading of the library implementation module when the library implementation module is no longer referenced by any application or other software module, the scheduling based on a specified criteria; and
automatically unloading the library implementation module when the specified criteria has been met, wherein the software library is unloaded automatically without an explicit unload request from the application or other software module. - View Dependent Claims (60, 61)
-
-
63. A computer-readable medium having stored thereon instructions for causing a computer to perform the following steps:
-
determining whether any application or other software module is referencing a software library; and
automatically unloading the software library from memory if it is determined that the software library is not being referenced by any application or other software module, wherein the software library is unloaded from memory automatically without an explicit unload request from the application or other software module. - View Dependent Claims (64, 65, 66, 67, 68, 69, 70, 71)
loading into memory a library loader for each potentially needed library, a library loader for a library being loaded by the time the application or other software module executes a routine in that library;
loading into memory a library implementation module for a software library, said loading occurring prior to when a library routine of the software library is executed by the application or other software module, said loading handled by the library loader for the software library; and
wherein the step of unloading the software library is handled by the library loader for that software library.
-
-
65. The computer-readable medium as defined in claim 63 wherein said step of automatically unloading the software library comprises the step of delaying the unloading of the software library for a specified delay and unloading the software library upon completion of the delay.
-
66. The computer-readable medium as defined in claim 65, wherein said step of automatically unloading the software library further comprises the steps of:
-
determining at completion of the delay whether the software library is being referenced by an application or other software module; and
unloading the software module only if the software library is not being referenced by an application or other software module.
-
-
67. The computer-readable medium as defined in claim 65 having stored thereon further instructions for causing a compute to perform the further steps of:
-
when an application or other software module references or otherwise invokes a routine in a software library, determining whether the software library is subject to a delayed unloading; and
if the software library is subject to a delayed unloading, cancelling the delayed unloading.
-
-
68. The computer-readable medium as defined in claim 65 wherein said specified delay is a time-based delay.
-
69. The computer-readable as defined in claim 68 wherein said time-based delay is fixed.
-
70. The computer-readable medium as defined in claim 68 wherein said time-based delay is variable.
-
71. The method as defined in claim 65 wherein said specified delay is based on system resources.
-
72. A computer-readable medium having stored thereon instructions for causing a computer to perform the following steps:
-
determining which libraries are potentially needed during execution of the application or other software module;
loading into memory a library loader for each potentially needed library, said loading occurring anytime before any library of the potentially needed library is executed by the application or other software module;
loading into memory a library implementation module for a software library containing a library routine, said loading occurring prior to when said library routine is to be executed by the application or other software module, said loading comprising the steps of;
determining whether the library implementation module is in memory; and
if the library implementation module is not in memory, then loading the library implementation module; and
executing the loaded library implementation module for the library routine being executed;
scheduling the unloading of the library implementation module when the library implementation module is no longer referenced by any application or other software module, the scheduling based on a specified criteria; and
automatically unloading the library implementation module when the specified criteria has been met, wherein the software library is unloaded automatically without an explicit unload request from the application or other software module. - View Dependent Claims (73, 74)
-
-
75. A computer system for automatic unloading of a dynamically-loaded software library from memory in a computer, said software library including one or more library routines and capable of being referenced or otherwise invoked by an application or other software module, said computer system comprising:
-
one or more software libraries, each software library containing one or more library routines;
means for determining whether any application or other software module is referencing the software library; and
means for automatically unloading the software library from memory if it is determined that the software library is not being referenced by any application or other software module, wherein the software library is unloaded automatically without an explicit unload request from the application or other software module.
-
Specification