Method and system for autonomically adaptive mutexes
First Claim
1. A method for managing a mutex in a data processing system, the method comprising:
- maintaining an average acquisition cost value for a mutex;
attempting to acquire the mutex by a first thread; and
in response to a determination that the mutex has already been acquired by a second thread, determining to enter a spin state or a sleep state on the first thread based on the average acquisition cost value for the mutex.
1 Assignment
0 Petitions
Accused Products
Abstract
A method for managing a mutex in a data processing system is presented. For each mutex, an average acquisition cost is maintained that indicates an average consumption of computational resources that has been incurred by threads attempting to acquire the mutex. If a thread attempts to acquire a locked mutex, then the thread enters a spin state or a sleep state based on restrictive conditions and the average acquisition cost value for the mutex at that time. A thread-specific current acquisition cost value is maintained that represents the consumption of computational resources by the thread after the initial attempt to acquire the mutex and prior to acquiring the mutex. When the thread acquires the mutex, the thread-specific current acquisition cost value is included into the average acquisition cost value.
-
Citations
33 Claims
-
1. A method for managing a mutex in a data processing system, the method comprising:
-
maintaining an average acquisition cost value for a mutex;
attempting to acquire the mutex by a first thread; and
in response to a determination that the mutex has already been acquired by a second thread, determining to enter a spin state or a sleep state on the first thread based on the average acquisition cost value for the mutex. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11)
-
-
12. An apparatus for managing a mutex in a data processing system, the apparatus comprising:
-
means for maintaining an average acquisition cost value for a mutex;
means for attempting to acquire the mutex by a first thread; and
means for determining to enter a spin state or a sleep state on the first thread based on the average acquisition cost value for the mutex in response to a determination that the mutex has already been acquired by a second thread. - View Dependent Claims (13, 14, 15, 16, 17, 18, 19, 20, 21, 22)
-
-
23. A computer program product on a computer readable medium for use in a data processing system for managing a mutex, the computer program product comprising:
-
means for maintaining an average acquisition cost value for a mutex;
means for attempting to acquire the mutex by a first thread; and
means for determining to enter a spin state or a sleep state on the first thread based on the average acquisition cost value for the mutex in response to a determination that the mutex has already been acquired by a second thread. - View Dependent Claims (24, 25, 26, 27, 28, 29, 30, 31, 32, 33)
-
Specification