Method, apparatus and computer program product for locking interrelated data structures in a multi-threaded computing environment
First Claim
1. A method for locking a desired object in a collection of objects for a period of time while locking objects in the collection which are not interrelated with the desired object for a lesser period of time, such method comprising:
- providing a reference lock for the collection of objects to limit access to the collection;
locking the reference lock to gain initial control of the desired object;
providing a group lock for the desired object and other objects in the collection which are interrelated with the desired object;
locking the group lock;
and unlocking the reference lock to enable access to objects in the collection which are not interrelated with the desired object.
0 Assignments
0 Petitions
Accused Products
Abstract
Apparatus, methods, and computer program products are disclosed that improve the performance of multi-threaded computer applications that use objects (within an object collection) which require exclusive thread access. The invention monitors interrelationships between the objects in the object collection and provides mechanisms to lock the minimal set of these objects for the exclusive thread access. When these objects are locked, independent or unrelated objects are left unlocked and can, in turn, be locked by other threads. Because a minimal set of objects are locked other threads that access the object collection are less likely to be blocked by the lock. Thus, these other threads are more likely to be able to simultaneously access objects in the object collection.
39 Citations
45 Claims
-
1. A method for locking a desired object in a collection of objects for a period of time while locking objects in the collection which are not interrelated with the desired object for a lesser period of time, such method comprising:
-
providing a reference lock for the collection of objects to limit access to the collection;
locking the reference lock to gain initial control of the desired object;
providing a group lock for the desired object and other objects in the collection which are interrelated with the desired object;
locking the group lock;
and unlocking the reference lock to enable access to objects in the collection which are not interrelated with the desired object. - View Dependent Claims (2, 3, 4, 5, 6)
-
-
7. A method for locking a desired object in a collection of objects for a period of time while locking objects in the collection which are not interrelated with the desired object for a lesser period of time, such method comprising:
-
providing a reference lock for the collection of objects to limit access to the collection;
locking the reference lock to gain initial control of the desired object;
identifying other objects in the collection which are interrelated with the desired object;
providing a group lock for the desired object and the identified interrelated objects;
locking the group lock;
and unlocking the reference lock to enable access to objects in the collection which are not interrelated with the desired object.
-
-
8. A method for locking a desired object in a collection of objects for a period of time while locking objects in the collection which are not interrelated with the desired object for a lesser period of time, such method comprising:
-
providing a reference lock for the collection of objects to limit access to the collection;
locking the reference lock to gain initial control of the desired object;
providing group locks for groups of interrelated objects in the collection, one of the groups containing the desired object;
locking the group lock for the group containing the desired object;
and unlocking the reference lock to enable access to objects in the collection which are not interrelated with the desired object. - View Dependent Claims (9, 10, 11, 12, 13, 14, 15)
-
-
16. A system for locking a desired object in a collection of objects for a period of time while locking objects in the collection which are not interrelated with the desired object for a lesser period of time, such system comprising:
-
a reference locking mechanism for providing a reference lock for the collection of objects to limit access to the collection;
a locking mechanism for locking the reference lock to gain initial control of the desired object;
a group locking mechanism for providing a group lock for the desired object and other objects in the collection which are interrelated with the desired object;
a locking mechanism for locking the group lock;
and an unlocking mechanism for unlocking the reference lock to enable access to objects in the collection which are not interrelated with the desired object. - View Dependent Claims (17, 18, 19, 20, 21)
-
-
22. A system for locking a desired object in a collection of objects for a period of time while locking objects in the collection which are not interrelated with the desired object for a lesser period of time, such system comprising:
-
a reference locking mechanism for providing a reference lock for the collection of objects to limit access to the collection;
a locking mechanism for locking the reference lock to gain initial control of the desired object;
an identifying mechanism for identifying other objects in the collection which are interrelated with the desired object;
a group locking mechanism for providing a group lock for the desired object and the identified interrelated objects;
a locking mechanism for locking the group lock;
and an unlocking mechanism for unlocking the reference lock to enable access to objects in the collection which are not interrelated with the desired object.
-
-
23. A system for locking a desired object in a collection of objects for a period of time while locking objects in the collection which are not interrelated with the desired object for a lesser period of time, such system comprising:
-
a reference locking mechanism for providing a reference lock for the collection of objects to limit access to the collection;
a locking mechanism for locking the reference lock to gain initial control of the desired object;
a group locking mechanism for providing group locks for groups of interrelated objects in the collection, one of the groups containing the desired object;
a locking mechanism for locking the group lock for the group containing the desired object;
and an unlocking mechanism for unlocking the reference lock to enable access to objects in the collection which are not interrelated with the desired object. - View Dependent Claims (24, 25, 26, 27, 28, 29, 30)
-
-
31. A computer program product comprising:
-
a computer usable storage medium having computer readable code for locking a desired object in a collection of objects for a period of time while locking objects in the collection which are not interrelated with the desired object for a lesser period of time, such computer readable code comprising;
computer readable code for providing a reference lock for the collection of objects to limit access to the collection;
computer readable code for locking the reference lock to gain initial control of the desired object;
computer readable code for providing a group lock for the desired object and other objects in the collection which are interrelated with the desired object;
computer readable code for locking the group lock;
and computer readable code for unlocking the reference lock to enable access to objects in the collection which are not interrelated with the desired object. - View Dependent Claims (32, 33, 34, 35, 36)
-
-
37. A computer program product comprising:
-
a computer usable storage medium having computer readable code for locking a desired object in a collection of objects for a period of time while locking objects in the collection which are not interrelated with the desired object for a lesser period of time, such computer readable code comprising;
computer readable code for providing a reference lock for the collection of objects to limit access to the collection;
computer readable code for locking the reference lock to gain initial control of the desired object;
computer readable code for identifying other objects in the collection which are interrelated with the desired object;
computer readable code for providing a group lock for the desired object and the identified interrelated objects;
computer readable code for locking the group lock;
and computer readable code for unlocking the reference lock to enable access to objects in the collection which are not interrelated with the desired object.
-
-
38. A computer program product comprising:
-
a computer usable storage medium having computer readable code for locking a desired object in a collection of objects for a period of time while locking objects in the collection which are not interrelated with the desired object for a lesser period of time, such computer readable code comprising;
computer readable code for providing a reference lock for the collection of objects to limit access to the collection;
computer readable code for locking the reference lock to gain initial control of the desired object;
computer readable code for providing group locks for groups of interrelated objects in the collection, one of the groups containing the desired object;
computer readable code for locking the group lock for the group containing the desired object;
and computer readable code for unlocking the reference lock to enable access to objects in the collection which are not interrelated with the desired object. - View Dependent Claims (39, 40, 41, 42, 43, 44, 45)
-
Specification