首页> 外国专利> Practical lock-free doubly-linked list

Practical lock-free doubly-linked list

机译:实用的无锁双向链表

摘要

One embodiment of the present invention provides a system that supports inserting or deleting nodes at any location within a doubly-linked list which is lock-free, wherein lock-free means that the doubly-linked list can be simultaneously accessed by multiple processes without requiring the processes to perform locking operations (non-blocking) and furthermore that a finite number of steps performed by a process will guarantee progress by at least one process (lock-free). During operation, the system receives a reference to a target node to be deleted from the doubly-linked list. Next, the system atomically marks a forward pointer in the target node to indicate that the target node is deleted, wherein the forward pointer contains the address of an immediately following node in the doubly-linked list, and wherein the marking operation does not destroy the address of the immediately following node. Additional cleanup steps are then done by this or any other process. The system may also receive a new node which is accessible by only the requesting thread and may then insert the new node into the doubly linked list after a reference node. The system accomplishes this by setting the new node's backward pointer to the reference node and forward pointer to the successor of the reference node. Next, the system atomically changes the forward pointer of the reference node from the successor node to the new node. Additional cleanup steps are then done by this or any other process. An update operation that atomically performs a delete of an old node and an insert of its replacement node is also described.
机译:本发明的一个实施例提供了一种系统,该系统支持在无锁的双向链接列表内的任何位置插入或删除节点,其中,无锁意味着双向链接列表可以由多个进程同时访问而无需执行锁定操作(非阻塞)的过程,此外,一个过程执行的有限数量的步骤将保证至少一个过程(无锁)的进度。在操作期间,系统从双向链接列表中接收对要删除的目标节点的引用。接下来,系统自动在目标节点中标记前向指针,以指示该目标节点已删除,其中该前向指针包含双向链接列表中紧随其后的节点的地址,并且标记操作不会破坏目标节点的地址。紧随其后的节点的地址。然后,通过此过程或任何其他过程完成其他清理步骤。该系统还可以接收只能由请求线程访问的新节点,然后可以将该新节点插入到参考节点之后的双向链接列表中。系统通过将新节点的指向参考节点的后向指针和指向参考节点的后继者的前向指针设置来实现此目的。接下来,系统自动将参考节点的前向指针从后继节点更改为新节点。然后,通过此过程或任何其他过程完成其他清理步骤。还描述了原子地执行旧节点的删除和其替换节点的插入的更新操作。

著录项

  • 公开/公告号US7533138B1

    专利类型

  • 公开/公告日2009-05-12

    原文格式PDF

  • 申请/专利权人 PAUL A. MARTIN;

    申请/专利号US20050125910

  • 发明设计人 PAUL A. MARTIN;

    申请日2005-05-10

  • 分类号G06F17/30;G06F9/46;G06F9/45;G06F13/00;

  • 国家 US

  • 入库时间 2022-08-21 19:30:50

相似文献

  • 专利
  • 外文文献
  • 中文文献
获取专利

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号