Parosh Aziz Abdulla 1, Mohamed Faouzi Atig 1, Zeinab Ganjei 2, Ahmed Rezine 2 and Yunyun Zhu 1 1. Uppsala University, Sweden 2. Linköping University, Sweden.

Slides:



Advertisements
Similar presentations
Bounded Model Checking of Concurrent Data Types on Relaxed Memory Models: A Case Study Sebastian Burckhardt Rajeev Alur Milo M. K. Martin Department of.
Advertisements

Automated Theorem Proving Lecture 1. Program verification is undecidable! Given program P and specification S, does P satisfy S?
Model Checking and Testing combined
Automatic Verification Book: Chapter 6. How can we check the model? The model is a graph. The specification should refer the the graph representation.
Multi-core Computing Lecture 3 MADALGO Summer School 2012 Algorithms for Modern Parallel and Distributed Models Phillip B. Gibbons Intel Labs Pittsburgh.
Tintu David Joy. Agenda Motivation Better Verification Through Symmetry-basic idea Structural Symmetry and Multiprocessor Systems Mur ϕ verification system.
Greta YorshEran YahavMartin Vechev IBM Research. { ……………… …… …………………. ……………………. ………………………… } P1() Challenge: Correct and Efficient Synchronization { ……………………………
Greta YorshEran YahavMartin Vechev IBM Research. { ……………… …… …………………. ……………………. ………………………… } T1() Challenge: Correct and Efficient Synchronization { ……………………………
SAT Based Abstraction/Refinement in Model-Checking Based on work by E. Clarke, A. Gupta, J. Kukula, O. Strichman (CAV’02)
Impossibilities for Disjoint-Access Parallel Transactional Memory : Alessia Milani [Guerraoui & Kapalka, SPAA 08] [Attiya, Hillel & Milani, SPAA 09]
Chapter 15: Transactions Transaction Concept Transaction Concept Concurrent Executions Concurrent Executions Serializability Serializability Testing for.
1 Model checking. 2 And now... the system How do we model a reactive system with an automaton ? It is convenient to model systems with Transition systems.
Concurrent programming: From theory to practice Concurrent Algorithms 2014 Vasileios Trigonakis Georgios Chatzopoulos.
Automatic Verification Book: Chapter 6. What is verification? Traditionally, verification means proof of correctness automatic: model checking deductive:
Hierarchical Cache Coherence Protocol Verification One Level at a Time through Assume Guarantee Xiaofang Chen, Yu Yang, Michael Delisi, Ganesh Gopalakrishnan.
Department of Computer Sciences Revisiting the Complexity of Hardware Cache Coherence and Some Implications Rakesh Komuravelli Sarita Adve, Ching-Tsun.
1 CS216 Advanced Database Systems Shivnath Babu Notes 11: Concurrency Control.
Transaction Based Modeling and Verification of Hardware Protocols Xiaofang Chen, Steven M. German and Ganesh Gopalakrishnan Supported in part by SRC Contract.
Transaction Based Modeling and Verification of Hardware Protocols Xiaofang Chen, Steven M. German and Ganesh Gopalakrishnan Supported in part by Intel.
Keeping a Crowd Safe On the Complexity of Parameterized Verification Javier Esparza Technical University of Munich.
Parosh Aziz Abdulla Pritha Mahata Aletta Nyl é n Uppsala University Downward Closed Language Generators.
From Monotonic Transition Systems to Monotonic Games Parosh Aziz Abdulla Uppsala University.
© Anvesh Komuravelli IC3/PDR Overview of IC3/PDR Anvesh Komuravelli Carnegie Mellon University.
Regular Model Checking Parosh Aziz Abdulla Uppsala University Cooperation with B. Jonsson, M. Nilsson, J. d’Orso.
Chapter 6 Process Synchronization: Part 2. Problems with Semaphores Correct use of semaphore operations may not be easy: –Suppose semaphore variable called.
Verification of Parameterized Timed Systems Parosh Aziz Abdulla Uppsala University Johann Deneux Pritha Mahata Aletta Nylen.
ICS 421 Spring 2010 Transactions & Concurrency Control (i) Asst. Prof. Lipyeow Lim Information & Computer Science Department University of Hawaii at Manoa.
1 Formal Methods in SE Qaisar Javaid Assistant Professor Lecture # 11.
Crash Recovery. Review: The ACID properties A A tomicity: All actions in the Xaction happen, or none happen. C C onsistency: If each Xaction is consistent,
Model Checking Lecture 5. Outline 1 Specifications: logic vs. automata, linear vs. branching, safety vs. liveness 2 Graph algorithms for model checking.
Formalisms and Verification for Transactional Memories Vasu Singh EPFL Switzerland.
1 Lecture 23: Transactional Memory Topics: consistency model recap, introduction to transactional memory.
Verification of Hierarchical Cache Coherence Protocols for Future Processors Student: Xiaofang Chen Advisor: Ganesh Gopalakrishnan.
Counterexample Guided Invariant Discovery for Parameterized Cache Coherence Verification Sudhindra Pandav Konrad Slind Ganesh Gopalakrishnan.
Model Checking Lecture 5. Outline 1 Specifications: logic vs. automata, linear vs. branching, safety vs. liveness 2 Graph algorithms for model checking.
Transaction Based Modeling and Verification of Hardware Protocols Xiaofang Chen, Steven M. German and Ganesh Gopalakrishnan Supported in part by SRC Contract.
Chair of Software Engineering 1 Unreliable Channels are Easier To Verify Than Perfect Channels by G. Cécé, A. Finkel, and S. Purushotaman Iyer Arnaud Bailly.
272: Software Engineering Fall 2012 Instructor: Tevfik Bultan Lecture 4: SMT-based Bounded Model Checking of Concurrent Software.
Maria-Cristina Marinescu Martin Rinard Laboratory for Computer Science Massachusetts Institute of Technology A Synthesis Algorithm for Modular Design of.
An Introduction to Software Transactional Memory
1 Thread Synchronization: Too Much Milk. 2 Implementing Critical Sections in Software Hard The following example will demonstrate the difficulty of providing.
Programming Paradigms for Concurrency Part 2: Transactional Memories Vasu Singh
Reduced Hardware NOrec: A Safe and Scalable Hybrid Transactional Memory Alexander Matveev Nir Shavit MIT.
Race Checking by Context Inference Tom Henzinger Ranjit Jhala Rupak Majumdar UC Berkeley.
Hybrid Transactional Memory Sanjeev Kumar, Michael Chu, Christopher Hughes, Partha Kundu, Anthony Nguyen, Intel Labs University of Michigan Intel Labs.
Transactional Memory Lecturer: Danny Hendler. 2 2 From the New York Times…
Formal verification of skiplist algorithms Student: Trinh Cong Quy Supervisor: Bengt Jonsson Reviewer: Parosh Abdulla.
7c.1 Silberschatz, Galvin and Gagne ©2003 Operating System Concepts with Java Module 7c: Atomicity Atomic Transactions Log-based Recovery Checkpoints Concurrent.
Degrees of Isolation – A Theoretical Formulation Presented by Balaji Sethuraman.
VERIFICATION OF PARAMETERIZED SYSTEMS MONOTONIC ABSTRACTION IN PARAMETERIZED SYSTEMS NAVNEETA NAVEEN PATHAK Parosh Aziz Abdullah, Giorgio Delzanno, Ahmed.
Hardware and Software transactional memory and usages in MRE
1 Distributed BDD-based Model Checking Orna Grumberg Technion, Israel Joint work with Tamir Heyman, Nili Ifergan, and Assaf Schuster CAV00, FMCAD00, CAV01,
Alpine Verification Meeting 2008 Model Checking Transactional Memories Vasu Singh (Joint work with Rachid Guerraoui, Tom Henzinger, Barbara Jobstmann)
On Transactional Memory, Spinlocks and Database Transactions Khai Q. Tran Spyros Blanas Jeffrey F. Naughton (University of Wisconsin Madison)
4 November 2005 CS 838 Presentation 1 Nested Transactional Memory: Model and Preliminary Sketches J. Eliot B. Moss and Antony L. Hosking Presented by:
Lecture 20: Consistency Models, TM
Maurice Herlihy and J. Eliot B. Moss,  ISCA '93
Algorithmic Improvements for Fast Concurrent Cuckoo Hashing
Opeoluwa Matthews, Jesse Bingham, Daniel Sorin
PHyTM: Persistent Hybrid Transactional Memory
Michael D. Jones, Ganesh Gopalakrishnan
Automatic Verification
Two Ideas of This Paper Using Permissions-only Cache to deduce the rate at which less-efficient overflow handling mechanisms are invoked. When the overflow.
Lecture 22: Consistency Models, TM
Hassium: Hardware Assisted Database Synchronization
Distributed Transactions
Lecture: Consistency Models, TM
Abstraction-Guided Synthesis of synchronization
ECE 667 Synthesis and Verification of Digital Systems
Don Porter Portions courtesy Emmett Witchel
Presentation transcript:

Parosh Aziz Abdulla 1, Mohamed Faouzi Atig 1, Zeinab Ganjei 2, Ahmed Rezine 2 and Yunyun Zhu 1 1. Uppsala University, Sweden 2. Linköping University, Sweden FMCAD 2015

 Transactional memories  Formal model  Small model theorem ◦ Limit the analysis to a finite number of variables  Verification algorithm for cache coherence ◦ Backward reachability analysis with monotonic abstraction  Prototype ◦ Two cache protocols verified

Init: x = 0 void add() { atomic { int t = x; t = t + 5; x = t; } Thread 1 void add() { atomic { int t = x; t = t + 10; x = t; } Thread 2  To simplify concurrent programming transaction

Thread 1 Thread 2 commit abort Init: x = 0 void add() { atomic { int t = x; t = t + 5; x = t; } Thread 1 void add() { atomic { int t = x; t = t + 10; x = t; } Thread 2 read x: 0 int t = x; int t = x t = t + 5; x = t; int t = x; t = t + 10; x = t; t = t + 5 x = t write x: 5 read x: 0 write x: 10 int t = x t = t + 10 x = t Properties of TMs: ◦ Atomicity ◦ Isolation Conflict! write x: 5

Thread 1 Thread 2 commit abort read x: 0 int t = x t = t + 5 x = t write x: 5 read x: 0 write x: 10 int t = x t = t + 10 x = t write x: 5 Hardware TM Init: x = 0 void add() { atomic { int t = x; t = t + 5; x = t; } Thread 1 void add() { atomic { int t = x; t = t + 10; x = t; } Thread 2

 Conflict manager ◦ Decide if an instruction can be executed  Cache protocol ◦ Adapted with TM context Conflict manager instruction response Cache C 1 Cache C 2 Memory x y z I I I x y z I I I x y z I I I Thread 1 Thread 2 commit abort int t = x t = t + 5 x = t int t = x t = t + 10 x = t data state line data state line data state line

Thread 1 write x Thread 2 commit read x commit Conflict manager instruction response x y z I I I x y z I I I x y z I I I TMI M M M M M M M M I I M M write x Thread 1 write x Thread 2 commit write x commit Trace not allowed! abort Trace allowed Incoherent states! Modified Exclusive Shared Invalid Write within a transaction Read while another writes within a transaction Filter Cache C 1 Cache C 2 Memory Commit Abort data state line data state line data state line

 Verification of coherence in presence of filters  Challenges : ◦ Unbounded number of transactions ◦ Unbounded number of threads ◦ Unbounded number of variables Thread 1 write x Thread 2 commit write x commit abort Conflict manager instruction response Filter Thread 1. Thread 1. Thread 2. Thread 2. write x read y write y read x commit abort write y commit abort Thread 1. Thread 1. write x read y commit write y Thread 2. Thread 2. write y read x abort write x Thread n. Thread n. read z write z commit instruction response... write z... Cache C 1 Cache C 2 Cache C n Memory Cache C 1 Cache C 2 Memory x y z I I I x y z I I I x y z I I I M M I I data state line data state line data state line Cache C 1 Cache C 2 Memory x y z I TMI I x y z I I x y z I I I data state linedata state line data state line Cache C 1 Cache C n Memory x y z I TMI I x y z I I x y z I I I data state line data state line data state line

 Formal model for protocols with filters  Small model theorem ◦ Reduces the problem to finite number of variables  Backward reachability analysis  Prototype

At least one remote cache line of x is E, TI or I None remote cache line of x is TMI All the remote cache lines of x in M transits to S Cache C 1 x I TI y z TMI Cache C 2 x E I y z I Cache C 3 x I I y z I state line state line state line state local remote I I S S E E I I S S

 Finite set of forbidden patterns write, x, t 1 write, x, t 2 commit, t 1 commit, t 2 Forbidden pattern Filter Thread 1 write x Thread 2 commit write x commit Cache C 1 x I I y z I Cache C 2 x I I y z I Cache C 3 x I I y z I instruction response write, x, t 1 write, x, t 2 read, z, t 1 commit, t 2 write, y, t 2 commit, t 2 write, x, t 2 write, x, t 1 commit, t 2 Trace not allowed! trace state line state line state line

 Reduces the analysis to a finite number of variables Thread 1 write x Thread 2 read y write z write x commit Only x involved write, x, t 1 write, x, t 2 commit, t 1 commit, t 2 Thread 1 write x Thread 2 commit write x commit Reaches incoherent state, and passes the filter Filter instruction response write, x, t 1 write, z, t 1 write, x, t 2 commit, t 2 read, y, t 2 commit, t 1 write, x, t 2 write, x, t 1 commit, t 2 commit, t 1 Incorrect Cache C 1 x I I y z I Cache C 2 x I I y z I state line state line E E M M M M M M M M M M

 Define a well-quasi-order on configurations  Prove transition relation is monotonic  Provide an algorithm to compute the set of predecessors of an upward closed set Achievable with techniques

⊑ Conf 1 Conf 2  Define a well-quasi-order on configurations Cache C 1 x S E z Cache C 2 x S I z state line state line Cache C 1 x S E y z TMI Cache C 2 x S I y z I Cache C 3 x S I y z I state line state line state line

Due to forbidden sets in transitions C1C1 x I C2C2 x I C1C1 x E C2C2 x I  Prove transition relation is monotonic C1C1 x I C2C2 x I C3C3 x S ⊑ S S Conf 1 ⊑ Conf 3 Conf 4 ⊑ Conf 2

 Define a well-quasi-order on configurations  Prove transition relation is monotonic Monotonic abstraction needed

 Incoherent states representable by finite caches  With more caches still incoherent  Upward closed sets: symbolic representations for incoherent states M M M M I I M M I I I I S S Minimal element

 Start from bad set  Compute the set of predecessors, and make it upward-closed if needed  Stop if no more new configuration discovered.  A searching branch closed if ◦ The minimal element is subsumed By an older minimal element ◦ The trace fails the filter t1t1 t2t2 t2t2 t3t3 t1t1 t3t3 ⊒ ⊒ Trace (t 3, t 2 ) fails the filter Monotonic abstraction ∩ Init = ∅ ?

 Extension of Zaama, which implements constrained monotonic abstraction  Applied to ◦ Two cache protocols ◦ With six filters  Results obtained a 2.9 Ghz Intel Core i7 with 8GB of RAM

UTCP (serial. filter) Yes, bad state (M, M) 117.3sCache protocol (filter) #rules #bad states Reachable(Y/N) Execution time

 Formal model for protocols with filters  Small model theorem ◦ Reduces the problem to finite number of variables  Backward reachability analysis  Prototype