skip to main content
10.1145/3009837.3009888acmconferencesArticle/Chapter ViewAbstractPublication PagespoplConference Proceedingsconference-collections
research-article

On verifying causal consistency

Published:01 January 2017Publication History

ABSTRACT

Causal consistency is one of the most adopted consistency criteria for distributed implementations of data structures. It ensures that operations are executed at all sites according to their causal precedence. We address the issue of verifying automatically whether the executions of an implementation of a data structure are causally consistent. We consider two problems: (1) checking whether one single execution is causally consistent, which is relevant for developing testing and bug finding algorithms, and (2) verifying whether all the executions of an implementation are causally consistent.

We show that the first problem is NP-complete. This holds even for the read-write memory abstraction, which is a building block of many modern distributed systems. Indeed, such systems often store data in key-value stores, which are instances of the read-write memory abstraction. Moreover, we prove that, surprisingly, the second problem is undecidable, and again this holds even for the read-write memory abstraction. However, we show that for the read-write memory abstraction, these negative results can be circumvented if the implementations are data independent, i.e., their behaviors do not depend on the data values that are written or read at each moment, which is a realistic assumption.

We prove that for data independent implementations, the problem of checking the correctness of a single execution w.r.t. the read-write memory abstraction is polynomial time. Furthermore, we show that for such implementations the set of non-causally consistent executions can be represented by means of a finite number of register automata. Using these machines as observers (in parallel with the implementation) allows to reduce polynomially the problem of checking causal consistency to a state reachability problem. This reduction holds regardless of the class of programs used for the implementation, of the number of read-write variables, and of the used data domain. It allows leveraging existing techniques for assertion/reachability checking to causal consistency verification. Moreover, for a significant class of implementations, we derive from this reduction the decidability of verifying causal consistency w.r.t. the read-write memory abstraction.

