×

Method and apparatus providing optimistic locking of shared computer resources

  • US 6,850,938 B1
  • Filed: 02/08/2001
  • Issued: 02/01/2005
  • Est. Priority Date: 02/08/2001
  • Status: Active Grant
First Claim
Patent Images

1. A method of updating a resource object using optimistic locks, the method comprising the computer-implemented steps of:

  • receiving from a client process a request to update a particular resource object;

    sending to a lock manager process a request for a first lock for access to the particular resource object, the request including data indicating an optimistic lock type;

    receiving the first lock for access to the particular resource object, the first lock including data indicating the resource object, the optimistic lock type and a first value for a version number related to a number of changes to the resource object since the lock manager generated a lock data structure corresponding to the resource object; and

    updating the resource object by sending to a lock manager process a request for a second lock for access to the particular resource object, the request including data indicating the resource object identification and an exclusive lock type;

    receiving the second lock for access to the particular resource object, the second lock including data indicating the resource object identification, the exclusive lock type and a second value for the version number;

    determining whether the second value for the version number substantially equals the first value for the version number; and

    if the second value substantially equals the first value, then committing an updated resource object to the resource, and replacing the second value for the version number in the second lock with a third value for the version number, the third value computed by adding the second value and a predetermined version change value.

View all claims
  • 1 Assignment
Timeline View
Assignment View
    ×
    ×