Component-specific disclaimable locks
AssigneeInternational Business Machines Corporation
InventorKirk J. Krauss
Life of this patent
Estimating the term…
Abstract
Systems and methods of protecting a shared resource in a multi-threaded execution environment in which threads are permitted to transfer control between different software components, for any of which a disclaimable lock having a plurality of orderable locks can be identified. Back out activity can be tracked among a plurality of threads with respect to the disclaimable lock and the shared resource, and reclamation activity among the plurality of threads may be ordered with respect to the disclaimable lock and the shared resource.
Claims24
A computer-implemented method comprising:
- tracking back out activity among a plurality of threads with respect to a disclaimable lock having a plurality of orderable locks, wherein tracking the back out activity includes, for each disclaiming thread,
- receiving a request to back out of the disclaimable lock from the disclaiming thread,
- creating an orderable lock in response to the request to back out of the disclaimable lock,
- adding the orderable lock to a list of orderable locks associated with the disclaimable lock,
- designating the orderable lock as a current lock,
- storing a recursion count of the disclaiming thread, and
- issuing a back out event,
- receiving a request to reclaim the disclaimable lock from a current thread;
- determining whether the current lock of the disclaimable lock is associated with the current thread if the disclaimable lock is not held by another thread;
- removing, if the current lock of the disclaimable lock is associated with the current thread, a first orderable lock from the list of orderable locks associated with the disclaimable lock;
- designating a second orderable lock as the current lock;
- reinstating a recursion count of the current thread;
- granting acquisition of the current lock to the current thread;
- and
- issuing a reclamation event.
A computer program product comprising:
- a computer readable storage medium;
- and
- computer usable code stored on the computer readable storage medium, where, if executed by a processor, the computer usable code causes a computer to:
- track back out activity among a plurality of threads with respect to a disclaimable lock having a plurality of orderable locks, wherein the computer usable code to track the back out activity is to, for each disclaiming thread,
- receive a request to back out of the disclaimable lock from the disclaiming thread,
- create an orderable lock in response to the request to back out of the disclaimable lock,
- add the orderable lock to a list of orderable locks associated with the disclaimable lock,
- designate the orderable lock as a current lock,
- store a recursion count of the disclaiming thread, and
- issue a back out event,
- receive a request to reclaim the disclaimable lock from a current thread;
- determine whether the current lock of the disclaimable lock is associated with the current thread if the disclaimable lock is not held by another thread;
- remove, if the current lock of the disclaimable lock is associated with the current thread, a first orderable lock from the list of orderable locks associated with the disclaimable lock;
- designate a second orderable lock as the current lock;
- reinstate a recursion count of the current thread;
- grant acquisition of the current lock to the first thread;
- and
- issue a reclamation event.
A computer-implemented method comprising:
- identifying a disclaimable lock having a plurality of orderable locks;
- tracking back out activity among a plurality of threads with respect to the disclaimable lock and a shared resource;
- and
- ordering reclamation activity among the plurality of threads with respect to the disclaimable lock and the shared resource.
A computer program product comprising:
- a computer readable storage medium;
- and
- computer usable code stored on the computer readable storage medium, where, if executed by a processor, the computer usable code causes a computer to:
- identify a disclaimable lock having a plurality of orderable locks;
- track back out activity among a plurality of threads with respect to the disclaimable lock and a shared resource;
- and
- order reclamation activity among the plurality of threads with respect to the disclaimable lock and the shared resource.
Dependencies are inferred from the claim text.