References

  1. P. A. Abdulla, F. Haziza, L. Hol´ık, B. Jonsson, and A. Rezine. An integrated specification and verification technique for highly concurrent data structures. In TACAS ’13. Springer, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. M. Ahamad, G. Neiger, J. E. Burns, P. Kohli, and P. W. Hutto. Causal memory: definitions, implementation, and programming. Distributed Computing, 9(1):37–49, 1995.Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. R. Alur, K. L. McMillan, and D. Peled. Model-checking of correctness conditions for concurrent objects. Inf. Comput., 160(1-2), 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. M. F. Atig, A. Bouajjani, and T. Touili. Analyzing asynchronous programs with preemption. In IARCS Annual Conference on Foundations of Software Technology and Theoretical Computer Science, FSTTCS 2008, December 9-11, 2008, Bangalore, India, pages 37–48, 2008.Google ScholarGoogle Scholar
  5. P. Bailis, A. Ghodsi, J. M. Hellerstein, and I. Stoica. Bolt-on causal consistency. In SIGMOD ’13, pages 761–772, New York, NY, USA, 2013. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. L. Benmouffok, J.-M. Busca, J. M. Marquès, M. Shapiro, P. Sutra, and G. Tsoukalas. Telex: A semantic platform for cooperative application development. In CFSE, Toulouse, France, 2009.Google ScholarGoogle Scholar
  7. K. P. Birman. Replication and fault-tolerance in the ISIS system, volume 19. ACM, 1985.Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. A. Bouajjani, C. Enea, and J. Hamza. Verifying eventual consistency of optimistic replication systems. In POPL ’14, pages 285–296, New York, NY, USA, 2014. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. A. Bouajjani, M. Emmi, C. Enea, and J. Hamza. On reducing linearizability to state reachability. In ICALP ’15, pages 95–107. Springer, 2015. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. A. Bouajjani, C. Enea, R. Guerraoui, and J. Hamza. On Verifying Causal Consistency. ArXiv e-prints, Nov. 2016.Google ScholarGoogle Scholar
  11. P. Bouyer, A. Petit, and D. Thérien. An algebraic characterization of data and timed languages. In K. G. Larsen and M. Nielsen, editors, CONCUR 2001 - Concurrency Theory, 12th International Conference, Aalborg, Denmark, August 20-25, 2001, Proceedings, volume 2154 of Lecture Notes in Computer Science, pages 248–261. Springer, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. S. Burckhardt. Principles of Eventual Consistency. now publishers, October 2014. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. S. Burckhardt, A. Gotsman, and H. Yang. Understanding eventual consistency. Technical Report MSR-TR-2013-39, Microsoft Research.Google ScholarGoogle Scholar
  14. J. Du, S. Elnikety, A. Roy, and W. Zwaenepoel. Orbe: scalable causal consistency using dependency matrices and physical clocks. In ACM Symposium on Cloud Computing, SOCC ’13, Santa Clara, CA, USA, October 1-3, 2013, pages 11:1–11:14, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. J. Du, C. Iorgulescu, A. Roy, and W. Zwaenepoel. Gentlerain: Cheap and scalable causal consistency with physical clocks. In Proceedings of the ACM Symposium on Cloud Computing, Seattle, WA, USA, November 03 - 05, 2014, pages 4:1–4:13, 2014. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. J. Esparza. Decidability and complexity of petri net problems — an introduction. In Lectures on Petri Nets I: Basic Models. Springer Berlin Heidelberg, 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. C. J. Fidge. Timestamps in message-passing systems that preserve the partial ordering. Australian National University. Department of Computer Science, 1987.Google ScholarGoogle Scholar
  18. M. J. Fischer, N. A. Lynch, and M. S. Paterson. Impossibility of distributed consensus with one faulty process. J. ACM, 32(2):374– 382, Apr. 1985. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. F. Furbach, R. Meyer, K. Schneider, and M. Senftleben. Memory model-aware testing - a unified complexity analysis. In Application of Concurrency to System Design (ACSD), 2014 14th International Conference on, pages 92–101, June 2014. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. S. Gilbert and N. A. Lynch. Brewer’s conjecture and the feasibility of consistent, available, partition-tolerant web services. SIGACT News, 33(2):51–59, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. J. Hamza. Algorithmic Verification of Concurrent and Distributed Data Structures. PhD thesis, Université Paris Diderot, 2015.Google ScholarGoogle Scholar
  22. J. Hamza. On the complexity of linearizability. In NETYS ’15, volume 9466 of Lecture Notes in Computer Science. Springer, 2015.Google ScholarGoogle Scholar
  23. T. A. Henzinger, A. Sezgin, and V. Vafeiadis. Aspect-oriented linearizability proofs. In CONCUR ’13. Springer, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. M. Herlihy and J. M. Wing. Linearizability: A correctness condition for concurrent objects. ACM Trans. Program. Lang. Syst., 12(3), 1990. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. J. Hopcroft and J.-J. Pansiot. On the reachability problem for 5dimensional vector addition systems. Theoretical Computer Science, 8(2):135–159, 1979.Google ScholarGoogle ScholarCross RefCross Ref
  26. E. Jiménez, A. Fernández, and V. Cholvi. A parametrized algorithm that implements sequential, causal, and cache memory consistencies. J. Syst. Softw., 81(1):120–131, Jan. 2008. ISSN 0164-1212. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. R. M. Karp and R. E. Miller. Parallel program schemata. Journal of Computer and system Sciences, 3(2):147–195, 1969. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. A.-M. Kermarrec, A. I. T. Rowstron, M. Shapiro, and P. Druschel. The icecube approach to the reconciliation of divergent replicas. In PODC, pages 210–218, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. R. Ladin, B. Liskov, L. Shrira, and S. Ghemawat. Providing high availability using lazy replication. ACM Trans. Comput. Syst., 10(4): 360–391, Nov. 1992. ISSN 0734-2071. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. L. Lamport. Time, clocks, and the ordering of events in a distributed system. Commun. ACM, 21(7):558–565, July 1978. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. L. Lamport. How to make a multiprocessor computer that correctly executes multiprocess programs. IEEE Trans. Comput., 28(9):690– 691, Sept. 1979. ISSN 0018-9340. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. M. Lesani, C. J. Bell, and A. Chlipala. Chapar: certified causally consistent distributed key-value stores. In ACM SIGPLAN Notices, volume 51, pages 357–370. ACM, 2016. Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. W. Lloyd, M. J. Freedman, M. Kaminsky, and D. G. Andersen. Don’t settle for eventual: scalable causal consistency for wide-area storage with COPS. In SOSP, pages 401–416, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. F. Mattern. Virtual time and global states of distributed systems. In PARALLEL AND DISTRIBUTED ALGORITHMS, pages 215–226. North-Holland, 1988.Google ScholarGoogle Scholar
  35. J. Michaux, X. Blanc, M. Shapiro, and P. Sutra. A semantically rich approach for collaborative model edition. In SAC, pages 1470–1475, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  36. M. Perrin, A. Mostefaoui, and C. Jard. Causal consistency: Beyond memory. In Proceedings of the 21st ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming, PPoPP ’16, pages 26:1–26:12, New York, NY, USA, 2016. ACM. ISBN 978-1-4503- 4092-2. Google ScholarGoogle ScholarDigital LibraryDigital Library
  37. C. A. Petri. Kommunikation mit automaten. 1962.Google ScholarGoogle Scholar
  38. M. Raynal and A. Schiper. From causal consistency to sequential consistency in shared memory systems. In International Conference on Foundations of Software Technology and Theoretical Computer Science, pages 180–194. Springer, 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library
  39. D. B. Terry, A. J. Demers, K. Petersen, M. Spreitzer, M. Theimer, and B. W. Welch. Session guarantees for weakly consistent replicated data. In Proceedings of the Third International Conference on Parallel and Distributed Information Systems, PDIS ’94, pages 140–149, Washington, DC, USA, 1994. IEEE Computer Society. ISBN 0-8186-6400-2. Google ScholarGoogle ScholarDigital LibraryDigital Library
  40. D. B. Terry, M. Theimer, K. Petersen, A. J. Demers, M. Spreitzer, and C. Hauser. Managing update conflicts in bayou, a weakly connected replicated storage system. In M. B. Jones, editor, Proceedings of the Fifteenth ACM Symposium on Operating System Principles, SOSP 1995, Copper Mountain Resort, Colorado, USA, December 3-6, 1995, pages 172–183. ACM, 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library
  41. D. B. Terry, V. Prabhakaran, R. Kotla, M. Balakrishnan, M. K. Aguilera, and H. Abu-Libdeh. Consistency-based service level agreements for cloud storage. In Proceedings of the Twenty-Fourth ACM Symposium on Operating Systems Principles, SOSP ’13, pages 309–324, New York, NY, USA, 2013. ACM. ISBN 978-1-4503-2388-8. Google ScholarGoogle ScholarDigital LibraryDigital Library
  42. H. Wei, Y. Huang, J. Cao, X. Ma, and J. Lu. Verifying PRAM consistency over read/write traces of data replicas. CoRR, abs/1302.5161, 2013.Google ScholarGoogle Scholar
  43. P. Wolper. Expressing interesting properties of programs in propositional temporal logic. In POPL ’86: Conference Record of the Thirteenth Annual ACM Symposium on Principles of Programming Languages, pages 184–193. ACM Press, 1986. Google ScholarGoogle ScholarDigital LibraryDigital Library
  44. M. Zawirski, N. Preguic¸a, S. Duarte, A. Bieniusa, V. Balegas, and M. Shapiro. Write fast, read in the past: Causal consistency for clientside applications. In Proceedings of the 16th Annual Middleware Conference, Middleware ’15, pages 75–87, New York, NY, USA, 2015. ACM. ISBN 978-1-4503-3618-5. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. On verifying causal consistency

                        Recommendations

                        Comments

                        Login options

                        Check if you have access through your login credentials or your institution to get full access on this article.

                        Sign in
                        • Published in

                          cover image ACM Conferences
                          POPL '17: Proceedings of the 44th ACM SIGPLAN Symposium on Principles of Programming Languages
                          January 2017
                          901 pages
                          ISBN:9781450346603
                          DOI:10.1145/3009837

                          Copyright © 2017 ACM

                          Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected].

                          Publisher

                          Association for Computing Machinery

                          New York, NY, United States

                          Publication History

                          • Published: 1 January 2017

                          Permissions

                          Request permissions about this article.

                          Request Permissions

                          Check for updates

                          Qualifiers

                          • research-article

                          Acceptance Rates

                          Overall Acceptance Rate824of4,130submissions,20%

                          Upcoming Conference

                          POPL '25

                        PDF Format

                        View or Download as a PDF file.

                        PDF

                        eReader

                        View online with eReader.

                        eReader