Data processing: database and file management or data structures – Database design – Data structure types
Reexamination Certificate
1998-12-16
2002-06-18
Von Buhr, Maria N. (Department: 2171)
Data processing: database and file management or data structures
Database design
Data structure types
C711S118000, C711S170000
Reexamination Certificate
active
06408313
ABSTRACT:
FIELD OF THE INVENTION
This invention relates generally to the field of memory management and in particular to a dynamic cache management mechanism for a computer program.
COPYRIGHT NOTICE/PERMISSION
A portion of the disclosure of this patent document contains material which is subject to copyright protection. The copyright owner has no objection to the facsimile reproduction by anyone of the patent document or the patent disclosure as it appears in the Patent and Trademark Office patent file or records, but otherwise reserves all copyright rights whatsoever. The following notice applies to the software and data as described below and in the drawing hereto: Copyright®1998, Microsoft Corporation, All Rights Reserved.
BACKGROUND
Many application programs are configured at the time they are initially loaded and set up to run on a computer system. The amount of memory available for use by the program is one of the things that is configured at set up time. It is sometimes difficult for a computer user to anticipate how much memory an application will require in order to run, not to mention run efficiently and quickly. Some applications, such as data base language servers run faster only with a significant amount of memory, referred to as a buffer or cache. The cache is used to store both executable code related to running the program as well as data that is used by the program, in this case, multiple tables of a database. Further, the amount of data that such a program is processing affects the amount of memory needed to run well. The amount of data that the program is processing can also vary over time, thus increasing or decreasing the amount of memory needed to run well. The amount of memory configured for use by such a program also depends on the size of the machine and amount of memory available on the machine. Some have very large amounts of memory, while others have less. Configuring the program that likes more memory with too much or too little memory for the system on which it is running can result in suboptimal performance of the system.
Once an application is allocated a certain amount of memory in the system to use, the operating system takes over management of the physical main memory. It commits real or physical main memory to the memory of the application. Many times, the operating system must take real memory from one application and associate it with a buffer for another application. It usually takes that memory in an amount equal to one or more pages, where a page is a certain amount of data, such as four kilobytes. When it takes a page to give to another system, it must write the data on that page to secondary storage, which is usually slower than the main memory. When the application needs to access that data again, it must first be paged back in again, which can take a large amount of time as compared to the speed at which programs normally run with data in memory.
There is a need to avoid such paging as much as possible for selected applications, such as data base applications, where many users expect and demand sub second response times. If the data, or code to provide the functionality requested by a user or another program is not currently in the memory, it significantly degrades the performance of the application. Again, suboptimal performance can result if too little memory is available to a memory intensive application because data must be continually retrieved from secondary storage. However, suboptimal performance can also result from a memory intensive application being set up with too much memory, since the operating system will start paging out the data needed by the application, again resulting in data being continually retrieved from secondary storage.
There is a need for a mechanism to better manage the amount of memory that is available to application programs. Such a mechanism should be simple to use, and not require a user, who may not have relevant experience and ability, to set up or modify the memory resources allocated to the programs. Further, the resources used by the program should not adversely affect the overall performance and integrity of the computer system on which the program is running.
SUMMARY OF THE INVENTION
A dynamic cache management mechanism determines the amount of memory available from a system on which a memory intensive application is running and dynamically manages the amount of cache for which real memory is associated or committed by the system.
In one embodiment, the memory intensive application uses a background thread to periodically query a memory manager, normally a part of an operating system, to determine how much memory is available for use by applications. If the amount of memory, as identified in a free list is above a predetermined threshold, the application requests more memory for its use. If below the predetermined threshold, the application gives memory back to the operating system so it may be used by the operating system or other applications and programs. A temporal average of the number of available pages from the operating system is used to prevent oscillation of the size of the memory allocated to the application.
The threshold used by the application is determined to be a desired amount above a known basic operating system desired amount. The difference between the threshold and the reserved amount is referred to as an excess over the desired amount. The existence of the excess allows other applications to also obtain memory resources. This allows other applications the ability to run while at the same time maximizing the amount of memory allocated to the application using the mechanism.
In one embodiment, the application comprises a database system. Dynamically expanding or contracting the database system cache based upon system demand allows the database system data cache to expand and shrink based upon system demand for memory, optimizing the use of physical system memory and providing better performance of the database. This benefit is provided even though the size of the database being used changes over time. Users of the application need not be familiar with the complexities involved in configuring the memory to meet the requirements of the database system. Further, other applications will also run efficiently because the excess memory will be made available by the memory intensive application for their use as the demands on the system resources expand and contract over time.
REFERENCES:
patent: 4805097 (1989-02-01), De Sanna
patent: 4812981 (1989-03-01), Chan et al.
patent: 4961139 (1990-10-01), Hong et al.
patent: 5517643 (1996-05-01), Davy
patent: 5566315 (1996-10-01), Milillo et al.
patent: 5668987 (1997-09-01), Schneider
patent: 5893920 (1999-04-01), Shaheen et al.
patent: 6128713 (2000-10-01), Eisler et al.
patent: 6256645 (2001-07-01), Mundy
patent: 6286016 (2001-09-01), Heller et al.
Campbell David G.
Christensen Eric R.
Microsoft Corporation
Von Buhr Maria N.
Woodcock & Washburn LLP
LandOfFree
Dynamic memory allocation based on free memory size does not yet have a rating. At this time, there are no reviews or comments for this patent.
If you have personal experience with Dynamic memory allocation based on free memory size, we encourage you to share that experience with our LandOfFree.com community. Your opinion is very important and Dynamic memory allocation based on free memory size will most certainly appreciate the feedback.
Profile ID: LFUS-PAI-O-2978569