Yuxi Chen, Shu Wang, Shan Lu, and Karthikeyan Sankaralingam *

Size: px
Start display at page:

Download "Yuxi Chen, Shu Wang, Shan Lu, and Karthikeyan Sankaralingam *"

Transcription

1 Yuxi Chen, Shu Wang, Shan Lu, and Karthikeyan Sankaralingam * *

2 2 q Synchronization mistakes in multithreaded programs Thread 1 Thread 2 If(ptr){ tmp = *ptr; ptr = NULL; } Segfault

3 q Common q Hard to diagnose and fix correctly q Disasters in production runs 3

4 4 q Semantic correctness q Performance v Low recovery latency v Low overhead So what s the solution?

5 5 Thread 1 Thread 2 Thread 3 Execution Failure site

6 6 Traditional Roll-back Recovery Thread 1 Thread 2 Thread 3 Execution Whole-program memory-state checkpoint Failure site

7 7 Recovery capability Rx good capability poor performance 0.5 Overhead (%) 10 [1]Rx: Treating bugs as allergies a safe method to survive software failure, SOSP 05

8 8 ConAir Roll-back Recovery Thread 1 Thread 2 Execution Thread 3 setjmp longjmp Failure site

9 9 Recovery capability Rx good capability poor performance poor capability good performance ConAir 0.5 Overhead (%) 10

10 10 q ConAir cannot reexecute shared-variable writes Thread 1 Thread 2 Heap If(ptr){ *buf = newbuf(); tmp = *ptr; ptr = NULL; *buf = 0x123 0x234 *buf old = 0x123 *buf new = 0x234 } Segfault

11 11 Recovery capability Rx better capability worse performance worse capability better performance ConAir 0.5 Overhead (%) 10

12 12 BugTM static analysis code transformation Xbegin Xabort Xend Leveraging HTM Recovery capability BugTM H Rx ConAir Overhead (%) 10

13 13 BugTM static analysis code transformation Xbegin/Setjmp Xabort/Longjmp Xend Recovery capability Rx BugTM HS BugTM H ConAir Overhead (%)

14 Outline: 1. BugTM H 2. BugTM HS 3. Evaluation Methodology 4. Experiment Results 5. Conclusion 14

15 15 q Implicit checkpoint q Rollback-reexecution OPPORTUNITY CHALLENGE

16 16 q Performance challenges v High frequency of transaction uses v Unsuitable content of transactions (eg. trapping instructions) v Nesting && Loops

17 17 q Performance challenges q Correctness challenges v Unpaired transaction-start and transaction-commit v Deterministic aborts (eg. trapping instruction aborts)

18 18 q Performance challenges q Correctness challenges q Failure recovery challenges v Surround the buggy codes when failures happen v HTM-abort handlers 1. Carefully design HTM start, commit, and abort routines 2. Selectively insert HTM start, commit, and abort routines

19 19 q Xbegin q Xend q Xtest q Xabort Thread 1 +Xbegin(); + Xabort(); assertion(); +if(xtest()) +Xend(); + Xend();

20 20 mxbegin(){ if(!xtest()) Xbegin(); } No nested TM! mxend(){ if(xtest()) Xend(); } No unpaired Xbegin and Xend during run time!

21 21 Principle: put mxabort before where failures might happen If(ptr){ *buf = newbuf(); if(ptr == NULL){ +mxabort(); *buf assert_fail; = newbuf(); }else{ tmp = *ptr; tmp = *ptr; } }

22 22 Principle: q Avoid trapping instructions abort q Minimize capacity abort time(); + mxbegin(); If(ptr){ *buf = newbuf(); if(ptr==null){ + mxabort(); assert_fail; }else{ tmp = *ptr; } }

23 23 mxbegin() CFG node Potential failure mxbegin() Trapping/Call/loop-exit Instruction or function entrance

24 24 Principles: q Avoid trapping instructions abort q Minimize capacity abort Ø End TM before loop entry Ø End TM before function exit time (); + mxbegin(); If(ptr){ *buf = newbuf(); if(ptr==null){ + mxabort(); assert_fail; }else{ tmp = *ptr; } } + mxend();

25 25 mxend() CFG node mxend() Potential failure Trapping/Call/loop-header instruction Function exit mxend()

26 26 Design fallback and retry Principle: Reexecution only when aborts might be caused by concurrency bugs q Concurrency bug relevant aborts (reexecute in Tx mode) Ø Data conflict abort && Xabort abort q Concurrency bug irrelevant aborts (reexecute in non-tx mode) Ø Capacity abort && Trapping instruction abort

27 Outline: 1. BugTM H 2. BugTM HS 3. Evaluation Methodology 4. Experiment Results 5. Conclusion 27

28 28 Loc setjmp : locations where ConAir inserts setjmp Loc mxbegin : locations where BugTM H inserts mxbegin q Insert setjmp at every Loc setjmp q Insert mxbegin only when Loc mxbegin is farther than Loc setjmp q Not insert mxbegin if Loc setjmp and Loc mxbegin are same

29 29 mxbegin() setjmp mxbegin() CFG node Potential failure Trapping instruction setjmp Shared-variable writes Function entrance

30 30 qhtm rollback first (under an active transaction) Ølonger reexecution region qlongjmp rollback (not under an active transaction) ØIf HTM rollback fails, longjmp rollback can still have a chance

31 Outline: 1. BugTM H 2. BugTM HS 3. Evaluation Methodology 4. Experiment Results 5. Conclusion 31

