Abstract
Concurrent sets with range query operations are highly desirable in applications such as in-memory databases. However, few set implementations offer range queries. Known techniques for augmenting data structures with range queries (or operations that can be used to build range queries) have numerous problems that limit their usefulness. For example, they impose high overhead or rely heavily on garbage collection. In this work, we show how to augment data structures with highly efficient range queries, without relying on garbage collection. We identify a property of epoch-based memory reclamation algorithms that makes them ideal for implementing range queries, and produce three algorithms, which use locks, transactional memory and lock-free techniques, respectively. Our algorithms are applicable to more data structures than previous work, and are shown to be highly efficient on a large scale Intel system.
Supplemental Material
Available for Download
Software
- Y. Afek, H. Attiya D. Dolev, E. Gafni, M. Merritt, and N. Shavit. Atomic snapshots of shared memory. J. ACM, 40(4):873--890, Sept. 1993. ISSN 0004--5411. Google Scholar
Digital Library
- A. Agarwal, Z. Liu, E. Rosenthal, and V. Saraph. Linearizable iterators for concurrent data structures. CoRR, abs/1705.08885, 2017. URL http://arxiv.org/abs/1705.08885.Google Scholar
- M. Arbel and H. Attiya. Concurrent updates with RCU: Search tree as an example. In Proceedings of the 2014 ACM Symposium on Principles of Distributed Computing, PODC '14, pages 196--205, New York, NY, USA, 2014. ACM. ISBN 978-1-4503-2944-6. Google Scholar
Digital Library
- M. Arbel-Raviv and T. Brown. Reuse, don't recycle: Transforming lock-free algorithms that throw away descriptors. In Proceedings of the 31st International Symposium on Distributed Computing, DISC 2017, 2017.Google Scholar
- H. Attiya, R. Guerraoui, and E. Ruppert. Partial snapshot objects. In Proceedings of the Twentieth Annual Symposium on Parallelism in Algorithms and Architectures, SPAA '08, pages 336--343, New York, NY, USA, 2008. ACM. ISBN 978-1-59593-973-9. Google Scholar
Digital Library
- H. Avni, N. Shavit, and A. Suissa. Leaplist: Lessons learned in designing tm-supported range queries. In Proceedings of the 2013 ACM Symposium on Principles of Distributed Computing, PODC '13, pages 299--308, New York, NY, USA, 2013. ACM. ISBN 978-1-4503-2065-8. Google Scholar
Digital Library
- D. Basin, E. Bortnikov, A. Braginsky, G. Golan-Gueta, E. Hillel, I. Keidar, and M. Sulamy. Kiwi: A key-value map for scalable real-time analytics. In Proceedings of the 22Nd ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming, PPoPP '17, pages 357--369, New York, NY, USA, 2017. ACM. ISBN 978-1-4503-4493-7. Google Scholar
Digital Library
- N. G. Bronson, J. Casper, H. Chafi, and K. Olukotun. A practical concurrent binary search tree. In Proceedings of the 15th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming, PPoPP '10, pages 257--268, New York, NY, USA, 2010. ACM. ISBN 978-1-60558877-3. Google Scholar
Digital Library
- T. Brown. Reclaiming memory for lock-free data structures: There has to be a better way. In Proceedings of the 2015 ACM Symposium on Principles of Distributed Computing, PODC '15, pages 261--270, 2015. Google Scholar
Digital Library
- T. Brown. Techniques for Constructing Efficient Data Structures. PhD thesis, University of Toronto, 2017.Google Scholar
- T. Brown, F. Ellen, and E. Ruppert. A general technique for non-blocking trees. In Proceedings of the 19th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming, PPoPP '14, pages 329--342, New York, NY, USA, 2014. ACM. ISBN 978-1-4503-26568. Google Scholar
Digital Library
- I. Calciu, D. Dice, Y. Lev, V. Luchangco, V. J. Marathe, and N. Shavit. Numa-aware reader-writer locks. In Proceedings of the 18th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming, PPoPP '13, pages 157--166, New York, NY, USA, 2013. ACM. ISBN 978-1-4503-1922-5. Google Scholar
Digital Library
- B. Chatterjee. Lock-free linearizable 1-dimensional range queries. In Proceedings of the 18th International Conference on Distributed Computing and Networking, ICDCN '17, pages 9:1--9:10, New York, NY, USA, 2017. ACM. ISBN 978-1-4503-4839-3. Google Scholar
Digital Library
- L. Dalessandro, M. F. Spear, and M. L. Scott. Norec: Streamlining stm by abolishing ownership records. In Proceedings of the 15th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming, PPoPP '10, pages 67--78, New York, NY, USA, 2010. ACM. ISBN 978-1-60558877-3. Google Scholar
Digital Library
- T. David, R. Guerraoui, and V. Trigonakis. Asynchronized concurrency: The secret to scaling concurrent search data structures. In Proceedings of the Twentieth International Conference on Architectural Support for Programming Languages and Operating Systems, ASPLOS '15, pages 631--644, New York, NY, USA, 2015. ACM. ISBN 978-1-4503-28357. Google Scholar
Digital Library
- D. Dice, O. Shalev, and N. Shavit. Transactional locking ii. In Proceedings of the 20th International Conference on Distributed Computing, DISC'06, pages 194--208, Berlin, Heidelberg, 2006. Springer-Verlag. ISBN 3-540-44624-9, 978-3-540-44624-8. Google Scholar
Digital Library
- F. Ellen, P. Fatourou, E. Ruppert, and F. van Breugel. Non-blocking binary search trees. In Proceedings of the 29th ACM SIGACT-SIGOPS Symposium on Principles of Distributed Computing, PODC '10, pages 131--140, New York, NY, USA, 2010. ACM. ISBN 978-1-60558-8889. Google Scholar
Digital Library
- T. L. Harris, K. Fraser, and I. A. Pratt. A practical multi-word compare-and-swap operation. In Proceedings of the 16th International Conference on Distributed Computing, DISC '02, pages 265--279, 2002. Google Scholar
Digital Library
- M. Herlihy and N. Shavit. The Art of Multiprocessor Programming. Morgan Kaufmann Publishers Inc., San Francisco, CA, USA, 2008. ISBN 0123705916, 9780123705914. Google Scholar
Digital Library
- P. Jayanti. An optimal multi-writer snapshot algorithm. In Proceedings of the Thirty-seventh Annual ACM Symposium on Theory of Computing, STOC '05, pages 723--732, New York, NY, USA, 2005. ACM. ISBN 1-58113-960-8. Google Scholar
Digital Library
- A. Matveev, N. Shavit, P. Felber, and P. Marlier. Read-log-update: A lightweight synchronization mechanism for concurrent programming. In Proceedings of the 25th Symposium on Operating Systems Principles, SOSP '15, pages 168--183, New York, NY, USA, 2015. ACM. ISBN 9781-4503-3834-9. Google Scholar
Digital Library
- P. E. McKenney and J. D. Slingwine. Read-copy update: Using execution history to solve concurrency problems. In Parallel and Distributed Computing and Systems, pages 509--518, 1998.Google Scholar
- A. Natarajan and N. Mittal. Fast concurrent lock-free binary search trees. In Proceedings of the 19th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming, PPoPP '14, pages 317--328, New York, NY, USA, 2014. ACM. ISBN 978-1-4503-2656-8. Google Scholar
Digital Library
- E. Petrank and S. Timnat. Lock-free data-structure iterators. In Proceedings of the 27th International Symposium on Distributed Computing - Volume 8205, DISC 2013, pages 224--238, New York, NY, USA, 2013. Springer-Verlag New York, Inc. ISBN 978-3-642-415265. Google Scholar
Digital Library
- A. Prokopec, N. G. Bronson, P. Bagwell, and M. Odersky. Concurrent tries with efficient non-blocking snapshots. SIGPLAN Not., 47(8):151--160, Feb. 2012. ISSN 0362-1340. Google Scholar
Digital Library
- K. Sagonas and K. Winblad. Efficient support for range queries and range updates using contention adapting search trees. In Revised Selected Papers of the 28th International Workshop on Languages and Compilers for Parallel Computing - Volume 9519, LCPC 2015, pages 37--53, New York, NY, USA, 2016. Springer-Verlag New York, Inc. ISBN 978-3-319-29777-4. Google Scholar
Digital Library
- X. Yu, G. Bezerra, A. Pavlo, S. Devadas, and M. Stonebraker. Staring into the abyss: An evaluation of concurrency control with one thousand cores. Proc. VLDB Endow., 8(3):209--220, Nov. 2014. ISSN 2150--8097. Google Scholar
Digital Library
Recommendations
A marriage of pointer- and epoch-based reclamation
PLDI 2020: Proceedings of the 41st ACM SIGPLAN Conference on Programming Language Design and ImplementationAll pointer-based nonblocking concurrent data structures should deal with the problem of safe memory reclamation: before reclaiming a memory block, a thread should ensure no other threads hold a local pointer to the block that may later be dereferenced. ...
Harnessing epoch-based reclamation for efficient range queries
PPoPP '18: Proceedings of the 23rd ACM SIGPLAN Symposium on Principles and Practice of Parallel ProgrammingConcurrent sets with range query operations are highly desirable in applications such as in-memory databases. However, few set implementations offer range queries. Known techniques for augmenting data structures with range queries (or operations that ...
Design and Evaluation of an Efficient Semispace-based Memory Reclamation Scheme
IMCCC '11: Proceedings of the 2011 First International Conference on Instrumentation, Measurement, Computer, Communication and ControlNow that in language with garbage collection (GC) mechanism such as Java, the GC should be a direct impact on the performance of the program, and the requirement of real time GC is even higher in a real-time system. We proposed a memory reclamation ...







Comments