Selective validation for queued multimodal locking services
First Claim
Patent Images
1. A method for providing queued, multimodal, self-validating locking and unlocking services for managing a shared resource in a data processing system including a plurality of processors as lock requesters, 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 the shared resource, an associated main lock data structure stored in a shared memory accessible by a 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 requester, to identify one of at least two lock modes, to establish a queue of unsuccessful lock requestors, and to validate the existence of a lock;
providing for each processor a lock services procedure including at leas first and second lock mode procedures, a lock mode selection procedure for selecting one from the lock mode procedures by a successful lock requester, a queuing procedure for unsuccessful lock requesters, locking and unlocking procedures for locking and unlocking the shared resource in the selected lock mode by a successful lock requestor, and a supplemental validation procedure selectively associated with the second lock mode for validating the lock by a successful lock requestor;
selecting one from the lock modes by a requesting processor;
in a single atomic operation by the requesting processor, examining the contents of the main lock data structure to determine if another requesting processor has previously locked the shared resource and if the lock contents are valid, and writing data to the main lock data structure to establish its place in a queue of requesters for subsequent locks on the shared resource if some other requesting processor has previously locked the shared resource and the lock contents are also valid, or writing data to the main lock data structure to reserve and validate the lock and to identify the first lock mode if the lock contents are invalid or if no other requesting processor has previously locked the shared resource; and
then, if the lock contents are invalid or if no other requesting processor has previously locked the shared resource and the second lock mode has been selected by the requesting processor, executing the supplemental validation procedure by the requesting processor to validate the lock allocation to that requesting processor and, if the supplemental validation procedure does validate the lock allocation to that requesting processor, then, writing data to the main lock data structure to identify the second lock mode.
9 Assignments
0 Petitions
Accused Products
Abstract
A queued, multimodal, self-validating lock mechanism selectively associates supplemental validation procedures with certain lock modes. Only those lock modes which heavily drain system resources are extensively validated.
-
Citations
2 Claims
-
1. A method for providing queued, multimodal, self-validating locking and unlocking services for managing a shared resource in a data processing system including a plurality of processors as lock requesters, 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 the shared resource, an associated main lock data structure stored in a shared memory accessible by a 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 requester, to identify one of at least two lock modes, to establish a queue of unsuccessful lock requestors, and to validate the existence of a lock;
providing for each processor a lock services procedure including at leas first and second lock mode procedures, a lock mode selection procedure for selecting one from the lock mode procedures by a successful lock requester, a queuing procedure for unsuccessful lock requesters, locking and unlocking procedures for locking and unlocking the shared resource in the selected lock mode by a successful lock requestor, and a supplemental validation procedure selectively associated with the second lock mode for validating the lock by a successful lock requestor;
selecting one from the lock modes by a requesting processor;
in a single atomic operation by the requesting processor, examining the contents of the main lock data structure to determine if another requesting processor has previously locked the shared resource and if the lock contents are valid, and writing data to the main lock data structure to establish its place in a queue of requesters for subsequent locks on the shared resource if some other requesting processor has previously locked the shared resource and the lock contents are also valid, or writing data to the main lock data structure to reserve and validate the lock and to identify the first lock mode if the lock contents are invalid or if no other requesting processor has previously locked the shared resource; and
then,if the lock contents are invalid or if no other requesting processor has previously locked the shared resource and the second lock mode has been selected by the requesting processor, executing the supplemental validation procedure by the requesting processor to validate the lock allocation to that requesting processor and, if the supplemental validation procedure does validate the lock allocation to that requesting processor, then, writing data to the main lock data structure to identify the second lock mode.
-
-
2. 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;
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 at least first and second lock mode procedures, a lock mode selection procedure for selecting one from the lock mode procedures by a successful lock requester, a queuing procedure for unsuccessful lock requestors, locking and unlocking procedures for locking and unlocking the shared resource in the selected lock mode by a successful lock requester, and a supplemental validation procedure selectively associated with the second lock mode for validating the lock by a successful lock requester;
an atomic main lock data structure, responsive to the lock services procedure, implemented in the shared memory and associated with the shared resource, which includes the resources needed to lock the shared resource by a successful lock requestor, to identify one of the lock modes, to establish a queue of unsuccessful lock requesters, and to validate the existence of the lock;
each requesting processor being operable in accordance with its lock services procedure;
to select from one of the lock modes, in a single atomic operation, to examine the contents of the main lock data structure to determine if another requesting processor has previously locked the shared resource and if the lock contents are valid, and to write data to the main lock data structure to establish its place in a queue of requestors for subsequent locks on the shared resource if some other requesting processor has previously locked the shared resource and the lock contents are also valid, or to write data to the main lock data structure to reserve and validate the lock and to identify the first lock mode if the lock contents are invalid or if no other requesting processor has previously locked the shared resource; and
then,if the lock contents are invalid or no other requesting processor has previously locked the shared resource and the second lock mode has been selected by the requesting processor, executing the supplemental validation procedure by the requesting processor to validate the lock allocation to that requesting processor and, if the supplemental validation procedure does validate the lock allocation to that requesting processor, then, writing data to the main lock data structure to identify the second lock mode.
-
Specification