32 32 Evaluation methodology q Benchmarks (29 bugs [1,2,3,4,5,6] ). q micro architecture Broadwell (4-core Intel Core i7-5775c) q LLVM [1] Guoliang Jin, et al, Automated atomicity-violation fixing, PLDI 11 [2] Horatiu Jula, et al, Deadlock immunity: Enabling systems to defend against deadlocks, OSDI 08 [3] Yao Shi, et al, Do I use the wrong definition? DefUse: Definition-use invariants for detecting concurrency and sequential bugs, OOPSLA 10 [4] Wei Zhang, et al, ConAir: Featherweight concurrency bug recovery via single-threaded idempotent execution, ASPLOS 13 [5] Wei Zhang, et al, ConSeq: Detecting concurrency bugs through sequential errors, ASPLOS 11 [6] Wei Zhang, et al, ConMem: Detecting Crash-Triggering Concurrency Bugs through an Effect-Oriented Approach, ACM TOSEM, 2012.

33 33 Recovery capability Recovery capability comparison Benchmarks(ID) Root Cause ConAir BugTM H BugTM HS Mysql2011 RAR Atomicity Violation - Mysql38883 RAR Atomicity Violation - Apache21287 RAW Atomicity Violation - Moz-JS18025 RAW Atomicity Violation - Moz-JS RAW Atomicity Violation - Bank WAR Atomicity Violation - Transmission Order Violation - Total ConAir < BugTM H < BugTM HS

34 34 Performance Overhead ConAir > BugTM HS > BugTM H overhead comparing with baseline: % BugTM ConAir: HS H : 0.31% 3.08% 1.39% ConAir BugTMH BugTMHS 2 0 Mysql2011 Mysql3596 Mysql38883 Apache21287 Moz-JS18025 Moz-JS Bank Moz-ex52111 Moz-ex Mysql791 Mysql16582 Benchmark Click FFT HTTrack Moz-xpcom61369 Transmission zsnes HawkNL Moz-JS79054 SQLite1672

35 Outline: 1. BugTM H 2. BugTM HS 3. Evaluation Methodology 4. Experiment Results 5. Conclusion 35

36 36 Conclusions q BugTM can help recover all major types of concurrency-bug failures in production run Ø Low run-time overhead Ø Outperform the state of art approach (ConAir) Ø Present novel ways of using HTM techniques (failure recovery) Come and eat this free lunch!

37

THE UNIVERSITY OF CHICAGO TRANSACTIONAL MEMORY SUPPORT FOR CONCURRENCY-BUG FAILURE RECOVERY IN PRODUCTION RUN A DISSERTATION SUBMITTED TO

THE UNIVERSITY OF CHICAGO TRANSACTIONAL MEMORY SUPPORT FOR CONCURRENCY-BUG FAILURE RECOVERY IN PRODUCTION RUN A DISSERTATION SUBMITTED TO THE UNIVERSITY OF CHICAGO TRANSACTIONAL MEMORY SUPPORT FOR CONCURRENCY-BUG FAILURE RECOVERY IN PRODUCTION RUN A DISSERTATION SUBMITTED TO THE FACULTY OF THE DIVISION OF THE PHYSICAL SCIENCES IN CANDIDACY

More information

Applying Hardware Transactional Memory for Concurrency-Bug Failure Recovery in Production Runs

Applying Hardware Transactional Memory for Concurrency-Bug Failure Recovery in Production Runs Applying Hardare Transactional Memory for Concurrency-Bug Failure Recovery in Production Runs Yuxi Chen, Shu Wang, and Shan Lu, University of Chicago; Karthikeyan Sankaralingam, University of Wisconsin

More information

CFix. Automated Concurrency-Bug Fixing. Guoliang Jin, Wei Zhang, Dongdong Deng, Ben Liblit, and Shan Lu. University of Wisconsin Madison

CFix. Automated Concurrency-Bug Fixing. Guoliang Jin, Wei Zhang, Dongdong Deng, Ben Liblit, and Shan Lu. University of Wisconsin Madison CFix Automated Concurrency-Bug Fixing Guoliang Jin, Wei Zhang, Dongdong Deng, Ben Liblit, and Shan Lu. University of Wisconsin Madison 1 Bugs Need to be Fixed Buggy software is an unfortunate fact; There

More information

Diagnosing Production-Run Concurrency-Bug Failures. Shan Lu University of Wisconsin, Madison

Diagnosing Production-Run Concurrency-Bug Failures. Shan Lu University of Wisconsin, Madison Diagnosing Production-Run Concurrency-Bug Failures Shan Lu University of Wisconsin, Madison 1 Outline Myself and my group Production-run failure diagnosis What is this problem What are our solutions CCI

More information

Understanding and Genera-ng High Quality Patches for Concurrency Bugs. Haopeng Liu, Yuxi Chen and Shan Lu

Understanding and Genera-ng High Quality Patches for Concurrency Bugs. Haopeng Liu, Yuxi Chen and Shan Lu 1 Understanding and Genera-ng High Quality Patches for Concurrency Bugs Haopeng Liu, Yuxi Chen and Shan Lu 2 What are concurrency bugs Synchroniza-on mistakes in mul--threaded programs 3 What are concurrency

More information

Leveraging the Short-Term Memory of Hardware to Diagnose Production-Run Software Failures. Joy Arulraj, Guoliang Jin and Shan Lu

Leveraging the Short-Term Memory of Hardware to Diagnose Production-Run Software Failures. Joy Arulraj, Guoliang Jin and Shan Lu Leveraging the Short-Term Memory of Hardware to Diagnose Production-Run Software Failures Joy Arulraj, Guoliang Jin and Shan Lu Production-Run Failure Diagnosis Goal Figure out root cause of failure on

More information

Fixing, preventing, and recovering from concurrency bugs

Fixing, preventing, and recovering from concurrency bugs SCIENCE CHINA Information Sciences. REVIEW. Special Focus on High-Confidence Software Technologies May 2015, Vol. 58 052105:1 052105:18 doi: 10.1007/s11432-015-5315-9 Fixing, preventing, and recovering

