Adjustment of a sleep duration for a process based on an expected time for securing a spinlock
First Claim
Patent Images
1. 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 indicated by a ticket number of the process 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; and
entering, by the process, a sleep mode the sleep duration.
1 Assignment
0 Petitions
Accused Products
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.
-
Citations
18 Claims
-
1. 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 indicated by a ticket number of the process 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; and entering, by the process, a sleep mode the sleep duration. - View Dependent Claims (2, 3, 4, 5, 6)
-
-
7. 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 indicated by a ticket number of the process 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; and entering, by the process, a sleep mode the sleep duration. - View Dependent Claims (8, 9, 10, 11, 12)
-
-
13. 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 indicated by a ticket number of the process 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; and entering, by the process, a sleep mode the sleep duration. - View Dependent Claims (14, 15, 16, 17, 18)
-
Specification