×

Fast intersystem page transfer in a data sharing environment with record locking

  • US 5,327,556 A
  • Filed: 05/11/1993
  • Issued: 07/05/1994
  • Est. Priority Date: 02/15/1991
  • Status: Expired due to Fees
First Claim
Patent Images

1. In a system for sharing access to data among a plurality of database management systems (DBMS'"'"'s) by issuing locks to processes executing in the DBMS'"'"'s, the data being held in units of transfer ("data units") in DBMS buffers or being copied to the DBMS buffers from one or more disks to which all of the DBMS'"'"'s are coupled, the locks being issued and managed by a global lock manager to which each of the DBMS'"'"'s is coupled by a respective communications link, the locks including P locks on data units and L locks on records in the data units, the system including means for coupling each DBMS to all other DBMS'"'"'s for transferring data, a method for providing fast access to data units, the method comprising the steps of:

  • maintaining a global lock table at the global lock manager, the global lock table including one or more entries, each entry corresponding to a lock granted to a DBMS;

    issuing a P lock for updating a data unit to a first DBMS;

    entering an entry for the P lock in the global lock table;

    providing a first version of the data unit from a disk to a buffer of the first DBMS;

    generating an updated version of the data unit in the buffer by updating the first version of the data unit at the first DBMS;

    in response to updating the first version of the data unit;

    generating a version number for the updated version of the data unit in the buffer of the first DBMS, the version number being a monotonically increasing number;

    attaching the version number to the updated version of the data unit in the buffer of the first DBMS; and

    storing the version number in the entry for the P lock in the global lock table;

    issuing a request from a second DBMS for an L lock to read a record in the data unit;

    in response to the request for the L lock, providing the second DBMS with the version number stored in the global lock table and granting the L lock;

    if a buffer version of the data unit is in a buffer of the second DBMS, comparing the version number in the buffer version of the data unit with the version number from the global lock table and requesting the data unit from the global lock manager if the version number in the buffer version of the data unit is less than the version number from the global lock table;

    otherwise,if no version of the data unit is in a buffer of the second DBMS, issuing a request from the second DBMS for a P lock to read the data unit;

    providing a request from the global lock manager to the first DBMS to transfer the data unit to the second DBMS in response to the P lock request;

    transferring the updated version of the data unit from the first DBMS to the second DBMS and providing the version number of the updated version of the data unit from the first DBMS to the global lock manager;

    forwarding the version number received from the first DBMS by the global lock manager to the second DBMS;

    if the version number provided to the second DBMS is greater than the version number in the updated version of the data unit received by the second DBMS or if the updated version of the data unit has not been received at the second DBMS when the version number arrives, writing the updated version of the data unit to a disk from the first DBMS, providing the updated version of the data unit to the second DBMS from the disk and reading the record;

    otherwise,reading the record from the updated version of the data unit transferred to the second DBMS from the first DBMS.

View all claims
  • 0 Assignments
Timeline View
Assignment View
    ×
    ×