More information

Transaction Memory for Existing Programs Michael M. Swift Haris Volos, Andres Tack, Shan Lu, Adam Welc * University of Wisconsin-Madison, *Intel

Transaction Memory for Existing Programs Michael M. Swift Haris Volos, Andres Tack, Shan Lu, Adam Welc * University of Wisconsin-Madison, *Intel Transaction Memory for Existing Programs Michael M. Swift Haris Volos, Andres Tack, Shan Lu, Adam Welc * University of Wisconsin-Madison, *Intel Where do TM programs ome from?! Parallel benchmarks replacing

More information

Enhancing Real-Time Behaviour of Parallel Applications using Intel TSX

Enhancing Real-Time Behaviour of Parallel Applications using Intel TSX Enhancing Real-Time Behaviour of Parallel Applications using Intel TSX Florian Haas, Stefan Metzlaff, Sebastian Weis, and Theo Ungerer Department of Computer Science, University of Augsburg, Germany January

More information

Thread-Level Speculation on Off-the-Shelf Hardware Transactional Memory

Thread-Level Speculation on Off-the-Shelf Hardware Transactional Memory Thread-Level Speculation on Off-the-Shelf Hardware Transactional Memory Rei Odaira Takuya Nakaike IBM Research Tokyo Thread-Level Speculation (TLS) [Franklin et al., 92] or Speculative Multithreading (SpMT)

More information

DMP Deterministic Shared Memory Multiprocessing

DMP Deterministic Shared Memory Multiprocessing DMP Deterministic Shared Memory Multiprocessing University of Washington Joe Devietti, Brandon Lucia, Luis Ceze, Mark Oskin A multithreaded voting machine 2 thread 0 thread 1 while (more_votes) { load

More information

Transactional Memory. Concurrency unlocked Programming. Bingsheng Wang TM Operating Systems

Transactional Memory. Concurrency unlocked Programming. Bingsheng Wang TM Operating Systems Concurrency unlocked Programming Bingsheng Wang TM Operating Systems 1 Outline Background Motivation Database Transaction Transactional Memory History Transactional Memory Example Mechanisms Software Transactional

More information

VMM Emulation of Intel Hardware Transactional Memory

VMM Emulation of Intel Hardware Transactional Memory VMM Emulation of Intel Hardware Transactional Memory Maciej Swiech, Kyle Hale, Peter Dinda Northwestern University V3VEE Project www.v3vee.org Hobbes Project 1 What will we talk about? We added the capability

More information

COMP3151/9151 Foundations of Concurrency Lecture 8

COMP3151/9151 Foundations of Concurrency Lecture 8 1 COMP3151/9151 Foundations of Concurrency Lecture 8 Transactional Memory Liam O Connor CSE, UNSW (and data61) 8 Sept 2017 2 The Problem with Locks Problem Write a procedure to transfer money from one

More information

Transactional Memory. How to do multiple things at once. Benjamin Engel Transactional Memory 1 / 28

Transactional Memory. How to do multiple things at once. Benjamin Engel Transactional Memory 1 / 28 Transactional Memory or How to do multiple things at once Benjamin Engel Transactional Memory 1 / 28 Transactional Memory: Architectural Support for Lock-Free Data Structures M. Herlihy, J. Eliot, and

More information

Production-Run Software Failure Diagnosis via Hardware Performance Counters. Joy Arulraj, Po-Chun Chang, Guoliang Jin and Shan Lu

Production-Run Software Failure Diagnosis via Hardware Performance Counters. Joy Arulraj, Po-Chun Chang, Guoliang Jin and Shan Lu Production-Run Software Failure Diagnosis via Hardware Performance Counters Joy Arulraj, Po-Chun Chang, Guoliang Jin and Shan Lu Motivation Software inevitably fails on production machines These failures

More information

Do you have to reproduce the bug on the first replay attempt?

Do you have to reproduce the bug on the first replay attempt? Do you have to reproduce the bug on the first replay attempt? PRES: Probabilistic Replay with Execution Sketching on Multiprocessors Soyeon Park, Yuanyuan Zhou University of California, San Diego Weiwei

More information

Eliminating Global Interpreter Locks in Ruby through Hardware Transactional Memory

Eliminating Global Interpreter Locks in Ruby through Hardware Transactional Memory Eliminating Global Interpreter Locks in Ruby through Hardware Transactional Memory Rei Odaira, Jose G. Castanos and Hisanobu Tomari IBM Research and University of Tokyo April 8, 2014 Rei Odaira, Jose G.

More information

Causes of Software Failures

Causes of Software Failures Causes of Software Failures Hardware Faults Permanent faults, e.g., wear-and-tear component Transient faults, e.g., bit flips due to radiation Software Faults (Bugs) (40% failures) Nondeterministic bugs,

More information

Work Report: Lessons learned on RTM

Work Report: Lessons learned on RTM Work Report: Lessons learned on RTM Sylvain Genevès IPADS September 5, 2013 Sylvain Genevès Transactionnal Memory in commodity hardware 1 / 25 Topic Context Intel launches Restricted Transactional Memory

More information

Blurred Persistence in Transactional Persistent Memory

Blurred Persistence in Transactional Persistent Memory Blurred Persistence in Transactional Persistent Memory Youyou Lu, Jiwu Shu, Long Sun Tsinghua University Overview Problem: high performance overhead in ensuring storage consistency of persistent memory

More information

) Intel)(TX)memory):) Transac'onal) Synchroniza'on) Extensions)(TSX))) Transac'ons)

) Intel)(TX)memory):) Transac'onal) Synchroniza'on) Extensions)(TSX))) Transac'ons) ) Intel)(TX)memory):) Transac'onal) Synchroniza'on) Extensions)(TSX))) Transac'ons) Goal A Distributed Transaction We want a transaction that involves multiple nodes Review of transactions and their properties

