Reasoning Algebraically About Refinement on TSO Architectures

The Total Store Order memory model is widely implemented by modern multicore architectures such as x86, where local buffers are used for optimisation, allowing limited forms of instruction reordering. The presence of buffers and hardware-controlled buffer flushes increases the level of non-determinism from the level specified by a program, complicating the already difficult task of concurrent programming. This paper presents a new notion of refinement for weak memory models, based on the observation that pending writes to a process’ local variables may be treated as if the effect of the update has already occurred in shared memory. We develop an interval-based model with algebraic rules for various programming constructs. In this framework, several decomposition rules for our new notion of refinement are developed. We apply our approach to verify the spinlock algorithm from the literature.

[1]  Sebastian Burckhardt,et al.  CheckFence: checking consistency of concurrent data types on relaxed memory models , 2007, PLDI '07.

[2]  Norbert Schirmer,et al.  From Total Store Order to Sequential Consistency: A Practical Reduction Theorem , 2010, ITP.

[3]  Francesco Zappa Nardelli,et al.  x86-TSO , 2010, Commun. ACM.

[4]  Ben C. Moszkowski,et al.  A complete axiomatization of interval temporal logic with infinite time , 2000, Proceedings Fifteenth Annual IEEE Symposium on Logic in Computer Science (Cat. No.99CB36332).

[5]  Leslie Lamport,et al.  How to Make a Multiprocessor Computer That Correctly Executes Multiprocess Programs , 2016, IEEE Transactions on Computers.

[6]  John Derrick,et al.  Fractional Permissions and Non-Deterministic Evaluators in Interval Temporal Logic , 2013, Electron. Commun. Eur. Assoc. Softw. Sci. Technol..

[7]  Brian Campbell,et al.  Amortised Memory Analysis Using the Depth of Data Structures , 2009, ESOP.

[8]  Jade Alglave,et al.  A formal hierarchy of weak memory models , 2012, Formal Methods in System Design.

[9]  Ralph-Johan Back,et al.  Reasoning algebraically about loops , 1999, Acta Informatica.

[10]  Theo D'Hondt ECOOP 2010 - Object-Oriented Programming, 24th European Conference, Maribor, Slovenia, June 21-25, 2010. Proceedings , 2010, ECOOP.

[11]  Sebastian Burckhardt,et al.  Verifying Local Transformations on Relaxed Memory Models , 2010, CC.

[12]  John Tang Boyland,et al.  Checking Interference with Fractional Permissions , 2003, SAS.

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

[14]  Scott Owens,et al.  Reasoning about the Implementation of Concurrency Abstractions on x86-TSO , 2010, ECOOP.

[15]  Daniel Pierre Bovet,et al.  Understanding the Linux Kernel , 2000 .

[16]  David L. Dill,et al.  An executable specification, analyzer and verifier for RMO (relaxed memory order) , 1995, SPAA '95.

[17]  John Derrick,et al.  Deriving real-time action systems with multiple time bands using algebraic reasoning , 2014, Sci. Comput. Program..

[18]  Alan Burns,et al.  Comparing Degrees of Non-Determinism in Expression Evaluation , 2013, Comput. J..

[19]  Sebastian Burckhardt,et al.  Concurrent Library Correctness on the TSO Memory Model , 2012, ESOP.

[20]  Oleg Travkin,et al.  SPIN as a Linearizability Checker under Weak Memory Models , 2013, Haifa Verification Conference.

[21]  Brijesh Dongol,et al.  Towards an Algebra for Real-Time Programs , 2012, RAMiCS.

[22]  Peter Jipsen,et al.  Relational and algebraic methods in computer science , 2016, J. Log. Algebraic Methods Program..

[23]  J. Michael Spivey,et al.  The Z notation - a reference manual , 1992, Prentice Hall International Series in Computer Science.

[24]  Jim Woodcock,et al.  Theoretical Aspects of Computing – ICTAC 2013 , 2013, Lecture Notes in Computer Science.

[25]  John Derrick,et al.  Data refinement for true concurrency , 2013, Refine@IFM.

[26]  David A. Wood,et al.  A Primer on Memory Consistency and Cache Coherence , 2012, Synthesis Lectures on Computer Architecture.

[27]  John Derrick,et al.  A High-Level Semantics for Program Execution under Total Store Order Memory , 2013, ICTAC.

[28]  Hongseok Yang,et al.  Show No Weakness: Sequentially Consistent Specifications of TSO Libraries , 2012, DISC.

[29]  Brijesh Dongol,et al.  Deriving real-time action systems in a sampling logic , 2013, Sci. Comput. Program..