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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
References
Herlihy, M.P., Wing, J.M.: Linearizability - a correctness condition for concurrent objects. Acm Trans. Program. Lang. Syst. 12(3), 463–492 (1990)
Lamport, L.: How to make a multiprocessor computer that correctly executes multiprocess programs. IEEE Trans. Comput. 28(9), 690–691 (1979)
Dubois, M., Scheurich, C., Briggs, F.: Memory access buffering in multiprocessors. ACM SIGARCH Comput. Architect. News 14, 434–442 (1986). IEEE Computer Society Press
Lamport, L.: Time, clocks, and the ordering of events in a distributed system. Commun. ACM 21(7), 558–565 (1978)
Lipton, R.J., Sandberg, J.S.: PRAM: a scalable shared memory. Princeton University, Department of Computer Science (1988)
Adve, S.V., Hill, M.D.: Weak ordering - a new definition. ACM SIGARCH Comput. Architect. News 18, 2–14 (1990). ACM
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)
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)
Version, I.P.I.: 2.06 revision b. Book I: Power ISA User Instruction Set Architecture (2010)
Sarkar, S., Sewell, P., Alglave, J., Maranget, L., Williams, D.: Understanding power multiprocessors. ACM SIGPLAN Not. 46(6), 175–186 (2011)
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)
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
Papadimitriou, C.: The Theory of Database Concurrency Control. Computer Science Press Inc., Rockville (1986)
Gharachorloo, K.: Memory consistency models for shared-memory multiprocessors. Ph.D. thesis, Stanford University (1995)
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)
Post, E.L.: A variant of a recursively unsolvable problem. Bull. Am. Math. Soc. 52(4), 264–268 (1946)
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)
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)
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)
Bouajjani, A., Emmi, M., Enea, C., Hamza, J.: Verifying concurrent programs against sequential specifications. Program. Lang. Syst. 7792, 290–309 (2013)
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
Bouajjani, A., Enea, C., Hamza, J.: Verifying eventual consistency of optimistic replication systems. ACM SIGPLAN Not. 49, 285–296 (2014). ACM
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)
Mealy, G.H.: A method for synthesizing sequential circuits. Bell Syst. Tech. J. 34(5), 1045–1079 (1955)
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)
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
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2018 Springer International Publishing AG, part of Springer Nature
About this paper
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)