Contention Adapting Search Trees

Konstantinos Sagonas, Kjell Winblad
2015 2015 14th International Symposium on Parallel and Distributed Computing  
With multicores being ubiquitous, concurrent data structures are becoming increasingly important. This paper proposes a novel approach to concurrent data structure design where the data structure collects statistics about contention and adapts dynamically according to this statistics. We use this approach to create a contention adapting binary search tree (CA tree) that can be used to implement concurrent ordered sets and maps. Our experimental evaluation shows that CA trees scale similar to
more » ... ently proposed algorithms on a big multicore machine on various scenarios with a larger set size, and outperform the same data structures in more contended scenarios and in sequential performance. We also show that CA trees are well suited for optimization with hardware lock elision. In short, we propose a practically useful and easy to implement and show correct concurrent search tree that naturally adapts to the level of contention. statLock(base.lock); 11 if (base.valid == false) { 12 statUnlock(base.lock); 13 return doOperation(tree, operation, key); // retry 14 } else { 15 Object result = operation.execute(base.root, key); 16 if (base.lock.statistics > MAX _ CONTENTION) { 17 if (size(base.root) < 2) base.lock.statistics = 0; 18 else highContentionSplit(tree, base, prevNode); 19 } else if (base.lock.statistics < MIN _ CONTENTION) { 20 if (prevNode == null) base.lock.statistics = 0; 21 else lowContentionJoin(tree, base, prevNode);
doi:10.1109/ispdc.2015.32 dblp:conf/ispdc/SagonasW15 fatcat:qefbbsx2p5bczg2cikslyingjq