Parallel Lock Spinning Using Wake-and-Go Mechanism
First Claim
1. A method, in a data processing system, for performing a wake-and-go operation in response to detecting a thread spinning on a lock, the method comprising:
- detecting that a thread is spinning on a lock at a target address;
responsive to detecting the thread spinning on the lock, populating a wake-and-go storage array with the target address and placing the thread in a sleep state; and
responsive to an event associated with the target address, placing the thread in a non-sleep state.
1 Assignment
0 Petitions
Accused Products
Abstract
A wake-and-go mechanism is provided for a data processing system. The wake-and-go mechanism recognizes a programming idiom that indicates that a thread is spinning on a lock. The wake-and-go mechanism updates a wake-and-go array with a target address associated with the lock and sets a lock bit in the wake-and-go array. The thread then goes to sleep until the lock frees. The wake-and-go array may be a content addressable memory (CAM). When a transaction appears on the symmetric multiprocessing (SMP) fabric that modifies the value at a target address in the CAM, the CAM returns a list of storage addresses at which the target address is stored. The wake-and-go mechanism associates these storage addresses with the threads waiting for an even at the target addresses, and may wake the thread that is spinning on the lock.
127 Citations
20 Claims
-
1. A method, in a data processing system, for performing a wake-and-go operation in response to detecting a thread spinning on a lock, the method comprising:
-
detecting that a thread is spinning on a lock at a target address; responsive to detecting the thread spinning on the lock, populating a wake-and-go storage array with the target address and placing the thread in a sleep state; and responsive to an event associated with the target address, placing the thread in a non-sleep state. - View Dependent Claims (2, 3, 4, 5, 6, 7)
-
-
8. A data processing system, comprising:
-
a wake-and-go mechanism; and a wake-and-go storage array, wherein the wake-and-go mechanism is configured to; detect that a thread is spinning on a lock at a target address; responsive to detecting the thread spinning on the lock, populate the wake-and-go storage array with the target address and place the thread in a sleep state; and responsive to an event associated with the target address, placing the thread in a non-sleep state. - View Dependent Claims (9, 10, 11, 12, 13, 14)
-
-
15. A computer program product comprising a computer useable medium having a computer readable program, wherein the computer readable program, when executed on a computing device, causes the computing device to:
-
detect that a thread is spinning on a lock at a target address; responsive to detecting the thread spinning on the lock, populate a wake-and-go storage array with the target address and place the thread in a sleep state; and responsive to an event associated with the target address, place the thread in a non-sleep state. - View Dependent Claims (16, 17, 18, 19, 20)
-
Specification