Efficient support of consistent cyclic search with read-copy-update
First Claim
1. A data processing system having one or more central processing units, a memory and a communication pathway between the one or more central processing units and the memory, said system being adapted to update a shared data element group in said memory while preserving group integrity on behalf of one or more readers that are concurrently referencing group data elements without using locks or atomic instructions, and comprising:
- means for generating a new group data element;
means for assigning a new generation number to said new data element that is different than an existing global generation number associated with said data element group and which allows a reader of said data element group to determine whether said new data element is a correct version for said reader;
means for establishing a first version link from said new data element to a prior version thereof;
means for establishing a second version link from said prior version to said new data element;
means for linking said new data element into said data element group so that it is reachable by readers;
means for updating said global generation number associated with said data element group to correspond to said new generation number; and
means for freeing said prior version and said first and second version links following a grace period.
0 Assignments
0 Petitions
Accused Products
Abstract
A method, system and computer program product for modifying data elements in a shared data element group that must be updated atomically for the benefit of readers requiring group integrity. A global generation number is associated with the data element group and each member receives a copy of this number when it is created. Each time an update is performed, the global generation number is incremented and the updated element'"'"'s copy of this number is set to the same value. For each updated data element, a link is maintained from the new version to the pre-update version thereof, either directly or using pointer-forwarding entities. When a search is initiated, the current global generation number is referenced at the commencement of the search. As data elements in the group are traversed, the reader traverses the links between new and old data element versions to find a version having a matching generation number, if any. Following the occurrence of a grace period in which all readers have passed through quiescent states, all old data element versions are freed.
59 Citations
21 Claims
-
1. A data processing system having one or more central processing units, a memory and a communication pathway between the one or more central processing units and the memory, said system being adapted to update a shared data element group in said memory while preserving group integrity on behalf of one or more readers that are concurrently referencing group data elements without using locks or atomic instructions, and comprising:
-
means for generating a new group data element; means for assigning a new generation number to said new data element that is different than an existing global generation number associated with said data element group and which allows a reader of said data element group to determine whether said new data element is a correct version for said reader; means for establishing a first version link from said new data element to a prior version thereof; means for establishing a second version link from said prior version to said new data element; means for linking said new data element into said data element group so that it is reachable by readers; means for updating said global generation number associated with said data element group to correspond to said new generation number; and means for freeing said prior version and said first and second version links following a grace period. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9)
-
-
10. A data processing system having one or more central processing units, a memory and a communication pathway between the one or more central processing units and the memory, said system being adapted to update a shared data element group in said memory while preserving group integrity on behalf of one or more readers that are concurrently referencing group data elements without using locks or atomic instructions, and comprising:
-
means for generating a pointer-forwarding entity that points to a data element in said data element group; means for assigning a new generation number to said pointer-forwarding entity that is different than an existing global generation number associated with said data element group and which allows a reader of said data element group to determine whether said pointer-forwarding entity is a correct version for said reader; means for establishing a first version link from said pointer-forwarding entity and a prior version thereof; means for establishing a second version link from said prior version to said pointer-forwarding entity; means for linking said pointer-forwarding entity into said data element group so that said data element pointed to by said pointer-forwarding entity is reachable by readers through said pointer-forwarding entity; means for updating said global generation number associated with said data element group to correspond to said new generation number; and means for freeing said prior version and said first and second version links following a grace period.
-
-
11. A computer program product for updating a shared data element group while preserving group integrity on behalf of one or more readers that are concurrently referencing group data elements without using locks or atomic instructions, comprising:
-
one or more data storage media; means recorded on said data storage media for programming a data processing platform to operate as by; generating a new group data element; assigning a new generation number to said new data element that is different than an existing global generation number associated with said data element group and which allows a reader of said data element group to determine whether said new data element is a correct version for said reader; establishing a first version link from said new data element to a prior version thereof; establishing a second version link from said prior version to said new data element; linking said new data element into said data element group so that it is reachable by readers; updating said global generation number associated with said data element group to correspond to said new generation number; and freeing said prior version and said first and second version links following a grace period. - View Dependent Claims (12, 13, 14, 15, 16, 17, 18, 19)
-
-
20. A computer program product for updating a shared data element group while preserving group integrity on behalf of one or more readers that are concurrently referencing group data elements without using locks or atomic instructions, comprising:
-
one or more data storage media; means recorded on said data storage media for programming a data processing platform to operate as by; generating a pointer-forwarding entity that points to a data element in said data element group; assigning a new generation number to said pointer-forwarding entity that is different than an existing global generation number associated with said data element group and which allows a reader of said data element group to determine whether said pointer-forwarding entity is valid for said reader; establishing a first version link from said pointer-forwarding entity and a prior version thereof; establishing a second version link from said prior version to said pointer-forwarding entity; linking said pointer-forwarding entity into said data element group so that said data element pointed to by said pointer-forwarding entity is reachable by readers through said pointer-forwarding entity; updating said global generation number associated with said data element group to correspond to said new generation number; and freeing said prior version and said first and second version links following a grace period.
-
-
21. A computer program product for managing a shared data element group so as to allow updates thereof while preserving group integrity on behalf of one or more readers that are concurrently referencing group data elements without using locks or atomic instructions, comprising:
-
one or more data storage media; means recorded on said data storage media for programming a data processing platform to operate as by; performing a first-phase update operation that preserves a consistent pre-update view of said data element group on behalf of pre-update readers and a consistent post-update view of the data element group on behalf of post-update readers; providing means by which readers can locate all data elements of said data element group that belong to each of said pre-update and post-update views as readers search said data element group; performing one or more read operations following said first-phase update operation in which one or more readers search said data element group with each reader referencing only data elements belonging to one of said pre-update and post-update views; and performing a second-phase update operation following a grace period that frees said pre-update view of said data element group.
-
Specification