Method for writing modified data from a main memory of a computer back to a database
First Claim
1. In a client/server computer system, a method for writing data that has been modified and which is stored in a cache memory to an appropriate location of a database stored in a magnetic storage device, comprising the steps of:
- designating an amount of the cache memory that is to be cleared within a predetermined time interval, wherein the amount of cache memory to be cleared is based on an estimate of how much new data is anticipated to be cached in the cache memory within the time interval;
copying a piece of modified data from the cache memory to the database;
determining whether an additional amount of cache memory needs to be cleared, wherein additional pieces of modified data are copied from the cache memory to the database until the designated amount of cache memory becomes available for storage of new data;
checkpointing modified data to a checkpoint file with at least one sequential input/output operation;
identifying a marked record in the cache memory;
opening a page corresponding to the marked record;
copying the marked record to the page;
unmarking the record;
regulating a number of marked records to be cleared within the time interval;
storing the new data in the designated amount of cache memory that has been cleared.
2 Assignments
0 Petitions
Accused Products
Abstract
In a client/server computer system, a method for writing modified data in a cache memory back to a database residing in a hard disk drive. Rather than writing back all of the modified data as part of a checkpointing operation, the present invention designates an amount of the cache memory that is to be cleared for a pre-determined time interval. The amount of cache memory to be cleared is based on an estimate of how much new data is anticipated to be cached. Thereby, just enough memory is cleared and made available so as to accommodate the storage of new data. For the modified data which are to be written back to the database, a lazy writeback operation is utilized.
115 Citations
14 Claims
-
1. In a client/server computer system, a method for writing data that has been modified and which is stored in a cache memory to an appropriate location of a database stored in a magnetic storage device, comprising the steps of:
-
designating an amount of the cache memory that is to be cleared within a predetermined time interval, wherein the amount of cache memory to be cleared is based on an estimate of how much new data is anticipated to be cached in the cache memory within the time interval; copying a piece of modified data from the cache memory to the database; determining whether an additional amount of cache memory needs to be cleared, wherein additional pieces of modified data are copied from the cache memory to the database until the designated amount of cache memory becomes available for storage of new data; checkpointing modified data to a checkpoint file with at least one sequential input/output operation; identifying a marked record in the cache memory; opening a page corresponding to the marked record; copying the marked record to the page; unmarking the record; regulating a number of marked records to be cleared within the time interval; storing the new data in the designated amount of cache memory that has been cleared. - View Dependent Claims (2, 3, 4)
-
-
5. A server computer comprising:
-
an interface for interfacing the server computer with a plurality of client computers for running application programs; a database management system installed within the server for handling access to a database residing within a mass storage device; a checkpoint file to which modified data stored in the memory is written to the checkpoint by a sequential input/output operation; a circuit for performing a modulated sweep function for controlling a number of modified data that is to be cleared from the memory within the time interval; a circuit which determines after a transaction commits, whether a page corresponding to a record that was modified by the transaction is available in a page cache, wherein the record is written to the page if the page is available in the page cache and unmarked; a memory residing within the server computer method for storing data read from the database, wherein an amount of the memory is designated to be cleared within a pre-determined time interval based on an estimate of how much new data is anticipated to be stored in the memory within the time interval such that the memory is continuously being cleared so that just enough memory becomes available for storing the new data. - View Dependent Claims (6, 7)
-
-
8. A computer-readable medium having stored thereon instructions for causing a computer system to write data that has been modified and which is stored in a memory to a database stored in a magnetic storage device, said instructions causing the computer system to carry out the steps of:
-
designating an amount of the memory that is to be cleared within a predetermined time interval, wherein the amount of memory to be cleared is based on an estimate of how much new data is anticipated to be stored in the memory within the time interval; copying modified data from the cache memory to the database; determining whether an additional amount of cache memory needs to be cleared, wherein additional modified data are copied from the cache memory to the database until the designated amount of memory becomes available for storage of new data; checkpointing modified data to a checkpoint file with at least one sequential input/output operation; identifying a marked record in the memory; opening a page corresponding to the marked record; copying the marked record to the page; unmarking the record; regulating a number of marked records to be cleared within the time interval; storing the new data in the designated amount of memory that has been cleared. - View Dependent Claims (9, 10, 11)
-
-
12. In a client/server computer system, a method for writing modified data stored in a cache memory back to a database stored in a mass storage device by a helper process, comprising the steps of:
-
processing a set of data stored in said cache memory by a plurality of user processes; checkpointing modified data to a checkpoint file with at least one sequential input/output operation; identifying a marked record in the memory; opening a page corresponding to the marked record; copying the marked record to the page; unmarking the record; designating one of the plurality of user processes as being said helper process, wherein said helper process is used to write back modified data; determining whether said helper process has processed a set of data that has been modified; in response to a determination that said helper process has processed said set of data that has been modified, writing said set of data that has been modified from the cache memory back to said database stored in said mass storage device.
-
-
13. A client/server computer system, comprising:
-
a plurality of client computers in a computer network; a mass storage device coupled to said client computers for storing a database; a server computer having a main memory coupled to said client computers and said mass storage device upon which a plurality of user processes are running to process data stored in said main memory, wherein one of said user processes is designated as being a helper process used to write back modified data from said main memory to said database of said mass storage device; a checkpoint file to which modified data stored in the memory is written to the checkpoint by a sequential input/output operation; a circuit for performing a modulated sweep function for controlling a number of modified data that is to be cleared from the memory within the time interval; a circuit which determines after a transaction commits, whether a page corresponding to a record that was modified by the transaction is available in a page cache, wherein the record is written to the page if the page is available in the page cache and unmarked.
-
-
14. A computer-readable medium having stored thereon instructions for causing a computer system to write data that has been modified and which is stored in a memory to a database stored in a magnetic storage device, comprising the steps of:
-
processing a set of data stored in a cache memory by a plurality of user processes; checkpointing modified data to a checkpoint file with at least one sequential input/output operation; identifying a marked record in the memory; opening a page corresponding to the marked record; copying the marked record to the page; unmarking the record; designating one of the plurality of user processes as being said helper process, wherein said helper process is used to write back modified data; determining whether said helper process has processed a set of data that has been modified; in response to a determination that said helper process has processed said set of data that has been modified, writing said set of data that has been modified from the cache memory back to said database stored in a mass storage device.
-
Specification