Profile-driven lock handling
AssigneeInternational Business Machines Corporation
InventorsCurtis Kronlund, Scott Moore, Gregory Olson, Mark Schroeder
Life of this patent
Estimating the term…
Abstract
An apparatus, program product and method utilize metadata collected for a lock in a computer program to determine an optimal lock acquisition strategy for the lock. The metadata is typically collected via profiling of the computer program to determine a wait characteristic for the lock in the particular runtime environment in which the computer program executes, and the metadata is used to select from among different lock access implementations to be used to attempt to acquire the lock, often enabling an optimum lock access implementation to be selected for a lock.
Claims25
A computer-implemented method of processing program code configured to access a lock, the method comprising:
- accessing metadata associated with the lock to determine a wait characteristic for the lock;
- and
- based upon the accessed metadata, selecting from among a plurality of lock access implementations to access the lock.
A computer-implemented method of processing program code configured to access a lock, the method comprising:
- accessing metadata associated with the lock to determine a wait characteristic for the lock;
- and
- based upon the accessed metadata, selecting from among a plurality of register allocation strategies to be used in connection with accessing the lock.
A computer-implemented method of accessing a lock, the method comprising:
- in a first thread, accessing metadata associated with a lock held by a second thread;
- determining from the accessed metadata how much longer the lock is likely to be held by the second thread;
- and
- based upon the determination, selecting a lock access implementation for the first thread to access the lock.
An apparatus, comprising:
- a processor;
- and
- a program configured to execute on the processor to process program code configured to access a lock by accessing metadata associated with the lock to determine a wait characteristic for the lock, and based upon the accessed metadata, selecting from among a plurality of lock access implementations to access the lock.
A program product, comprising:
- a program configured to process program code configured to access a lock by accessing metadata associated with the lock to determine a wait characteristic for the lock, and based upon the accessed metadata, selecting from among a plurality of lock access implementations to access the lock;
- and
- a computer readable medium bearing the program.
Dependencies are inferred from the claim text.