Achieving Both Locking Fairness and Locking Performance with Spin Locks
AssigneeInternational Business Machines Corporation
InventorGong Su
Life of this patent
Estimating the term…
Abstract
A method for implementing a spin lock in a system including a plurality of processing nodes, each node including at least one processor and a cache memory, the method including steps of: acquiring exclusivity to the cache memory; checking the availability of the spin lock; setting the spin lock to logical one if the spin lock is available; setting the spin lock to logical zero once processing is complete; and explicitly yielding the cache memory exclusivity. Yielding the cache memory exclusivity includes instructing the cache coherent hardware to mark the cache memory as non-exclusive. The cache memory is typically called level two cache.
Claims20
A method for implementing a spin lock in a system comprising a plurality of processing nodes, each node comprising at least one processor and a cache memory, the method comprising steps of:
- obtaining exclusivity to the cache memory;
- determining whether the spin lock is available;
- acquiring the spin lock upon determining that the spin lock is available;
- releasing the spin lock once processing is complete;
- and
- yielding the exclusivity to the cache memory.
An information processing system comprising:
- a main memory comprising a spin lock;
- a plurality of nodes operatively connected to the main memory, each node comprising:
- cache memory;
- one or more processors, operatively connected to the main memory and configured for carrying out instructions to:
- obtain exclusivity to the cache memory;
- determine availability of the spin lock;
- acquire the spin lock upon determining that it is available;
- release the spin lock once processing completes;
- and
- yield the exclusivity to the cache memory;
- and
- cache coherent hardware.
A computer program product for implementing a spin lock in a system comprising a plurality of processing nodes, each node comprising at least one processor and a cache memory, the computer program product comprising logic for performing steps of:
- obtaining exclusivity to the cache memory;
- determining whether the spin lock is available;
- acquiring the spin lock upon determining that the spin lock is available;
- releasing the spin lock once processing is complete;
- and
- yielding the exclusivity to the cache memory.
Dependencies are inferred from the claim text.