Latch mechanism for concurrent computing environments
First Claim
1. A computer-implemented method for providing access to a resource in a programming environment supporting concurrent tasks, comprising:
- (a) providing a latch to a first task, wherein the first task requests the latch to obtain access to the resource;
(b) accessing the resource with the first task;
(c) marking the latch stealable and held by a holding task, rather than releasing the latch, wherein marking the latch stealable permits a second task to acquire the latch in response to the latch being marked stealable;
(d) marking the latch unstealable if the first task again requests the latch to obtain access to the resource prior to the latch being requested by a second task seeking access to the resource; and
(e) marking a set of flags for a latch;
i. stealable, wherein the resource is not placed in a consistent state because the latch is marked stealable;
ii. stolen, wherein the resource is placed in a consistent state and then accessed by the second task;
oriii. unstealable, wherein the first task again requests the latch to obtain access to the resource and the latch has not been requested by a second task seeking access to the resource, as requested by the latch.
1 Assignment
0 Petitions
Accused Products
Abstract
A system, method and computer readable medium containing programming structions for an improved latch mechanism for use in a programming environment running concurrent tasks is disclosed. According to one aspect of the present invention, a latch is provided to a first task which is requesting access to a resource. After such access, the first task holds the latch, which is also released from the first task. The first task holding the latch marks the latch stealable, and if the latch is not marked stolen by another task, the first task can mark the latch unstealable. In another embodiment of the present invention, if the first task is provided a latch marked stealable, the resource associated with the stealable latch will be placed in a consistent state before the first task accesses the resource.
10 Citations
6 Claims
-
1. A computer-implemented method for providing access to a resource in a programming environment supporting concurrent tasks, comprising:
-
(a) providing a latch to a first task, wherein the first task requests the latch to obtain access to the resource; (b) accessing the resource with the first task; (c) marking the latch stealable and held by a holding task, rather than releasing the latch, wherein marking the latch stealable permits a second task to acquire the latch in response to the latch being marked stealable; (d) marking the latch unstealable if the first task again requests the latch to obtain access to the resource prior to the latch being requested by a second task seeking access to the resource; and (e) marking a set of flags for a latch; i. stealable, wherein the resource is not placed in a consistent state because the latch is marked stealable; ii. stolen, wherein the resource is placed in a consistent state and then accessed by the second task;
oriii. unstealable, wherein the first task again requests the latch to obtain access to the resource and the latch has not been requested by a second task seeking access to the resource, as requested by the latch. - View Dependent Claims (2)
-
-
3. A computer readable medium containing program instructions for providing access to a resource in a programming environment supporting concurrent tasks, the program instructions for:
-
(a) providing a latch to a first task, wherein the first task requests the latch to obtain access to the resource; (b) accessing the resource with the first task; (c) marking the latch stealable and held by a holding task, rather than releasing the latch, wherein marking the latch stealable permits a second task to acquire the latch in response to the latch being marked stealable; (d) marking the latch unstealable if the first task again requests the latch to obtain access to the resource prior to the latch being requested by a second task seeking access to the resource; and (e) marking a set of flags for a latch; iv. stealable, wherein the resource is not placed in a consistent state because the latch is marked stealable; v. stolen, wherein the resource is placed in a consistent state and then accessed by the second task;
orvi. unstealable, wherein the first task again requests the latch to obtain access to the resource and the latch has not been requested by a second task seeking access to the resource, as requested by the latch. - View Dependent Claims (4)
-
-
5. A latch mechanism for a computer programming environment supporting concurrent tasks, comprising:
-
means for providing a latch for a resource to a first task, whereby the first task holds the latch; means for the first task to mark the latch stealable and held by a holding task, rather than releasing the latch, wherein marking the latch stealable permits a second task to acquire the latch in response to the latch being marked stealable; means for the first task to mark the latch unstealable if the first task again requests the latch to obtain access to the resource prior to the latch being requrested by a second task seeking access to the latch; and means for using a set of flags for marking a latch stealable, wherein the resource is not placed in a consistent state because the latch is marked stealable, stolen, wherein the resource is placed in a consistent state and then accessed by the second task, or unstealable, wherein the first task is again provided with the latch and the latch has not been provided to a second task seeking access to the resource. - View Dependent Claims (6)
-
Specification