DETERMINING WHEN TO RELEASE A LOCK FROM A FIRST TASK HOLDING THE LOCK TO GRANT TO A SECOND TASK WAITING FOR THE LOCK
First Claim
1. A computer program product for managing access to a resource in a computer system, the computer program product comprising a computer readable storage medium having computer readable program code embodied therein that when executed performs operations, the operations comprising:
- determining whether a holding of a lock to the resource by a first task satisfies a condition and whether the lock is swappable;
releasing the lock from the first task and granting the lock to a second task waiting in a queue for the lock in response to determining that the holding of the lock satisfies the condition and that the lock is swappable; and
indicating the first task in the queue waiting for the lock in response to granting the lock to the second task.
1 Assignment
0 Petitions
Accused Products
Abstract
Provided are a computer program product, system, and method for determining when to release a lock from a first task holding the lock to grant to a second task waiting for the lock. A determination is made as to whether a holding of a lock to the resource by a first task satisfies a condition and whether the lock is swappable. The lock is released from the first task and granted to a second task waiting in a queue for the lock in response to determining that the holding of the lock satisfies the condition and that the lock is swappable. The first task is indicated in the queue waiting for the lock in response to granting the lock to the second task.
-
Citations
25 Claims
-
1. A computer program product for managing access to a resource in a computer system, the computer program product comprising a computer readable storage medium having computer readable program code embodied therein that when executed performs operations, the operations comprising:
-
determining whether a holding of a lock to the resource by a first task satisfies a condition and whether the lock is swappable; releasing the lock from the first task and granting the lock to a second task waiting in a queue for the lock in response to determining that the holding of the lock satisfies the condition and that the lock is swappable; and indicating the first task in the queue waiting for the lock in response to granting the lock to the second task. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11)
-
-
12. A computer program product for managing access to a resource in a computer system, the computer program product comprising a computer readable storage medium having computer readable program code embodied therein that when executed performs operations, the operations comprising:
-
determining whether a lock to the resource has been held by a first task for a predetermined time while the first task waits for at least one additional resource; releasing the lock from the first task and granting the lock to a second task waiting in a queue for the lock in response to determining that the first task has held the lock for the predetermined time while waiting for the at least one additional resource; and indicating the first task in the queue waiting for the lock in response to granting the lock to the second task. - View Dependent Claims (13)
-
-
14. A system for managing access to a resource, comprising:
-
a processor; and a computer readable storage medium having computer readable program code embodied therein that when executed by the processor performs operations, the operations comprising; determining whether a holding of a lock to the resource by a first task satisfies a condition and whether the lock is swappable; releasing the lock from the first task and granting the lock to a second task waiting in a queue for the lock in response to determining that the holding of the lock satisfies the condition and that the lock is swappable; and indicating the first task in the queue waiting for the lock in response to granting the lock to the second task. - View Dependent Claims (15, 16, 17, 18, 19)
-
-
20. A method for managing access to a resource in a computer system, comprising:
-
determining whether a holding of a lock to the resource by a first task satisfies a condition and whether the lock is swappable; releasing the lock from the first task and granting the lock to a second task waiting in a queue for the lock in response to determining that the holding of the lock satisfies the condition and that the lock is swappable; and indicating the first task in the queue waiting for the lock in response to granting the lock to the second task. - View Dependent Claims (21, 22, 23, 24, 25)
-
Specification