Probabilistic Total Store Ordering

We present Probabilistic Total Store Ordering (PTSO) – a probabilistic extension of the classical TSO semantics. For a given (finitestate) program, the operational semantics of PTSO induces an infinitestate Markov chain. We resolve the inherent non-determinism due to process schedulings and memory updates according to given probability distributions. We provide a comprehensive set of results showing the decidability of several properties for PTSO, namely (i) Almost-Sure (Repeated) Reachability: whether a run, starting from a given initial configuration, almost surely visits (resp. almost surely repeatedly visits) a given set of target configurations. (ii) Almost-Never (Repeated) Reachability: whether a run from the initial configuration, almost never visits (resp. almost never repeatedly visits) the target. (iii) Approximate Quantitative (Repeated) Reachability: to approximate, up to an arbitrary degree of precision, the measure of runs that start from the initial configuration and (repeatedly) visit the target. (iv) Expected Average Cost: to approximate, up to an arbitrary degree of precision, the expected average cost of a run from the initial configuration to the target. We derive our results through a nontrivial combination of results from the classical theory of (infinite-state) Markov chains, the theories of decisive and eager Markov chains, specific techniques from combinatorics, as well as, decidability and complexity results for the classical (non-probabilistic) TSO semantics. As far as we know, this is the first work that considers probabilistic verification of programs running on weak memory models.

[1]  Moshe Y. Vardi Automatic verification of probabilistic concurrent finite state programs , 1985, 26th Annual Symposium on Foundations of Computer Science (sfcs 1985).

[2]  Rajiv Gupta,et al.  Efficient Sequential Consistency Using Conditional Fences , 2010, 2010 19th International Conference on Parallel Architectures and Compilation Techniques (PACT).

[3]  J. Kemeny,et al.  Denumerable Markov chains , 1969 .

[4]  Luca de Alfaro,et al.  From Fairness to Chance , 1998, PROBMIV.

[5]  Kousha Etessami,et al.  Recursive Markov Decision Processes and Recursive Stochastic Games , 2005, ICALP.

[6]  Zhiming Liu,et al.  Decidability of Liveness on the TSO Memory Model , 2021, ArXiv.

[7]  Zohar Manna,et al.  The Temporal Logic of Reactive and Concurrent Systems , 1991, Springer New York.

[8]  Jade Alglave,et al.  Litmus: Running Tests against Hardware , 2011, TACAS.

[9]  Sarita V. Adve,et al.  Shared Memory Consistency Models: A Tutorial , 1996, Computer.

[10]  Feller William,et al.  An Introduction To Probability Theory And Its Applications , 1950 .

[11]  Krishnendu Chatterjee,et al.  Deciding Fast Termination for Probabilistic VASS with Nondeterminism , 2019, ATVA.

[12]  Marta Z. Kwiatkowska,et al.  PRISM 4.0: Verification of Probabilistic Real-Time Systems , 2011, CAV.

[13]  Stefanos Kaxiras,et al.  Racer: TSO consistency via race detection , 2016, 2016 49th Annual IEEE/ACM International Symposium on Microarchitecture (MICRO).

[14]  Tomás Brázdil,et al.  Efficient Analysis of Probabilistic Programs with an Unbounded Counter , 2014, JACM.

[15]  Anton Podkopaev,et al.  Making weak memory models fair , 2020, Proc. ACM Program. Lang..

[16]  Parosh Aziz Abdulla,et al.  A Load-Buffer Semantics for Total Store Ordering , 2017, Log. Methods Comput. Sci..

[17]  Josep Torrellas,et al.  WeeFence: toward making fences free in TSO , 2013, ISCA.

[18]  Parosh Aziz Abdulla,et al.  Simulating perfect channels with probabilistic lossy channels , 2005, Inf. Comput..

[19]  Christel Baier,et al.  A note on the attractor-property of infinite-state Markov chains , 2006, Inf. Process. Lett..

[20]  Tomás Brázdil,et al.  Runtime Analysis of Probabilistic Programs with Unbounded Recursion , 2010, ICALP.

[21]  Stephan Merz,et al.  Model Checking , 2000 .

[22]  Parosh Aziz Abdulla,et al.  Eager Markov Chains , 2006, ATVA.

[23]  Sebastian Burckhardt,et al.  What's Decidable about Weak Memory Models? , 2012, ESOP.

[24]  Christel Baier,et al.  Principles of Model Checking (Representation and Mind Series) , 2008 .

[25]  Marta Kwiatkowska,et al.  Survey of fairness notions , 1989 .

[26]  J. Ben Atkinson,et al.  Modeling and Analysis of Stochastic Systems , 1996 .

[27]  Javier Esparza,et al.  Model checking probabilistic pushdown automata , 2004, Proceedings of the 19th Annual IEEE Symposium on Logic in Computer Science, 2004..

[28]  Joost-Pieter Katoen,et al.  Zero-reachability in probabilistic multi-counter automata , 2014, CSL-LICS.

[29]  Sebastian Burckhardt,et al.  On the verification problem for weak memory models , 2010, POPL '10.

[30]  Vijay Nagarajan,et al.  TSO-CC: Consistency directed cache coherence for TSO , 2014, 2014 IEEE 20th International Symposium on High Performance Computer Architecture (HPCA).

[31]  Scott Owens,et al.  Benchmarking weak memory models , 2016, PPOPP.

[32]  Peter Sewell,et al.  A Better x86 Memory Model: x86-TSO , 2009, TPHOLs.

[33]  Nathalie Bertrand,et al.  Analysing Decisive Stochastic Processes , 2016, ICALP.