Queued locking of a shared resource using multimodal lock types
First Claim
Patent Images
1. An intelligent data storage system comprising:
- a shared resource;
a plurality of processors as lock requestors, each processor supporting atomic read-modify-write transactions 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 lest two lock mode procedures, a lock mode selection procedure for selecting one from the lock mode procedures by a successful lock requestor, a queuing procedure for unsuccessful lock requesters, and locking and unlocking procedures for locking and unlocking the shared resource in the selected lock mode by a successful lock requestor;
a 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 requestors, and to validate the existence of the lock;
each requesting processor being operable in accordance with its lock services procedure, in a single atomic read-modify-write transaction, 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 either, if the lock contents are valid and some other requesting processor has previously locked the shared resource, 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, or if the contents are invalid or no other requesting processor has previously locked the shared resource, to write data to the main lock data structure to reserve and validate the lock.
9 Assignments
0 Petitions
Accused Products
Abstract
A lock for managing shared resources in a data processing system enables a requesting processor, in a signal atomic transaction, to validate the main lock data structure, request a lock, take the lock and establish a lock mode if successful, or establish its place in a queue of requesters for subsequent locks on the shared resource if unsuccessful.
-
Citations
8 Claims
-
1. An intelligent data storage system comprising:
-
a shared resource;
a plurality of processors as lock requestors, each processor supporting atomic read-modify-write transactions 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 lest two lock mode procedures, a lock mode selection procedure for selecting one from the lock mode procedures by a successful lock requestor, a queuing procedure for unsuccessful lock requesters, and locking and unlocking procedures for locking and unlocking the shared resource in the selected lock mode by a successful lock requestor;
a 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 requestors, and to validate the existence of the lock;
each requesting processor being operable in accordance with its lock services procedure, in a single atomic read-modify-write transaction, 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 either, if the lock contents are valid and some other requesting processor has previously locked the shared resource, 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, or if the contents are invalid or no other requesting processor has previously locked the shared resource, to write data to the main lock data structure to reserve and validate the lock.- View Dependent Claims (2, 3, 4)
-
-
5. A method of providing self-validating, queued multimodal lock services for managing a shared resource in a data processing system including a plurality of processors as lock requestors, each processor supporting atomic read-modify-write transactions 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 as requestors, the main lock data structure including in a single structure the resources needed to lock the shared resource, to identify one of at least two lock modes, to establish a queue of unsuccessful lock requestors, and to validate the existence of the lock;
providing for each processor a lock services procedure including at least two lock mode procedures, a lock mode selection procedure for selecting one from the lock modes by a successful lock requestor, a queuing procedure for unsuccessful lock requestors, and locking and unlocking procedures for locking and unlocking the shared resource in the selected lock mode by a successful lock requestor;
in a single atomic read-modify-write transaction by one of the requesting processors, 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 either, if the lock contents are valid and some other requesting processor has previously locked the shared resource, to write data to the lock data structure to establish its place in a queue of requestors for subsequent locks on the shared resource, or if the contents are invalid or no other requesting processor has previously locked the shared resource, to write data to the main lock data structure to reserve and validate the lock. - View Dependent Claims (6, 7, 8)
-
Specification