Component-specific disclaimable locks
First Claim
Patent Images
1. A computer program product comprising:
- a non-transitory 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 to release a disclaimable lock having a plurality of orderable locks that are to be arranged in a list of orderable locks, wherein the computer usable code to track the back out activity is to, for a disclaiming thread among the plurality of threads,receive a request to release the disclaimable lock from the disclaiming thread,create an orderable lock in response to the request to release the disclaimable lock,add the orderable lock to the list of orderable locks associated with the disclaimable lock as a first orderable lock,designate the orderable lock as a current lock,store a recursion count of the disclaiming thread, andissue a back out event at least to enable the disclaiming thread to release the disclaimable lock,receive a request to reclaim the disclaimable lock from a current thread among the plurality of threads;
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, wherein the current lock is associated with the current thread when the current thread is the disclaiming thread;
remove, if the current lock of the disclaimable lock is associated with the current thread, the first orderable lock from the list of orderable locks associated with the disclaimable lock;
newly 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 current thread based on the determination; and
issue a reclamation event.
1 Assignment
0 Petitions
Accused Products
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.
14 Citations
10 Claims
-
1. A computer program product comprising:
-
a non-transitory 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 to release a disclaimable lock having a plurality of orderable locks that are to be arranged in a list of orderable locks, wherein the computer usable code to track the back out activity is to, for a disclaiming thread among the plurality of threads, receive a request to release the disclaimable lock from the disclaiming thread, create an orderable lock in response to the request to release the disclaimable lock, add the orderable lock to the list of orderable locks associated with the disclaimable lock as a first orderable lock, designate the orderable lock as a current lock, store a recursion count of the disclaiming thread, and issue a back out event at least to enable the disclaiming thread to release the disclaimable lock, receive a request to reclaim the disclaimable lock from a current thread among the plurality of threads; 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, wherein the current lock is associated with the current thread when the current thread is the disclaiming thread; remove, if the current lock of the disclaimable lock is associated with the current thread, the first orderable lock from the list of orderable locks associated with the disclaimable lock; newly 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 current thread based on the determination; and issue a reclamation event. - View Dependent Claims (2, 3, 4)
-
-
5. A computer program product comprising:
-
a non-transitory computer readable storage medium; and computer usable code stored on the non-transitory 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 that are to be arranged in a list of orderable locks; track back out activity among a plurality of threads to release the disclaimable lock and a shared resource, wherein for a disclaiming thread among the plurality of threads, the computer usable code to track back out activity is to; 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 as a first orderable lock, add the first orderable lock to a list of orderable locks associated with the disclaimable lock, designate the first orderable lock as a current lock, and issue a back out event at least to enable the claiming thread to release the disclaimable lock; and order reclamation activity among the plurality of threads to reclaim the disclaimable lock and the shared resource, wherein the computer usable code to order reclamation activity is to; receive a request to reclaim the disclaimable lock from a current thread, determine whether a 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, the current lock from the list of orderable locks associated with the disclaimable lock, newly designate another orderable lock as the current lock, grant acquisition of the current lock to the current thread, and issue a reclamation event. - View Dependent Claims (6, 7, 8, 9, 10)
-
Specification