Skip to main content

The Complexity of Weak Consistency

  • Conference paper
  • First Online:
Frontiers in Algorithmics (FAW 2018)

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 10823))

Included in the following conference series:

Abstract

Weak consistency is a memory model that is frequently considered for shared memory systems. Its most distinguishable feature lies in a category of operations in two types: data operations and synchronization operations. For highly parallel shared memory systems, this model offers greater performance potential than strong models such as sequential consistency by permitting unconstrained optimization on updates propagation before synchronization is invoked. It captures the intuition that delaying updates produced by data operations before triggering a synchronization operation does not typically affect the program correctness.

To formalize the connection between concrete executions and the corresponding specification, we propose in this work a new approach to define weak consistency. This formalization, defined in terms of distributed histories abstracted from concrete executions, provides an additional perception of the concept and facilitates automatic analysis of system behaviors. We then investigate the problems on verifying whether implementations have correctly implemented weak consistency. Specifically, we consider two problems: (1) the testing problem that checks whether one single execution is weakly consistent, a critical problem for designing efficient testing and bug hunting algorithms, and (2) the model checking problem that determines whether all executions of an implementation are weakly consistent. We show that the testing problem is NP-complete, even for finite processes and short programs. The model checking problem is proven to be undecidable.

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

References

  1. 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 

  2. Lamport, L.: How to make a multiprocessor computer that correctly executes multiprocess programs. IEEE Trans. Comput. 28(9), 690–691 (1979)

    Article  MATH  Google Scholar 

  3. Dubois, M., Scheurich, C., Briggs, F.: Memory access buffering in multiprocessors. ACM SIGARCH Comput. Architect. News 14, 434–442 (1986). IEEE Computer Society Press

    Google Scholar 

  4. Lamport, L.: Time, clocks, and the ordering of events in a distributed system. Commun. ACM 21(7), 558–565 (1978)

    Article  MATH  Google Scholar 

  5. Lipton, R.J., Sandberg, J.S.: PRAM: a scalable shared memory. Princeton University, Department of Computer Science (1988)

    Google Scholar 

  6. Adve, S.V., Hill, M.D.: Weak ordering - a new definition. ACM SIGARCH Comput. Architect. News 18, 2–14 (1990). ACM

    Google Scholar 

  7. Manson, J., Pugh, W., Adve, S.V.: The Java memory model. In: Proceedings of the 32nd ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL 2005, pp. 378–391. ACM, New York (2005)

    Google Scholar 

  8. Boehm, H.J., Adve, S.V.: Foundations of the C++ concurrency memory model. In: Proceedings of the 29th ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI 2008, pp. 68–78. ACM, New York (2008)

    Google Scholar 

  9. Version, I.P.I.: 2.06 revision b. Book I: Power ISA User Instruction Set Architecture (2010)

    Google Scholar 

  10. Sarkar, S., Sewell, P., Alglave, J., Maranget, L., Williams, D.: Understanding power multiprocessors. ACM SIGPLAN Not. 46(6), 175–186 (2011)

    Article  Google Scholar 

  11. Alglave, J., Fox, A., Ishtiaq, S., Myreen, M.O., Sarkar, S., Sewell, P., Nardelli, F.Z.: The semantics of power and arm multiprocessor machine code. In: Proceedings of the 4th Workshop on Declarative Aspects of Multicore Programming, pp. 13–24. ACM (2009)

    Google Scholar 

  12. Gaoang Liu, X.L.: The complexity of weak consistency, December 2017. https://github.com/GaoangLiu/github.io/blob/master/complexitywc/the-complexity-of-wc-full-description.pdf

  13. Papadimitriou, C.: The Theory of Database Concurrency Control. Computer Science Press Inc., Rockville (1986)

    MATH  Google Scholar 

  14. Gharachorloo, K.: Memory consistency models for shared-memory multiprocessors. Ph.D. thesis, Stanford University (1995)

    Google Scholar 

  15. Alur, R., McMillan, K., Peled, D.: Model-checking of correctness conditions for concurrent objects. In: 11th Annual IEEE Symposium on Logic in Computer Science, Proceedings, pp. 219–228 (1996)

    Google Scholar 

  16. Post, E.L.: A variant of a recursively unsolvable problem. Bull. Am. Math. Soc. 52(4), 264–268 (1946)

    Article  MathSciNet  MATH  Google Scholar 

  17. Wei, H., De Biasi, M., Huang, Y., Cao, J., Lu, J.: Verifying pram consistency over read/write traces of data replicas. arXiv preprint arXiv:1302.5161 (2013)

  18. Bouajjani, A., Enea, C., Guerraoui, R., Hamza, J.: On verifying causal consistency. In: Proceedings of the 44th ACM SIGPLAN Symposium on Principles of Programming Languages, pp. 626–638. ACM (2017)

    Google Scholar 

  19. Furbach, F., Meyer, R., Schneider, K., Senftleben, M.: Memory-model-aware testing: a unified complexity analysis. ACM Trans. Embedded Comput. Syst. (TECS) 14(4), 63 (2015)

    Google Scholar 

  20. Bouajjani, A., Emmi, M., Enea, C., Hamza, J.: Verifying concurrent programs against sequential specifications. Program. Lang. Syst. 7792, 290–309 (2013)

    MATH  Google Scholar 

  21. Wang, C., Lv, Y., Liu, G., Wu, P.: Quasi-linearizability is undecidable. In: Feng, X., Park, S. (eds.) APLAS 2015. LNCS, vol. 9458, pp. 369–386. Springer, Cham (2015). https://doi.org/10.1007/978-3-319-26529-2_20

    Chapter  Google Scholar 

  22. Bouajjani, A., Enea, C., Hamza, J.: Verifying eventual consistency of optimistic replication systems. ACM SIGPLAN Not. 49, 285–296 (2014). ACM

    Google Scholar 

  23. Perrin, M., Mostefaoui, A., Jard, C.: Causal consistency: beyond memory. In: Proceedings of the 21st ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming, p. 26. ACM (2016)

    Google Scholar 

  24. Mealy, G.H.: A method for synthesizing sequential circuits. Bell Syst. Tech. J. 34(5), 1045–1079 (1955)

    Article  MathSciNet  Google Scholar 

  25. Gharachorloo, K., Lenoski, D., Laudon, J., Gibbons, P., Gupta, A., Hennessy, J.: Memory consistency and event ordering in scalable shared-memory multiprocessors. SIGARCH Comput. Archit. News 18(2SI), 15–26 (1990)

    Google Scholar 

Download references

Acknowledgement

We thank the anonymous reviewers for their helpful feedback. This research was supported by National Natural Science Foundation of China Grant No. 60833001.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Gaoang Liu .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2018 Springer International Publishing AG, part of Springer Nature

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Liu, G., Liu, X. (2018). The Complexity of Weak Consistency. In: Chen, J., Lu, P. (eds) Frontiers in Algorithmics. FAW 2018. Lecture Notes in Computer Science(), vol 10823. Springer, Cham. https://doi.org/10.1007/978-3-319-78455-7_17

Download citation

  • DOI: https://doi.org/10.1007/978-3-319-78455-7_17

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-319-78454-0

  • Online ISBN: 978-3-319-78455-7

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics