Counter and flux bit locking for very fast shared serialization of shared data objects
First Claim
1. A method for managing access to shared data in a data processing system, comprising the steps of:
- (a) initializing an n bit check count to keep track of each instance where an exclusive write access modifies a given shared data object;
(b) storing said check count in a has table; and
(c) setting a flux bit whenever said data object is subject to an exclusive seize, so that any shared read access initiated while said flux bit is set will initiate a shared seize prior to reading the data object.
1 Assignment
0 Petitions
Accused Products
Abstract
Methods and apparatus are set forth for improving the performance of general purpose computing systems that utilize exclusive and shared seize mechanisms to assure the integrity of shared data objects, records, or other unit of synchronization. More particularly, methods and apparatus are set forth which allow concurrent reads of shared data objects in a coherent fashion, without always having to perform a seize. According to a preferred embodiment of the invention, read (shared) accesses can be performed in such a manner as to improve system performance by utilizing a method comprising the steps of: (a) determining, for a particular shared data object to be read, if the object is subject to an exclusive seize prior to any attempt, to read the object; (b) reading the object without causing a shared seize to be initiated if it was not subject to an exclusive seize as determined in step (a); (c) determining if the object is subject to an exclusive seize after reading it in accordance with step (b); and (d) determining if the object was subject to an exclusive seize while it was being read. If, as a result of performing the aforestated method, it can be concluded that the read took place without an exclusive seize immediately before, during and just after the read, then the data can be presumed valid. System performance is improved in such cases since the overhead associated with initiating a seize for the read is eliminated.
28 Citations
37 Claims
-
1. A method for managing access to shared data in a data processing system, comprising the steps of:
-
(a) initializing an n bit check count to keep track of each instance where an exclusive write access modifies a given shared data object; (b) storing said check count in a has table; and (c) setting a flux bit whenever said data object is subject to an exclusive seize, so that any shared read access initiated while said flux bit is set will initiate a shared seize prior to reading the data object. - View Dependent Claims (2)
-
-
3. A method for improving the performance of a computing system that utilizes exclusive and shared seize mechanisms to assure the integrity of shared data objects, comprising the steps of:
-
(a) initiating a shared read for a particular shared data object; (b) determining if said object is subject to an exclusive seize prior to any attempt to read the object; (c) reading said object without initiating a shared seize whenever the object is not subject to an exclusive seize as determined in step (b); (d) determining if the object is subject to an exclusive seize after performing step (c); and (e) determining, whenever said object is not subject to an exclusive seize as determined in step (d), if the object was subject to an exclusive seize while being read; and (f) completing said shared read without having initiated a shared seize, thereby improving system performance, whenever it is determined by the performance of steps (b), (d) and (e) that no exclusive seize affected the validity of said shared data object since the initiation of said read. - View Dependent Claims (4, 5, 6, 7, 8, 9, 10)
-
-
11. A method for managing access to shared data in a data processing system, wherein said data processing system utilizes exclusive and shared seize mechanisms to assure the integrity of shared data objects, comprising the steps of:
-
(a) initiating an exclusive write for a particular shared data object, including initiating an exclusive seize of said object; (b) setting a flux bit associated with said object whenever an exclusive seize is acquired; (c) initializing and maintaining an n bit check count for keeping track of each instance where said data object is modified by an exclusive write access; (d) modifying said given data object via said exclusive write; (e) incrementing said check count after said data is modified via said exclusive write; (f) resetting said flux bit when said object is no longer subject to said exclusive seize; and (g) terminating said exclusive write. - View Dependent Claims (12, 13, 14, 15, 16, 17, 18, 19)
-
-
20. A method for managing access to shared data in a computing system in which a plurality of tasks may be executed concurrently utilizing a shared data base, wherein said computing system includes a lock manager for performing read (shared) accesses and write (exclusive) accesses with respect to shared data objects in said data base through the use of exclusive and shared seize mechanisms, comprising the steps of:
-
(a) initializing a counter to keep track of shared read attempts with respect to a particular shared data object whenever a shared read access in initiated for that object; (b) incrementing said counter; (c) initializing a first check count variable by setting it equal to a check count associated with said particular data object, wherein said check count is a variable that is incremented whenever a modification is made to said particular data object under an exclusive seize; (d) testing a flux bit which is set whenever said particular data object is subject to an exclusive seize; (e) reading said particular shared data object so long as a flux bit is reset and the value in said counter after performing step (b) is less than a predetermined threshold value; (f) determining if said particular data object is subject to an exclusive seize after performing step (e) by again testing said flux bit; (g) determining, whenever said particular data object is not subject to an exclusive seize as determined in step (f), if said particular data object was subject to an exclusive seize while it was being read; and (h) terminating said shared read access successfully without having initiated a shared seize whenever it is determined in step (g) that said particular data object was not subject to an exclusive seize while it was being read.
-
-
21. A method for improving the performance of a computer system utilizing exclusive and shared seize mechanisms to assure the integrity of shared data objects, comprising the steps of:
-
(a) setting a flux bit whenever an exclusive write access is in progress and a shared data object is subject to an exclusive seize; (b) incrementing a check count whenever said shared data object is modified during said exclusive write access; (c) resetting said flux bit whenever said shared data object is no longer subject to said exclusive seize; (d) testing said flux bit whenever a shared read access for said shared data object is initiated; and (e) performing a shared seize with respect to said shared data object whenever a shared read access is initiated for said shared data object and said flux bit is set. - View Dependent Claims (22, 23, 24)
-
-
25. A method for improving the performance of a computer system utilizing exclusive and shared seize mechanism to assure the integrity of shared data objects, comprising the steps of:
-
(a) maintaining a check count in a hash table for each of a plurality of shared data objects, wherein the address of the check count in said table for a given shared data object is obtained via performing a hash function on the address in said system of said shared data object; (b) utilizing said check counts to determine if a shared read access with respect to said given object can be performed without having to seize said object; (c) incrementing said check count whenever said shared data object is modified by an exclusive write access while subject to an exclusive seize; (d) setting a flux bit whenever said shared data object is subject to an exclusive seize; and (e) resetting said flux bit whenever said shared data object is no longer subject to said exclusive seize. - View Dependent Claims (26, 27, 28)
-
-
29. An apparatus for improving the performance of a computing system that utilizes exclusive and shared seize mechanisms to assure the integrity of shared data objects, said apparatus comprising:
-
(a) means for initiating a shared read for a particular shared data object; (b) means for determining if said object is subject to an exclusive seize prior to any attempt to read the object; (c) means for reading said object without initiating a shared seize whenever the object is not subject to an exclusive seize; (d) means for determining if the object is subject to an exclusive seize after said object has been read; (e) means for determining if the object is subject to an exclusive seize while being read; and (f) means for completing said shared read without initiating a shared seize to improve system performance if no exclusive seize has been determined. - View Dependent Claims (30, 31, 32)
-
-
33. An apparatus for managing access to shared data in a data processing system including a computing system utilizing exclusive and shared seize mechanisms to assure the integrity of shared data objects, said apparatus comprising:
-
(a) means for initiating an exclusive write for a particular shared object, said means for initiating including means for initiating an exclusive seize of said objects; (b) a flux bit associated with said object and means for setting said flux bit whenever an exclusive seize is acquired; (c) means for initializing and maintaining an n bit check count for keeping track of each instance where said data object is modified by an exclusive write access; (d) means for modifying said data object via said exclusive write; (e) means for incrementing said check count after said data is modified via said exclusive write; (f) means for resetting said flux bit when said object is no longer subject to said exclusive seize; and (g) means for terminating said exclusive write. - View Dependent Claims (34)
-
-
35. An apparatus for managing access to shared data objects in a computing system in which a plurality of tasks may be executed concurrently utilizing a shared data base, wherein said computing system includes a lock manager for performing read (shared) accesses and write (exclusive) accesses with respect to said shared data objects in said base through the use of exclusive and shared seize mechanisms, said apparatus comprising;
-
(a) means for initiating and acquiring an exclusive seize via said lock manager with respect to a given data object whenever an exclusive access with respect to said given data object is initiated by one of said plurality of tasks; (b) a flux bit and means for setting said flux bit after said seize is acquired; (c) means for modifying said given data object after said flux bit has been set; (d) means for incrementing a check count to signify that a modification of said given data object has occurred; (e) means for resetting said flux bit; and (f) means for releasing said exclusive seize after said flux bit has been reset.
-
-
36. An apparatus for managing access to shared data in a computing system in which a plurality of tasks may be executed concurrently utilizing a shared data base, wherein said computing system includes a lock manager for performing read (shared) accesses and write (exclusive) accesses with respect to shared data objects in said data base through the use of exclusive and shared seize mechanisms, said apparatus comprising:
-
(a) a counter and means for initializing said counter to keep track of shared read attempts with respect to a particular shared data object whenever a shared read access is initiated for that object; (b) means for incrementing said counter; (c) means for initializing a first check count variable by setting it equal to check count associated with said particular data object, wherein said means for initializing includes means for incrementing said check count variable whenever a modification is made to said particular data object under an exclusive seize; (d) a flux bit which is set whenever said particular data object is subject to an exclusive seize, and means for testing said flux bit; (e) means for reading said particular shared data object when said flux bit is reset and the value in said counter after said counter is incremented is less than a predetermined threshold value; (f) first means for determining if said particular data object is subject to an exclusive seize after said particular data object is read, said first means for determining including means for again testing said flux bit; (g) second means for determining whenever said particular data object is not subject to an exclusive seize after again testing said flux bit, if said particular data object was subject to an exclusive seize while it was being read; and (h) means for completing said shared read access without initiating a shared seize whenever it is determined that said particular data object was not subject to an exclusive seize while it was being read.
-
-
37. An apparatus for improving the performance of a computer system utilizing exclusive and shared seize mechanisms to assure the integrity of shared data objects, said apparatus comprising;
-
(a) a flux bit and means for setting said flux bit whenever an exclusive write access is in progress and a shared data object is subject to an exclusive seize; (b) means for incrementing a check count whenever said shared data object is modified during said exclusive write access; (c) means for resetting said flux bit whenever said shared data object is no longer subject to said exclusive seize; (d) means for testing said flux bit whenever a shared read access for said shared data object is initiated; and (e) means for performing a shared seize with respect to said shared data object whenever a shared read access is initiated for said shared data object and said flux bit is set.
-
Specification