Lock windows for reducing contention
First Claim
Patent Images
1. A method of assigning locks to threads, the method comprising:
- setting a window of time at the end of a time slice of a non-suspended thread, the time slice including a scheduled end and the window of time including a period of time that starts before the scheduled end of the time slice;
determining that the thread has requested a lock within the window of time;
prohibiting the thread from acquiring a lock during the window of time, based upon determining that the thread is within the window of time and determining that the thread does not hold any locks; and
timing out the thread for the remainder of the time slice of the thread.
1 Assignment
0 Petitions
Accused Products
Abstract
Methods and arrangements to assign locks to threads are discussed. Embodiments include transformations, code, state machines or other logic to assign locks to threads. Embodiments may include setting a window of time at the end of a time slice of a thread. The embodiment may also involve prohibiting the thread from acquiring a lock during the window of time, based upon determining that the thread is within the window of time and determining that the thread does not hold any locks. Other embodiments include an apparatus to assign locks to threads and a computer program product to assign locks to threads.
24 Citations
18 Claims
-
1. A method of assigning locks to threads, the method comprising:
-
setting a window of time at the end of a time slice of a non-suspended thread, the time slice including a scheduled end and the window of time including a period of time that starts before the scheduled end of the time slice; determining that the thread has requested a lock within the window of time; prohibiting the thread from acquiring a lock during the window of time, based upon determining that the thread is within the window of time and determining that the thread does not hold any locks; and timing out the thread for the remainder of the time slice of the thread. - View Dependent Claims (2, 3, 4, 5)
-
-
6. A method of assigning locks to threads, the method comprising:
-
setting a window of time at the end of a time slice of a non-suspended thread, the time slice including a scheduled end and the window of time including a start time, wherein the start time of the window of time is determined based at least in part on the size of the window of time and the scheduled end of the time slice; determining that the thread has released a lock within the window of time; determining that the thread holds no other locks; and prohibiting the thread from acquiring a lock during the window of time and timing out the thread for the remainder of the time slice of the thread, based upon determining that the thread is within the window of time, determining that the thread has requested a lock within the window of time and determining that the thread does not hold any locks. - View Dependent Claims (7, 8)
-
-
9. An apparatus to assign locks to threads, the apparatus comprising:
-
a window of time determiner to set a window of time at the end of a time slice of a non-suspended thread, the time slice including a scheduled end and the window of time including a period of time that starts before the scheduled end of the time slice; and a lock supervisor to prohibit the thread from acquiring a lock during the window of time and to time out the thread for the remainder of the time slice of the thread, based upon determining that the thread is within the window of time and determining that the thread does not hold any locks and determining that the thread has requested a lock within the window of time. - View Dependent Claims (10, 11)
-
-
12. A computer program product for assigning locks to threads, the computer program product comprising a non-transitory computer useable medium having a computer usable program code embodied therewith, the computer usable program code comprising:
-
computer usable program code configured to set a window of time at the end of a time slice of a non-suspended thread, the time slice including a scheduled end and the window of time including a period of time that starts before the scheduled end of the time slice; and computer usable program code configured to prohibit the thread from acquiring a lock during the window of time and to time out the thread for the remainder of the time slice of the thread, based upon determining that the thread is within the window of time, determining that the thread does not hold any locks and determining that the thread has requested a lock within the window of time. - View Dependent Claims (13, 14, 15, 16, 17, 18)
-
Specification