Adjustment of a sleep duration for a process based on an expected time for securing a spinlock
AssigneeInternational Business Machines Corporation
InventorsSeamus J. Burke, Trung N. Nguyen, Louis A. Rasor
Life of this patent
Estimating the term…
Abstract
A computational device maintains a spinlock for exclusive access of a resource by a process of a plurality of processes. In response to determining by the process that a turn for securing the spinlock has not arrived for the process, a sleep duration is determined for the process, prior to making a next attempt to secure the spinlock.
Claims19
1-20. (canceled)
A method, comprising:
- maintaining, by a computational device, a spinlock for exclusive access of a resource by a process of a plurality of processes;
- and
- in response to determining by the process that a turn for securing the spinlock has not arrived for the process, determining a sleep duration for the process based on a number of tickets remaining to be processed for securing the spinlock and an average time duration to process a ticket.
A system, comprising:
- a memory;
- a processor coupled to the memory, wherein the processor performs operations, the operations comprising:
- maintaining a spinlock for exclusive access of a resource by a process of a plurality of processes;
- and
- in response to determining by the process that a turn for securing the spinlock has not arrived for the process, determining a sleep duration for the process based on a number of tickets remaining to be processed for securing the spinlock and an average time duration to process a ticket.
A computer program product, the computer program product comprising a computer readable storage medium having computer readable program code embodied therewith, the computer readable program code configured to perform operations, the operations comprising:
- maintaining a spinlock for exclusive access of a resource by a process of a plurality of processes;
- and
- in response to determining by the process that a turn for securing the spinlock has not arrived for the process, determining a sleep duration for the process based on a number of tickets remaining to be processed for securing the spinlock and an average time duration to process a ticket.
Dependencies are inferred from the claim text.