Atomically moving list elements between lists using read-copy update
a technology of list elements and read-copy update, applied in the field of computer systems and methods, can solve the problems of requiring duplication of the entire, requiring the subsequent lookup of the old name to fail, and requiring the entire to be renamed
Patent Information
- Authority / Receiving Office
- US · United States
- Current Assignee / Owner
- Publication Date
- 2006-05-25
- Estimated Expiration
- Not applicable · inactive patent
Smart Images

Figure 1 
Figure 2 
Figure 3
Abstract
Description
BACKGROUND OF THE INVENTION
[0001] 1. Field of the Invention
[0002] The present invention relates to computer systems and methods in which list data are shared by software running concurrently on one or more processors. More particularly, the invention concerns an improved system and method that allows lock-free lookups of list elements while efficiently permitting concurrent update operations in which list elements are moved from one list to another.
[0003] 2. Description of the Prior Art
[0004] By way of background, shared data elements that are members of a linked list sometimes need to be moved from one list to another while maintaining consistency for the benefit of data consumers who may be concurrently performing lookups on the same data. This situation arises in the context of in-memory file system tree images used by operating systems to perform file name lookups for locating files maintained on block storage devices. When a file's name is changed and / or the file is moved f...
Examples
Embodiment Construction
[0031] Before discussing the details of the invention in its exemplary embodiments, it will be helpful to consider several examples illustrating the manner in which conventional read-copy update can be used to update list elements. FIGS. 1A-1D illustrate one such situation wherein a data element B in a group of data elements A, B and C is to be modified. The data elements A, B, and C are arranged in a singly-linked list that is traversed in acyclic fashion, with each element containing a pointer to a next element in the list (or a NULL pointer for the last element) in addition to storing some item of data. A global pointer (not shown) is assumed to point to data element A, the first member of the list.
[0032] It is assumed that the data element list of FIGS. 1A-1D is traversed (without locking) by multiple concurrent readers and occasionally updated by updaters that delete, insert or modify data elements in the list. In FIG. 1A, the data element B is being referenced by a reader r1,...