×

Lock management method in cluster, lock server, and client

  • US 10,257,282 B2
  • Filed: 04/17/2018
  • Issued: 04/09/2019
  • Est. Priority Date: 12/14/2015
  • Status: Active Grant
First Claim
Patent Images

1. A lock management method in a cluster, the cluster comprising a plurality of clients and a lock server, the lock server comprising an interface card and a memory, and the method comprising:

  • receiving, by the interface card, a first write lock request carrying an identifier of a first client in the clients and a memory address of a queue head of a write lock request queue in the memory from the first client, the write lock request queue recording an identifier of a client in a write lock waiting state for a shared resource and an identifier of a client obtaining a write lock for the shared resource, a write lock allocation identifier indicating whether the write lock for the shared resource is allocated, and a read lock allocation count indicating a quantity of read locks allocated for the shared resource;

    writing, by the interface card, the identifier of the first client into the memory address of the queue head of the write lock request queue;

    querying, by the interface card, the read lock allocation count to determine whether a read lock has been allocated;

    setting, by the interface card, the write lock allocation identifier to a write lock allocated state when the read lock is not allocated;

    sending, by the interface card, a first message to the first client indicating that the first client obtains the write lock; and

    sending, by the interface card, a second message indicating that the first client is in the write lock waiting state to the first client.

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