synchronization;
data structures;
scalability;
concurrent programming;
red-black trees;
CONCURRENT;
SYNCHRONIZATION;
D O I:
10.1002/cpe.3157
中图分类号:
TP31 [计算机软件];
学科分类号:
081202 ;
0835 ;
摘要:
This paper presents algorithms for concurrently reading and modifying a red-black tree (RBTree). The algorithms allow wait-free, linearly scalable lookups in the presence of concurrent inserts and deletes. They have deterministic response times for a given tree size and uncontended read performance that is at least 60% faster than other known approaches. The techniques used to derive these algorithms arise from a concurrent programming methodology called relativistic programming. Relativistic programming introduces write-side delay primitives that allow the writer to pay most of the cost of synchronization between readers and writers. Only minimal synchronization overhead is placed on readers. Relativistic programming avoids unnecessarily strict ordering of read and write operations while still providing the capability to enforce linearizability. This paper shows how relativistic programming can be used to build a concurrent RBTree with synchronization-free readers and both lock-based and transactional memory-based writers. Copyright (c) 2013 John Wiley & Sons, Ltd.