×

Atomically moving data elements between or within linked data structures

  • US 9,910,907 B2
  • Filed: 01/29/2015
  • Issued: 03/06/2018
  • Est. Priority Date: 01/29/2015
  • Status: Active Grant
First Claim
Patent Images

1. A system, comprising:

  • one or more processors;

    a memory coupled to said one or more processors, said memory including a computer usable medium storing at least one program of instructions executable by said processor to perform operations for atomically moving a data element of a linked data structure without delaying lockless readers that reference said data element without using locks, said operations comprising;

    allocating a status-indicating entity if one does not already exist and associating it with said data element in a manner that allows said status-indicating entity to be referenced from said data element by said lockless readers, said data element being linked to a first linked data structure that said lockless readers can traverse in order to reference said data element;

    copying said data element, or a pointer thereto, to create a copy element that is to be linked to a second linked data structure;

    associating said status-indicating entity with said copy element in a manner that allows said status-indicating entity to be referenced from said copy element by said lockless readers;

    linking said copy element to said second linked data structure that said lockless readers can traverse in order to reference said copy element;

    said status-indicating entity initially indicating to said lockless readers that said data element has validity with respect to said first linked data structure and said copy element has no validity with respect to said second linked data structure;

    atomically updating said status-indicating entity to indicate to said lockless readers that said data element has no validity with respect to said first linked data structure and said copy element has validity with respect to said second linked data structure;

    deleting said data element from said first linked data structure and deallocating it in a deferred manner that guarantees none of said lockless readers will be referencing said data element at the time of deallocation; and

    disassociating said status-indicating entity from said copy element, and if no longer needed, deallocating it in a deferred manner that guarantees none of said lockless readers will be referencing said status-indicating entity at the time of deallocation.

View all claims
  • 1 Assignment
Timeline View
Assignment View
    ×
    ×