×

Hybrid Locking Using Network and On-Disk Based Schemes

  • US 20100017409A1
  • Filed: 09/23/2009
  • Published: 01/21/2010
  • Est. Priority Date: 02/06/2004
  • Status: Active Grant
First Claim
Patent Images

1. A method of acquiring a lock by a node, on a shared resource in a system of a plurality of interconnected nodes, the method comprising:

  • (a) probing a local lock metadata of the node to determine if a lock metadata of the lock exists in the local lock metadata, wherein the lock metadata includes an identity of the lock and a lock status;

    (b) if the lock metadata does not exist in the local lock metadata, performing steps (i) to (iv),(i) reading shared lock metadata of the lock from a shared storage, the reading includes identifying a current owner of the lock and a current status of the lock;

    (ii) probing heartbeat region of the current owner of the lock to ascertain if the current owner is alive, wherein if the current owner is not alive, waiting for a lock lease time to run out and then acquiring the lock and updating the shared lock metadata to indicate that the lock is now owned by the node;

    (iii) if the current status of the lock indicates that the current owner is holding the lock in an exclusive mode, returning a message to the node to notify that the lock is not free;

    (iv) if the current status of the lock indicates that the current owner is holding the lock in a managed mode, sending a request to the current owner to release the lock, wherein if the current owner has already not released the lock to another requesting node, the lock is granted to the node without performing a mutual exclusive primitive operation on the shared resource, and the shared lock metadata is updated to indicate new lock ownership and lock status; and

    (c) if the lock metadata exists in the local lock metadata, of the node, probing the lock status of the lock in the local lock metadata, if the lock status of the lock in the local lock metadata indicates that the lock being owned in a managed mode, changing the lock status of the lock in local lock metadata to indicate an exclusive use of the lock by the node and updating the shared lock metadata to indicate that the lock being owned by the node in an exclusive mode,wherein the managed mode means that the lock is being owned by the node but the lock is not being used by the node.

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