More information

File Systems: Consistency Issues

File Systems: Consistency Issues File Systems: Consistency Issues File systems maintain many data structures Free list/bit vector Directories File headers and inode structures res Data blocks File Systems: Consistency Issues All data

More information

Massimiliano Ghilardi

Massimiliano Ghilardi 7 th European Lisp Symposium Massimiliano Ghilardi May 5-6, 2014 IRCAM, Paris, France High performance concurrency in Common Lisp hybrid transactional memory with STMX 2 Beautiful and fast concurrency

More information

) Intel)(TX)memory):) Transac'onal) Synchroniza'on) Extensions)(TSX))) Transac'ons)

) Intel)(TX)memory):) Transac'onal) Synchroniza'on) Extensions)(TSX))) Transac'ons) ) Intel)(TX)memory):) Transac'onal) Synchroniza'on) Extensions)(TSX))) Transac'ons) Goal A Distributed Transaction We want a transaction that involves multiple nodes Review of transactions and their properties

More information

DBT Tool. DBT Framework

DBT Tool. DBT Framework Thread-Safe Dynamic Binary Translation using Transactional Memory JaeWoong Chung,, Michael Dalton, Hari Kannan, Christos Kozyrakis Computer Systems Laboratory Stanford University http://csl.stanford.edu

More information

) Intel)(TX)memory):) Transac'onal) Synchroniza'on) Extensions)(TSX))) Transac'ons)

) Intel)(TX)memory):) Transac'onal) Synchroniza'on) Extensions)(TSX))) Transac'ons) ) Intel)(TX)memory):) Transac'onal) Synchroniza'on) Extensions)(TSX))) Transac'ons) Transactions - Definition A transaction is a sequence of data operations with the following properties: * A Atomic All

More information

TERN: Stable Deterministic Multithreading through Schedule Memoization

TERN: Stable Deterministic Multithreading through Schedule Memoization TERN: Stable Deterministic Multithreading through Schedule Memoization Heming Cui, Jingyue Wu, Chia-che Tsai, Junfeng Yang Columbia University Appeared in OSDI 10 Nondeterministic Execution One input many

More information

DoubleChecker: Efficient Sound and Precise Atomicity Checking

DoubleChecker: Efficient Sound and Precise Atomicity Checking DoubleChecker: Efficient Sound and Precise Atomicity Checking Swarnendu Biswas, Jipeng Huang, Aritra Sengupta, and Michael D. Bond The Ohio State University PLDI 2014 Impact of Concurrency Bugs Impact

More information

Lecture 20: Transactional Memory. Parallel Computer Architecture and Programming CMU , Spring 2013

Lecture 20: Transactional Memory. Parallel Computer Architecture and Programming CMU , Spring 2013 Lecture 20: Transactional Memory Parallel Computer Architecture and Programming Slide credit Many of the slides in today s talk are borrowed from Professor Christos Kozyrakis (Stanford University) Raising

More information

Development of Technique for Healing Data Races based on Software Transactional Memory

Development of Technique for Healing Data Races based on Software Transactional Memory , pp.482-487 http://dx.doi.org/10.14257/astl.2016.139.96 Development of Technique for Healing Data Races based on Software Transactional Memory Eu-Teum Choi 1,, Kun Su Yoon 2, Ok-Kyoon Ha 3, Yong-Kee Jun

More information

Statistical Debugging for Real-World Performance Problems

Statistical Debugging for Real-World Performance Problems Statistical Debugging for Real-World Performance Problems Linhai Song 1 and Shan Lu 2 1 University of Wisconsin-Madison 2 University of Chicago What are Performance Problems? Definition of Performance

More information

T-SGX: Eradicating Controlled-Channel

T-SGX: Eradicating Controlled-Channel T-SGX: Eradicating Controlled-Channel Attacks Against Enclave Programs Ming-Wei Shih Sangho Lee Taesoo Kim Marcus Peinado Georgia Institute of Technology Microsoft Research 2 3 Intel SGX aims to secure

More information

HAFT Hardware-Assisted Fault Tolerance

HAFT Hardware-Assisted Fault Tolerance HAFT Hardware-Assisted Fault Tolerance Dmitrii Kuvaiskii Rasha Faqeh Pramod Bhatotia Christof Fetzer Technische Universität Dresden Pascal Felber Université de Neuchâtel Hardware Errors in the Wild Online

More information

Automated Concurrency-Bug Fixing

