Skip to main content

A Pragmatic Non-blocking Concurrent Directed Acyclic Graph

  • Conference paper
  • First Online:
Networked Systems (NETYS 2019)

Part of the book series: Lecture Notes in Computer Science ((LNCCN,volume 11704))

Included in the following conference series:

  • 532 Accesses

Abstract

In this paper, we have developed two non-blocking algorithms for maintaining acyclicity in a concurrent directed graph. The first algorithm is based on a wait-free reachability query and the second one on partial snapshot-based obstruction-free reachability query. Interestingly, we are able to achieve the acyclic property in a dynamic setting without (1) making use of helping descriptors by other threads, or (2) clean double collect mechanism. We present a proof to show that the graph remains acyclic at all times in the concurrent setting. We also prove that the acyclic graph data-structure operations are linearizable. We implement both the algorithms in C++ and test through several micro-benchmarks. Our experimental results illustrate an average of 7x improvement over the sequential and global-lock implementation.

This work is partly funded by a research grant from Intel, USA.

N. Singhal—Work done while a student at IITH.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    The source code is available on https://github.com/PDCRL/ConcurrentGraphDS.

References

  1. Afek, Y., Attiya, H., Dolev, D., Gafni, E., Merritt, M., Shavit, N.: Atomic snapshots of shared memory. J. ACM 40(4), 873–890 (1993)

    Article  Google Scholar 

  2. Barnes, G.: A method for implementing lock-free shared-data structures. In: Proceedings of the Fifth Annual ACM Symposium on Parallel Algorithms and Architectures, SPAA 1993, pp. 261–270. ACM, New York (1993)

    Google Scholar 

  3. Brito, J., O’Sullivan, A.: Bitcoin: A Primer for Policymakers. Mercatus Center at George Mason University (2013)

    Google Scholar 

  4. Buterin, V.: Ethereum: a next generation smart contract and decentralized application platform (2013). https://github.com/ethereum/wiki/wiki/white-paper

  5. Chatterjee, B., Nguyen, N., Tsigas, P.: Efficient lock-free binary search trees. In: Proceedings of the 2014 ACM Symposium on Principles of Distributed Computing, PODC 2014, pp. 322–331. ACM, New York (2014)

    Google Scholar 

  6. Chatterjee, B., Peri, S., Sa, M., Singhal, N.: A simple and practical concurrent non-blocking unbounded graph with linearizable reachability queries. In: ICDCN 2019, pp. 168–177 (2019)

    Google Scholar 

  7. Cormen, T.H., Leiserson, C.E., Rivest, R.L., Stein, C.: Introduction to Algorithms. MIT Press, Cambridge (2009)

    MATH  Google Scholar 

  8. Dang, N.N., Tsigas, P.: Progress guarantees when composing lock-free objects. In: Jeannot, E., Namyst, R., Roman, J. (eds.) Euro-Par 2011. LNCS, vol. 6853, pp. 148–159. Springer, Heidelberg (2011). https://doi.org/10.1007/978-3-642-23397-5_15

    Chapter  Google Scholar 

  9. Demetrescu, C., Finocchi, I., Italiano, G.F.: Dynamic graphs. In: Handbook of Data Structures and Applications, Chapman and Hall/CRC (2004)

    Google Scholar 

  10. Fomitchev, M., Ruppert, E.: Lock-free linked lists and skip lists. In: Proceedings of the Twenty-Third Annual ACM Symposium on Principles of Distributed Computing, PODC 2004, St. John’s, Newfoundland, Canada, 25–28 July 2004, pp. 50–59 (2004)

    Google Scholar 

  11. Harris, T.L.: A pragmatic implementation of non-blocking linked-lists. In: Welch, J. (ed.) DISC 2001. LNCS, vol. 2180, pp. 300–314. Springer, Heidelberg (2001). https://doi.org/10.1007/3-540-45414-4_21

    Chapter  Google Scholar 

  12. Hendler, D., Shavit, N., Yerushalmi, L.: A scalable lock-free stack algorithm. In: Proceedings of the Sixteenth Annual ACM Symposium on Parallelism in Algorithms and Architectures, SPAA 2004, pp. 206–215. ACM, New York (2004)

    Google Scholar 

  13. Herlihy, M., Shavit, N.: On the nature of progress. In: Fernàndez Anta, A., Lipari, G., Roy, M. (eds.) OPODIS 2011. LNCS, vol. 7109, pp. 313–328. Springer, Heidelberg (2011). https://doi.org/10.1007/978-3-642-25873-2_22

    Chapter  Google Scholar 

  14. Herlihy, M.P., Wing, J.M.: Linearizability: a correctness condition for concurrent objects. ACM Trans. Program. Lang. Syst. 12(3), 463–492 (1990)

    Article  Google Scholar 

  15. Kallimanis, N.D., Kanellou, E.: Wait-free concurrent graph objects with dynamic traversals. In: OPODIS 2015, pp. 27:1–27:17 (2015)

    Google Scholar 

  16. Ladan-Mozes, E., Shavit, N.: An optimistic approach to lock-free FIFO queues. Distrib. Comput. 20(5), 323–341 (2008)

    Article  Google Scholar 

  17. Michael, M.M.: High performance dynamic lock-free hash tables and list-based sets. In: SPAA, pp. 73–82 (2002)

    Google Scholar 

  18. Nakamoto, S.: Bitcoin: a peer-to-peer electronic cash system (2008). http://bitcoin.org/bitcoin.pdf

  19. Natarajan, A., Mittal, N.: Fast concurrent lock-free binary search trees. In: ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming, PPoPP 2014, Orlando, FL, USA, 15–19 February 2014, pp. 317–328 (2014)

    Google Scholar 

  20. Peri, S., Sa, M., Singhal, N.: A pragmatic non-blocking concurrent directed acyclic graph. CoRR, abs/1611.03947 (2016)

    Google Scholar 

  21. Serguei Popov. The tangle (2018). https://iota.org/iotawhitepaper.pdf

  22. Sinha, A., Malik, S.: Runtime checking of serializability in software transactional memory. In: IPDPS 2010, pp. 1–12 (2010)

    Google Scholar 

  23. Valois, J.D.: Lock-free linked lists using compare-and-swap. In: Proceedings of the Fourteenth Annual ACM Symposium on Principles of Distributed Computing, Ottawa, Ontario, Canada, 20–23 August 1995, pp. 214–222 (1995)

    Google Scholar 

  24. Weikum, G., Vossen, G.: Transactional Information Systems: Theory, Algorithms, and the Practice of Concurrency Control and Recovery. Morgan Kaufmann, Burlington (2002)

    Google Scholar 

Download references

Acknowledgements

We would like to thank the anonymous reviewers and our shepherd, C. Aiswarya for their useful suggestions and comments. Following their suggestions, we made several improvements to the manuscript. This research was funded by MediaLab Asia for funding Graduate Scholarship.

Author information

Authors and Affiliations

Authors

Corresponding authors

Correspondence to Sathya Peri , Muktikanta Sa or Nandini Singhal .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2019 Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Peri, S., Sa, M., Singhal, N. (2019). A Pragmatic Non-blocking Concurrent Directed Acyclic Graph. In: Atig, M., Schwarzmann, A. (eds) Networked Systems. NETYS 2019. Lecture Notes in Computer Science(), vol 11704. Springer, Cham. https://doi.org/10.1007/978-3-030-31277-0_22

Download citation

  • DOI: https://doi.org/10.1007/978-3-030-31277-0_22

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-030-31276-3

  • Online ISBN: 978-3-030-31277-0

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics