Back to results
US 11,768,716 B2Granted
Request of an MCS lock by guests
AssigneeHewlett Packard Enterprise Development LP
InventorsHideaki Kimura, Tianzheng Wang, Milind M. Chabbi
Life of this patent
Estimating the term…
Abstract
In example implementations, a method include receiving a request for a lock in a Mellor-Crummey Scott (MCS) lock protocol from a guest user that is context free (e.g., a process that does not bring a queue node). The lock determines that it contains a null value. The lock is granted to the guest user. A pi value is received from the guest user to store in the lock. The pi value notifies subsequent users that the guest user has the lock.
Claims20
A method, comprising:
- receiving a request for a lock in a Mellor-Crummey Scott (MCS) lock protocol from a guest user lacking a queue node for participating in the MCS lock protocol, wherein the queue node encapsulates a context for participation in the MCS lock protocol;
- determining that the lock contains a null value;
- granting the lock to the guest user;
- receiving a sentinel value to store in the lock to notify subsequent users that the guest user has the lock;
- receiving requests for the lock from regular users of different groups while the guest user has the lock, the regular users having queue nodes for participating in the MCS lock protocol;
- assigning a lock integer to a regular user of a first group, the lock integer being a positive integer;
- setting, based on a product of the lock integer and a non-zero multiplier, a duration of time that the regular user of the first group is prohibited from polling the lock, wherein the regular user of the first group does not poll the lock during the duration of time;
- incrementing the lock integer in response to assigning the lock integer to the regular user of the first group such that the incremented lock integer is larger than the lock integer;
- assigning the incremented lock integer to a regular user of a second group that requested the lock subsequent to the regular user of the first group requesting the lock;
- and
- setting, based on a product of the incremented lock integer and the non-zero multiplier, a second duration of time that the regular user of the second group is prohibited from polling the lock, wherein the second duration of time is longer than the duration of time, and wherein the regular user of the second group does not poll the lock during the second duration of time.
8 more elements
A method, comprising:
- receiving requests for a lock in a Mellor-Crummey Scott (MCS) lock protocol from regular users of different groups, the regular users having queue nodes for participating in the MCS lock protocol, wherein the queue nodes encapsulate contexts for participation in the MCS lock protocol;
- determining that the lock contains a sentinel value indicating that a guest user lacking a queue node for participating in the MCS lock protocol has acquired the lock;
- assigning a lock integer to a regular user of a first group, the lock integer being a positive integer;
- setting, based on a product of the lock integer and a non-zero multiplier, a duration of time that the regular user of the first group is prohibited from polling the lock, wherein the regular user of the first group does not poll the lock during the duration of time;
- incrementing the lock integer in response to assigning the lock integer to the regular user of the first group such that the incremented lock integer is larger than the lock integer;
- assigning the incremented lock integer to a regular user of a second group that requested the lock subsequent to the regular user of the first group requesting the lock;
- and
- setting, based on a product of the incremented lock integer and the non-zero multiplier, a second duration of time that the regular user of the second group is prohibited from polling the lock, wherein the second duration of time is longer than the duration of time, and wherein the regular user of the second group does not poll the lock during the second duration of time.
5 more elements
A method, comprising:
- sending a request for a lock in a Mellor-Crummey Scott (MCS) lock protocol from a guest user lacking a queue node for participating in the MCS lock protocol, wherein the queue node encapsulates a context for participation in the MCS lock protocol;
- determining that the lock contains a pointer value of a regular user having a queue node for participating in the MCS lock protocol, the pointer value corresponding to an end of a queue and being a part of the queue node of the regular user;
- performing an atomic swap operation using a sentinel value to obtain the pointer value;
- installing a guest waiting (GW) value in a first field following the pointer value such that other users are prevented from acquiring the lock between the regular user and the guest user;
- determining that the first field has been changed to a guest granted (GG) value;
- and
- sending a guest acquired (GA) value to a second field next to the first field to indicate that the guest user has acquired the lock and to allow the regular user to exit.
4 more elements
Dependencies are inferred from the claim text.