Automated Concurrency-Bug Fixing Automated Concurrency-Bug Fixing Guoliang Jin Wei Zhang Dongdong Deng Ben Liblit Shan Lu University of Wisconsin Madison {aliang,wzh,dongdong,liblit,shanlu@cs.wisc.edu Abstract Concurrency bugs are widespread

More information

OPERATING SYSTEM TRANSACTIONS

OPERATING SYSTEM TRANSACTIONS OPERATING SYSTEM TRANSACTIONS Donald E. Porter, Owen S. Hofmann, Christopher J. Rossbach, Alexander Benn, and Emmett Witchel The University of Texas at Austin OS APIs don t handle concurrency 2 OS is weak

More information

Fall 2012 Parallel Computer Architecture Lecture 16: Speculation II. Prof. Onur Mutlu Carnegie Mellon University 10/12/2012

Fall 2012 Parallel Computer Architecture Lecture 16: Speculation II. Prof. Onur Mutlu Carnegie Mellon University 10/12/2012 18-742 Fall 2012 Parallel Computer Architecture Lecture 16: Speculation II Prof. Onur Mutlu Carnegie Mellon University 10/12/2012 Past Due: Review Assignments Was Due: Tuesday, October 9, 11:59pm. Sohi

More information

TxFS: Leveraging File-System Crash Consistency to Provide ACID Transactions

TxFS: Leveraging File-System Crash Consistency to Provide ACID Transactions TxFS: Leveraging File-System Crash Consistency to Provide ACID Transactions Yige Hu, Zhiting Zhu, Ian Neal, Youngjin Kwon, Tianyu Chen, Vijay Chidambaram, Emmett Witchel The University of Texas at Austin

More information

Transactional Memory. Lecture 19: Parallel Computer Architecture and Programming CMU /15-618, Spring 2015

Transactional Memory. Lecture 19: Parallel Computer Architecture and Programming CMU /15-618, Spring 2015 Lecture 19: Transactional Memory Parallel Computer Architecture and Programming CMU 15-418/15-618, Spring 2015 Credit: many of the slides in today s talk are borrowed from Professor Christos Kozyrakis

More information

Deterministic Shared Memory Multiprocessing

Deterministic Shared Memory Multiprocessing Deterministic Shared Memory Multiprocessing Luis Ceze, University of Washington joint work with Owen Anderson, Tom Bergan, Joe Devietti, Brandon Lucia, Karin Strauss, Dan Grossman, Mark Oskin. Safe MultiProcessing

More information

Hybrid Static-Dynamic Analysis for Statically Bounded Region Serializability

Hybrid Static-Dynamic Analysis for Statically Bounded Region Serializability Hybrid Static-Dynamic Analysis for Statically Bounded Region Serializability Aritra Sengupta, Swarnendu Biswas, Minjia Zhang, Michael D. Bond and Milind Kulkarni ASPLOS 2015, ISTANBUL, TURKEY Programming

More information

Production-Run Software Failure Diagnosis via Hardware Performance Counters

Production-Run Software Failure Diagnosis via Hardware Performance Counters Production-Run Software Failure Diagnosis via Hardware Performance Counters Joy Arulraj Po-Chun Chang Guoliang Jin Shan Lu University of Wisconsin Madison {joy,pchang9,aliang,shanlu}@cs.wisc.edu Abstract

More information

Transactional Memory

Transactional Memory Transactional Memory Architectural Support for Practical Parallel Programming The TCC Research Group Computer Systems Lab Stanford University http://tcc.stanford.edu TCC Overview - January 2007 The Era

More information

Invyswell: A HyTM for Haswell RTM. Irina Calciu, Justin Gottschlich, Tatiana Shpeisman, Gilles Pokam, Maurice Herlihy

Invyswell: A HyTM for Haswell RTM. Irina Calciu, Justin Gottschlich, Tatiana Shpeisman, Gilles Pokam, Maurice Herlihy Invyswell: A HyTM for Haswell RTM Irina Calciu, Justin Gottschlich, Tatiana Shpeisman, Gilles Pokam, Maurice Herlihy Multicore Performance Scaling u Problem: Locking u Solution: HTM? u IBM BG/Q, zec12,

More information

Hardware Support for NVM Programming

Hardware Support for NVM Programming Hardware Support for NVM Programming 1 Outline Ordering Transactions Write endurance 2 Volatile Memory Ordering Write-back caching Improves performance Reorders writes to DRAM STORE A STORE B CPU CPU B

More information

Haopeng Liu, Xu Wang *, Guangpu Li, Shan Lu, Feng Ye, and Chen Tian.

Haopeng Liu, Xu Wang *, Guangpu Li, Shan Lu, Feng Ye, and Chen Tian. Haopeng Liu, Xu Wang *, Guangpu Li, Shan Lu, Feng Ye, and Chen Tian http://fcatch.cs.uchicago.edu/ * 1 Component failure: node crashes and message drops 2 #. Events 3 1000 900 800 700 600 500 400 300 200

More information

Potential violations of Serializability: Example 1

Potential violations of Serializability: Example 1 CSCE 6610:Advanced Computer Architecture Review New Amdahl s law A possible idea for a term project Explore my idea about changing frequency based on serial fraction to maintain fixed energy or keep same

More information

Performance Improvement via Always-Abort HTM

Performance Improvement via Always-Abort HTM 1 Performance Improvement via Always-Abort HTM Joseph Izraelevitz* Lingxiang Xiang Michael L. Scott* *Department of Computer Science University of Rochester {jhi1,scott}@cs.rochester.edu Parallel Computing

More information

Hardware Transactional Memory on Haswell

Hardware Transactional Memory on Haswell Hardware Transactional Memory on Haswell Viktor Leis Technische Universität München 1 / 15 Introduction transactional memory is a very elegant programming model transaction { transaction { a = a 10; c

More information

T ransaction Management 4/23/2018 1

T ransaction Management 4/23/2018 1 T ransaction Management 4/23/2018 1 Air-line Reservation 10 available seats vs 15 travel agents. How do you design a robust and fair reservation system? Do not enough resources Fair policy to every body

More information

Synchronization via Transactions

Synchronization via Transactions Synchronization via Transactions 1 Concurrency Quiz If two threads execute this program concurrently, how many different final values of X are there? Initially, X == 0. Thread 1 Thread 2 void increment()

More information

HTM in the wild. Konrad Lai June 2015

HTM in the wild. Konrad Lai June 2015 HTM in the wild Konrad Lai June 2015 Industrial Considerations for HTM Provide a clear benefit to customers Improve performance & scalability Ease programmability going forward Improve something common

More information

Transactional Memory. Companion slides for The Art of Multiprocessor Programming by Maurice Herlihy & Nir Shavit

Transactional Memory. Companion slides for The Art of Multiprocessor Programming by Maurice Herlihy & Nir Shavit Transactional Memory Companion slides for The by Maurice Herlihy & Nir Shavit Our Vision for the Future In this course, we covered. Best practices New and clever ideas And common-sense observations. 2

More information

) Intel)(TX)memory):) Transac'onal) Synchroniza'on) Extensions)(TSX))) Transac'ons)

) Intel)(TX)memory):) Transac'onal) Synchroniza'on) Extensions)(TSX))) Transac'ons) ) Intel)(TX)memory):) Transac'onal) Synchroniza'on) Extensions)(TSX))) Transac'ons) Transactions - Definition A transaction is a sequence of data operations with the following properties: * A Atomic All

