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

US20060112121A1Inactive Publication Date: 2006-05-25IBM CORP
6 Cites 68 Cited by

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 1
  • Figure 2
    Figure 2
  • Figure 3
    Figure 3
Patent Text Reader

Abstract

A system, method and computer program product for atomically moving a shared list element from a first list location to a second list location includes inserting a placeholder element at the second list location to signify to readers that a move operation is underway, removing the shared list element from the first list location, re-identifying the list element to reflect its move from the first list location to the second list location, inserting it at the second list location and unlinking the placeholder element. A deferred removal of the placeholder element is performed following a period in which readers can no longer maintain references thereto. A method, system and computer program product are additionally provided for performing a lookup of a target list element that is subject to being atomically moved from a first list to a second list.
Need to check novelty before this filing date? Find Prior Art

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,...