Cooperative lock override procedure
First Claim
Patent Images
1. A method for providing cooperative queued locking and unlocking services for managing a shared resource in a data processing system including a plurality of processors as lock requestors, each processor supporting atomic operations and being coupled to the shared resource through one or more first common communication channels, including the steps of:
- providing for each processor a monitoring procedure for detecting a predetermined indication of protocol failure by any one of the plurality of processors and identifying the failing processor;
providing for each processor a lock services procedure including a queuing procedure for unsuccessful lock requestors, locking and unlocking procedures for locking and unlocking the shared resource by a successful lock requestor, and a lock override procedure responsive to the detection of the predetermined indication of protocol failure;
providing for the shared resource, an associated main lock data structure stored in a shared memory accessible by the plurality of processors, the main lock data structure including in a single atomic structure, the resources needed to lock the shared resource by a successful lock requestor, to establish a queue of unsuccessful lock requestors, and to validate the existence of the lock;
providing for the shared resource, an associated auxiliary lock data structure stored in a shared memory accessible by the plurality of processors, the auxiliary lock data structure including the resources needed to identify the successful lock requestor'"'"'s place in a queue of requestors and to identify the successful lock requestor;
detecting, by one of the processors, a predetermined indication of protocol failure and identifying the failing processor by the detecting processor;
initiating the lock override procedure by the detecting processor responsive to the predetermined indication of protocol failure; and
, in a single atomic operation by the detecting processor, examining the contents of the auxiliary lock data structure to determine if the identified failing processor is the successful lock requestor, and either, if the identified failing processor is the successful lock requestor, in a single atomic operation by the detecting processor, examining the contents of the main lock data structure and writing data to the main lock data structure to reserve the lock to the next requestor in the queue of unsuccessful lock requestors and to revalidate the lock, or, if the identified failing processor is not the successful lock requestor, exiting the cooperative lock override procedure.
9 Assignments
0 Petitions
Accused Products
Abstract
Queued lock services for managing a shared resource in a data processing system include a cooperative lock override procedure. On detecting a protocol failure by another processor, the detecting processor confirms that the failing processor is the lockholder and passes the lock to the next requestor in the queue.
251 Citations
8 Claims
-
1. A method for providing cooperative queued locking and unlocking services for managing a shared resource in a data processing system including a plurality of processors as lock requestors, each processor supporting atomic operations and being coupled to the shared resource through one or more first common communication channels, including the steps of:
-
providing for each processor a monitoring procedure for detecting a predetermined indication of protocol failure by any one of the plurality of processors and identifying the failing processor;
providing for each processor a lock services procedure including a queuing procedure for unsuccessful lock requestors, locking and unlocking procedures for locking and unlocking the shared resource by a successful lock requestor, and a lock override procedure responsive to the detection of the predetermined indication of protocol failure;
providing for the shared resource, an associated main lock data structure stored in a shared memory accessible by the plurality of processors, the main lock data structure including in a single atomic structure, the resources needed to lock the shared resource by a successful lock requestor, to establish a queue of unsuccessful lock requestors, and to validate the existence of the lock;
providing for the shared resource, an associated auxiliary lock data structure stored in a shared memory accessible by the plurality of processors, the auxiliary lock data structure including the resources needed to identify the successful lock requestor'"'"'s place in a queue of requestors and to identify the successful lock requestor;
detecting, by one of the processors, a predetermined indication of protocol failure and identifying the failing processor by the detecting processor;
initiating the lock override procedure by the detecting processor responsive to the predetermined indication of protocol failure; and
,in a single atomic operation by the detecting processor, examining the contents of the auxiliary lock data structure to determine if the identified failing processor is the successful lock requestor, and either, if the identified failing processor is the successful lock requestor, in a single atomic operation by the detecting processor, examining the contents of the main lock data structure and writing data to the main lock data structure to reserve the lock to the next requestor in the queue of unsuccessful lock requestors and to revalidate the lock, or, if the identified failing processor is not the successful lock requestor, exiting the cooperative lock override procedure. - View Dependent Claims (2, 3, 4)
-
-
5. An intelligent data storage system comprising:
-
a shared resource;
a plurality of processors as lock requestors, each processor supporting atomic operations and being coupled to the shared resource through one or more first common communication channels, and each processor implementing a monitoring procedure for detecting a predetermined indication of protocol failure by any one of the plurality of processors and identifying the failing processor;
a shared memory accessible over one or more second common communications channels to all of the processors;
a lock services procedure implemented in each of the processors, the lock services procedure including a queuing procedure for unsuccessful lock requestors, and locking and unlocking procedures for locking and unlocking the shared resource by a successful lock requestor, and a cooperative lock override procedure responsive to the detection of the predetermined indication of protocol failure;
an atomic main lock data structure, responsive to the lock services procedures, implemented in the shared memory and associated with the shared resource, which includes the resources needed to lock a shared resource by a successful lock requestor, to establish a place in a queue of unsuccessful lock requestors, and validate the existence of the lock;
an atomic auxiliary lock data structure, responsive to the lock services procedures, implemented in the shared memory and associated with the shared resource, which includes the resources needed to identify the successful lock requestor'"'"'s place in a queue of requestors and to identify the successful lock requestors;
each processor other than the successful lock requestor being operable in accordance with its monitoring procedure to detect a predetermined indication of protocol failure and identify the failing processor; and
in accordance with its lock services procedure, first to initiate its cooperative lock override procedure responsive to its detection of the predetermined indication of protocol failure, and then in a single atomic operation, to examine the contents of the auxiliary lock data structure to determine if the identified failing processor is the successful lock requestor, and either, if the identified failing processor is the successful lock requestor, in a single atomic operation, to examine the contents of the main lock data structure and write data to the main lock data structure to reserve the lock to the next requestor in the queue of unsuccessful lock requestors and to revalidate the lock, or, if the identified failing processor is not the successful lock requestor, to exit the cooperative lock override procedure.- View Dependent Claims (6, 7, 8)
-
Specification