More information

Fault Tolerance. Distributed Systems IT332

Fault Tolerance. Distributed Systems IT332 Fault Tolerance Distributed Systems IT332 2 Outline Introduction to fault tolerance Reliable Client Server Communication Distributed commit Failure recovery 3 Failures, Due to What? A system is said to

More information

ARIES (& Logging) April 2-4, 2018

ARIES (& Logging) April 2-4, 2018 ARIES (& Logging) April 2-4, 2018 1 What does it mean for a transaction to be committed? 2 If commit returns successfully, the transaction is recorded completely (atomicity) left the database in a stable

More information

Transactional Memory. Lecture 18: Parallel Computer Architecture and Programming CMU /15-618, Spring 2017

Transactional Memory. Lecture 18: Parallel Computer Architecture and Programming CMU /15-618, Spring 2017 Lecture 18: Transactional Memory Parallel Computer Architecture and Programming CMU 15-418/15-618, Spring 2017 Credit: many slides in today s talk are borrowed from Professor Christos Kozyrakis (Stanford

More information

Today: Fault Tolerance. Reliable One-One Communication

Today: Fault Tolerance. Reliable One-One Communication Today: Fault Tolerance Reliable communication Distributed commit Two phase commit Three phase commit Failure recovery Checkpointing Message logging Lecture 17, page 1 Reliable One-One Communication Issues

More information

Deterministic Replay and Data Race Detection for Multithreaded Programs

Deterministic Replay and Data Race Detection for Multithreaded Programs Deterministic Replay and Data Race Detection for Multithreaded Programs Dongyoon Lee Computer Science Department - 1 - The Shift to Multicore Systems 100+ cores Desktop/Server 8+ cores Smartphones 2+ cores

More information

Databases: transaction processing

Databases: transaction processing Databases: transaction processing P.A.Rounce Room 6.18 p.rounce@cs.ucl.ac.uk 1 ACID Database operation is processing of a set of transactions Required features of a database transaction should be Atomicity

More information

Lecture X: Transactions

Lecture X: Transactions Lecture X: Transactions CMPT 401 Summer 2007 Dr. Alexandra Fedorova Transactions A transaction is a collection of actions logically belonging together To the outside world, a transaction must appear as

More information

Lecture 6: Lazy Transactional Memory. Topics: TM semantics and implementation details of lazy TM

Lecture 6: Lazy Transactional Memory. Topics: TM semantics and implementation details of lazy TM Lecture 6: Lazy Transactional Memory Topics: TM semantics and implementation details of lazy TM 1 Transactions Access to shared variables is encapsulated within transactions the system gives the illusion

More information

Scheduling Transactions in Replicated Distributed Transactional Memory

Scheduling Transactions in Replicated Distributed Transactional Memory Scheduling Transactions in Replicated Distributed Transactional Memory Junwhan Kim and Binoy Ravindran Virginia Tech USA {junwhan,binoy}@vt.edu CCGrid 2013 Concurrency control on chip multiprocessors significantly

More information

A Concurrent Skip List Implementation with RTM and HLE

A Concurrent Skip List Implementation with RTM and HLE A Concurrent Skip List Implementation with RTM and HLE Fan Gao May 14, 2014 1 Background Semester Performed: Spring, 2014 Instructor: Maurice Herlihy The main idea of my project is to implement a skip

More information

Performance Improvement via Always-Abort HTM

Performance Improvement via Always-Abort HTM 1 Performance Improvement via Always-Abort HTM Joseph Izraelevitz* Lingxiang Xiang Michael L. Scott* *Department of Computer Science University of Rochester {jhi1,scott}@cs.rochester.edu Parallel Computing

More information

EECS 482 Introduction to Operating Systems

EECS 482 Introduction to Operating Systems EECS 482 Introduction to Operating Systems Winter 2018 Harsha V. Madhyastha Multiple updates and reliability Data must survive crashes and power outages Assume: update of one block atomic and durable Challenge:

More information

Atom-Aid: Detecting and Surviving Atomicity Violations

Atom-Aid: Detecting and Surviving Atomicity Violations Atom-Aid: Detecting and Surviving Atomicity Violations Abstract Writing shared-memory parallel programs is an error-prone process. Atomicity violations are especially challenging concurrency errors. They

More information

System Malfunctions. Implementing Atomicity and Durability. Failures: Crash. Failures: Abort. Log. Failures: Media

System Malfunctions. Implementing Atomicity and Durability. Failures: Crash. Failures: Abort. Log. Failures: Media System Malfunctions Implementing Atomicity and Durability Chapter 22 Transaction processing systems have to maintain correctness in spite of malfunctions Crash Abort Media Failure 1 2 Failures: Crash Processor

More information

Explicitly Parallel Programming with Shared Memory is Insane: At Least Make it Deterministic!

Explicitly Parallel Programming with Shared Memory is Insane: At Least Make it Deterministic! Explicitly Parallel Programming with Shared Memory is Insane: At Least Make it Deterministic! Joe Devietti, Brandon Lucia, Luis Ceze and Mark Oskin University of Washington Parallel Programming is Hard

More information

Transactional Memory. Prof. Hsien-Hsin S. Lee School of Electrical and Computer Engineering Georgia Tech

Transactional Memory. Prof. Hsien-Hsin S. Lee School of Electrical and Computer Engineering Georgia Tech Transactional Memory Prof. Hsien-Hsin S. Lee School of Electrical and Computer Engineering Georgia Tech (Adapted from Stanford TCC group and MIT SuperTech Group) Motivation Uniprocessor Systems Frequency

More information

Intel Transactional Synchronization Extensions (Intel TSX) Linux update. Andi Kleen Intel OTC. Linux Plumbers Sep 2013

Intel Transactional Synchronization Extensions (Intel TSX) Linux update. Andi Kleen Intel OTC. Linux Plumbers Sep 2013 Intel Transactional Synchronization Extensions (Intel TSX) Linux update Andi Kleen Intel OTC Linux Plumbers Sep 2013 Elision Elision : the act or an instance of omitting something : omission On blocking

More information

Lock Elision and Transactional Memory Predictor in Hardware. William Galliher, Liang Zhang, Kai Zhao. University of Wisconsin Madison

Lock Elision and Transactional Memory Predictor in Hardware. William Galliher, Liang Zhang, Kai Zhao. University of Wisconsin Madison Lock Elision and Transactional Memory Predictor in Hardware William Galliher, Liang Zhang, Kai Zhao University of Wisconsin Madison Email: {galliher, lzhang432, kzhao32}@wisc.edu ABSTRACT Shared data structure

More information

Mutex Locking versus Hardware Transactional Memory: An Experimental Evaluation

Mutex Locking versus Hardware Transactional Memory: An Experimental Evaluation Mutex Locking versus Hardware Transactional Memory: An Experimental Evaluation Thesis Defense Master of Science Sean Moore Advisor: Binoy Ravindran Systems Software Research Group Virginia Tech Multiprocessing

More information

Topics. File Buffer Cache for Performance. What to Cache? COS 318: Operating Systems. File Performance and Reliability

Topics. File Buffer Cache for Performance. What to Cache? COS 318: Operating Systems. File Performance and Reliability Topics COS 318: Operating Systems File Performance and Reliability File buffer cache Disk failure and recovery tools Consistent updates Transactions and logging 2 File Buffer Cache for Performance What

More information

Failure-atomic Synchronization-free Regions

Failure-atomic Synchronization-free Regions Failure-atomic Synchronization-free Regions Vaibhav Gogte, Stephan Diestelhorst $, William Wang $, Satish Narayanasamy, Peter M. Chen, Thomas F. Wenisch NVMW 2018, San Diego, CA 03/13/2018 $ Promise of

More information

ABORTING CONFLICTING TRANSACTIONS IN AN STM

ABORTING CONFLICTING TRANSACTIONS IN AN STM Committing ABORTING CONFLICTING TRANSACTIONS IN AN STM PPOPP 09 2/17/2009 Hany Ramadan, Indrajit Roy, Emmett Witchel University of Texas at Austin Maurice Herlihy Brown University TM AND ITS DISCONTENTS

More information

Understanding the Interleaving Space Overlap across Inputs and So7ware Versions

Understanding the Interleaving Space Overlap across Inputs and So7ware Versions Understanding the Interleaving Space Overlap across Inputs and So7ware Versions Dongdong Deng, Wei Zhang, Borui Wang, Peisen Zhao, Shan Lu University of Wisconsin, Madison 1 Concurrency bug detec3on is

More information

Optimistic Shared Memory Dependence Tracing

Optimistic Shared Memory Dependence Tracing Optimistic Shared Memory Dependence Tracing Yanyan Jiang1, Du Li2, Chang Xu1, Xiaoxing Ma1 and Jian Lu1 Nanjing University 2 Carnegie Mellon University 1 powered by Understanding Non-determinism Concurrent

More information

Monitors; Software Transactional Memory

Monitors; Software Transactional Memory Monitors; Software Transactional Memory Parallel and Distributed Computing Department of Computer Science and Engineering (DEI) Instituto Superior Técnico October 18, 2012 CPD (DEI / IST) Parallel and

More information

Caching and reliability

Caching and reliability Caching and reliability Block cache Vs. Latency ~10 ns 1~ ms Access unit Byte (word) Sector Capacity Gigabytes Terabytes Price Expensive Cheap Caching disk contents in RAM Hit ratio h : probability of

More information

CSE 530A ACID. Washington University Fall 2013

CSE 530A ACID. Washington University Fall 2013 CSE 530A ACID Washington University Fall 2013 Concurrency Enterprise-scale DBMSs are designed to host multiple databases and handle multiple concurrent connections Transactions are designed to enable Data

More information

From Crash Consistency to Transactions. Yige Hu Youngjin Kwon Vijay Chidambaram Emmett Witchel

From Crash Consistency to Transactions. Yige Hu Youngjin Kwon Vijay Chidambaram Emmett Witchel From Crash Consistency to Transactions Yige Hu Youngjin Kwon Vijay Chidambaram Emmett Witchel Persistent data is structured; crash consistency hard Structured data abstractions built on file system SQLite,

More information

TRANSACTION PROPERTIES

TRANSACTION PROPERTIES Transaction Is any action that reads from and/or writes to a database. A transaction may consist of a simple SELECT statement to generate a list of table contents; it may consist of series of INSERT statements

More information

Distributed Systems COMP 212. Revision 2 Othon Michail

Distributed Systems COMP 212. Revision 2 Othon Michail Distributed Systems COMP 212 Revision 2 Othon Michail Synchronisation 2/55 How would Lamport s algorithm synchronise the clocks in the following scenario? 3/55 How would Lamport s algorithm synchronise

More information

Lecture 12 Transactional Memory

Lecture 12 Transactional Memory CSCI-UA.0480-010 Special Topics: Multicore Programming Lecture 12 Transactional Memory Christopher Mitchell, Ph.D. cmitchell@cs.nyu.edu http://z80.me Database Background Databases have successfully exploited

More information

Managing Resource Limitation of Best-Effort HTM

Managing Resource Limitation of Best-Effort HTM Managing Resource Limitation of Best-Effort HTM Mohamed Mohamedin, Roberto Palmieri, Ahmed Hassan, Binoy Ravindran Abstract The first release of hardware transactional memory (HTM) as commodity processor

More information

High-Level Small-Step Operational Semantics for Software Transactions

High-Level Small-Step Operational Semantics for Software Transactions High-Level Small-Step Operational Semantics for Software Transactions Katherine F. Moore Dan Grossman The University of Washington Motivating Our Approach Operational Semantics Model key programming-language

More information

Atomic Transac1ons. Atomic Transactions. Q1: What if network fails before deposit? Q2: What if sequence is interrupted by another sequence?

Atomic Transac1ons. Atomic Transactions. Q1: What if network fails before deposit? Q2: What if sequence is interrupted by another sequence? CPSC-4/6: Operang Systems Atomic Transactions The Transaction Model / Primitives Serializability Implementation Serialization Graphs 2-Phase Locking Optimistic Concurrency Control Transactional Memory

More information

Summary: Open Questions:

Summary: Open Questions: Summary: The paper proposes an new parallelization technique, which provides dynamic runtime parallelization of loops from binary single-thread programs with minimal architectural change. The realization

More information

Weak Levels of Consistency

Weak Levels of Consistency Weak Levels of Consistency - Some applications are willing to live with weak levels of consistency, allowing schedules that are not serialisable E.g. a read-only transaction that wants to get an approximate

More information

Operating Systems Should Provide Transactions

Operating Systems Should Provide Transactions Operating Systems Should Provide Transactions Donald E. Porter, Indrajit Roy, Andrew Matsuoka, Emmett Witchel Department of Computer Sciences, The University of Texas at Austin, Austin, TX 78712 {porterde,indrajit,matsuoka,witchel}@cs.utexas.edu

More information

Failure Sketching: A Technique for Automated Root Cause Diagnosis of In-Production Failures

Failure Sketching: A Technique for Automated Root Cause Diagnosis of In-Production Failures Failure Sketching: A Technique for Automated Root Cause Diagnosis of In-Production Failures Baris Kasikci, Benjamin Schubert, Cristiano Pereira, Gilles Pokam, George Candea Debugging In-Production Software

More information

bool Account::withdraw(int val) { atomic { if(balance > val) { balance = balance val; return true; } else return false; } }

bool Account::withdraw(int val) { atomic { if(balance > val) { balance = balance val; return true; } else return false; } } Transac'onal Memory Acknowledgement: Slides in part adopted from: 1. a talk on Intel TSX from Intel Developer's Forum in 2012 2. the companion slides for the book "The Art of Mul'processor Programming"

More information

A Causality-Based Runtime Check for (Rollback) Atomicity

A Causality-Based Runtime Check for (Rollback) Atomicity A Causality-Based Runtime Check for (Rollback) Atomicity Serdar Tasiran Koc University Istanbul, Turkey Tayfun Elmas Koc University Istanbul, Turkey RV 2007 March 13, 2007 Outline This paper: Define rollback

More information

LogTM: Log-Based Transactional Memory

LogTM: Log-Based Transactional Memory LogTM: Log-Based Transactional Memory Kevin E. Moore, Jayaram Bobba, Michelle J. Moravan, Mark D. Hill, & David A. Wood 12th International Symposium on High Performance Computer Architecture () 26 Mulitfacet

More information

Lecture 7: Transactional Memory Intro. Topics: introduction to transactional memory, lazy implementation

Lecture 7: Transactional Memory Intro. Topics: introduction to transactional memory, lazy implementation Lecture 7: Transactional Memory Intro Topics: introduction to transactional memory, lazy implementation 1 Transactions New paradigm to simplify programming instead of lock-unlock, use transaction begin-end

More information

Module 15: Managing Transactions and Locks

Module 15: Managing Transactions and Locks Module 15: Managing Transactions and Locks Overview Introduction to Transactions and Locks Managing Transactions SQL Server Locking Managing Locks Introduction to Transactions and Locks Transactions Ensure

More information

Slides by Y. Nir-Buchbinder, adapted by O. Agmon Ben-Yehuda 1/30

Slides by Y. Nir-Buchbinder, adapted by O. Agmon Ben-Yehuda 1/30 Application of Synchronization Coverage Arkady Bron, Eitan Farchi, Yonit Magid, Yarden Nir-Buchbinder, Shmuel Ur PPoPP 2005 Presented in the spring 2011 Seminar on Advanced Topics in Concurrent Programming

More information

Performance Evaluation of Intel Transactional Synchronization Extensions for High-Performance Computing

Performance Evaluation of Intel Transactional Synchronization Extensions for High-Performance Computing Performance Evaluation of Intel Transactional Synchronization Extensions for High-Performance Computing Richard Yoo, Christopher Hughes: Intel Labs Konrad Lai, Ravi Rajwar: Intel Architecture Group Agenda

More information

Surviving Software Failures

Surviving Software Failures Surviving Software Failures A survey on the research context of "Rx: Treating Bugs as Allergies A Safe Method to Survive Software Failures" by F. Qin, J. Tucek, J. Sundaresan, and Y. Zhou. Johannes Pletzer,

More information