048961 - Advanced Topics in Computing Winter 2009: Reliable Distributed Systems Oved Itzhak

Slides:



Advertisements
Similar presentations
Transactional Memory Parag Dixit Bruno Vavala Computer Architecture Course, 2012.
Advertisements

Database Systems (資料庫系統)
Enabling Speculative Parallelization via Merge Semantics in STMs Kaushik Ravichandran Santosh Pande College.
Sathya Peri IIT Patna 1 Understanding the Requirements of STMs.
Transactional Locking Nir Shavit Tel Aviv University (Joint work with Dave Dice and Ori Shalev)
Virendra J. Marathe, William N. Scherer III, and Michael L. Scott Department of Computer Science University of Rochester Presented by: Armand R. Burks.
Software Transactional Memory Kevin Boos. Two Papers Software Transactional Memory for Dynamic-Sized Data Structures (DSTM) – Maurice Herlihy et al –
Software Transactional Memory Should Not Be Obstruction Free Robert Ennals Intel Research Cambridge 15 JJ Thomson Avenue, Cambridge, CB3 0FD, UK
McRT-Malloc: A Scalable Non-Blocking Transaction Aware Memory Allocator Ali Adl-Tabatabai Ben Hertzberg Rick Hudson Bratin Saha.
Toward High Performance Nonblocking Software Transactional Memory Virendra J. Marathe University of Rochester Mark Moir Sun Microsystems Labs.
Hybrid Transactional Memory Nir Shavit MIT and Tel-Aviv University Joint work with Alex Matveev (and describing the work of many in this summer school)
Transactional Memory (TM) Evan Jolley EE 6633 December 7, 2012.
TOWARDS A SOFTWARE TRANSACTIONAL MEMORY FOR GRAPHICS PROCESSORS Daniel Cederman, Philippas Tsigas and Muhammad Tayyab Chaudhry.
1 Lecture 21: Transactional Memory Topics: consistency model recap, introduction to transactional memory.
1 Johannes Schneider Transactional Memory: How to Perform Load Adaption in a Simple And Distributed Manner Johannes Schneider David Hasenfratz Roger Wattenhofer.
Distributed Systems 2006 Styles of Client/Server Computing.
Lock vs. Lock-Free memory Fahad Alduraibi, Aws Ahmad, and Eman Elrifaei.
1 Lecture 7: Transactional Memory Intro Topics: introduction to transactional memory, “lazy” implementation.
EPFL - March 7th, 2008 Interfacing Software Transactional Memory Simplicity vs. Flexibility Vincent Gramoli.
1 Lecture 23: Transactional Memory Topics: consistency model recap, introduction to transactional memory.
1 Concurrent and Distributed Systems Introduction 8 lectures on concurrency control in centralised systems - interaction of components in main memory -
CS510 Concurrent Systems Class 13 Software Transactional Memory Should Not be Obstruction-Free.
Scalable, Reliable, Power-Efficient Communication for Hardware Transactional Memory Seth Pugsley, Manu Awasthi, Niti Madan, Naveen Muralimanohar and Rajeev.
Language Support for Lightweight transactions Tim Harris & Keir Fraser Presented by Narayanan Sundaram 04/28/2008.
Software Transaction Memory for Dynamic-Sized Data Structures presented by: Mark Schall.
Adaptive Locks: Combining Transactions and Locks for efficient Concurrency Takayuki Usui et all.
Why The Grass May Not Be Greener On The Other Side: A Comparison of Locking vs. Transactional Memory Written by: Paul E. McKenney Jonathan Walpole Maged.
An Introduction to Software Transactional Memory
©2009 HP Confidential1 A Proposal to Incorporate Software Transactional Memory (STM) Support in the Open64 Compiler Dhruva R. Chakrabarti HP Labs, USA.
Software Transactional Memory for Dynamic-Sized Data Structures Maurice Herlihy, Victor Luchangco, Mark Moir, William Scherer Presented by: Gokul Soundararajan.
Sutirtha Sanyal (Barcelona Supercomputing Center, Barcelona) Accelerating Hardware Transactional Memory (HTM) with Dynamic Filtering of Privatized Data.
A Qualitative Survey of Modern Software Transactional Memory Systems Virendra J. Marathe Michael L. Scott.
Evaluating FERMI features for Data Mining Applications Masters Thesis Presentation Sinduja Muralidharan Advised by: Dr. Gagan Agrawal.
CS5204 – Operating Systems Transactional Memory Part 2: Software-Based Approaches.
WG5: Applications & Performance Evaluation Pascal Felber
Lowering the Overhead of Software Transactional Memory Virendra J. Marathe, Michael F. Spear, Christopher Heriot, Athul Acharya, David Eisenstat, William.
Aritra Sengupta, Swarnendu Biswas, Minjia Zhang, Michael D. Bond and Milind Kulkarni ASPLOS 2015, ISTANBUL, TURKEY Hybrid Static-Dynamic Analysis for Statically.
1 Lecture: Large Caches, Virtual Memory Topics: cache innovations (Sections 2.4, B.4, B.5)
Low-Overhead Software Transactional Memory with Progress Guarantees and Strong Semantics Minjia Zhang, 1 Jipeng Huang, Man Cao, Michael D. Bond.
Hybrid Transactional Memory Sanjeev Kumar, Michael Chu, Christopher Hughes, Partha Kundu, Anthony Nguyen, Intel Labs University of Michigan Intel Labs.
On the Performance of Window-Based Contention Managers for Transactional Memory Gokarna Sharma and Costas Busch Louisiana State University.
CS162 Week 5 Kyle Dewey. Overview Announcements Reactive Imperative Programming Parallelism Software transactional memory.
Transactions and Concurrency Control. Concurrent Accesses to an Object Multiple threads Atomic operations Thread communication Fairness.
CS510 Concurrent Systems Why the Grass May Not Be Greener on the Other Side: A Comparison of Locking and Transactional Memory.
Transactional Locking Nir Shavit Tel Aviv University Joint work with Dave Dice and Ori Shalev.
Chapter 20 Transaction Management Thomas Connolly, Carolyn Begg, Database System, A Practical Approach to Design Implementation and Management, 4 th Edition,
CS510 Concurrent Systems Jonathan Walpole. A Methodology for Implementing Highly Concurrent Data Objects.
Software Transactional Memory Should Not Be Obstruction-Free Robert Ennals Presented by Abdulai Sei.
© 2008 Multifacet ProjectUniversity of Wisconsin-Madison Pathological Interaction of Locks with Transactional Memory Haris Volos, Neelam Goyal, Michael.
How D can make concurrent programming a piece of cake Bartosz Milewski D Programming Language.
Hardware and Software transactional memory and usages in MRE
A Relativistic Enhancement to Software Transactional Memory Philip Howard, Jonathan Walpole.
AtomCaml: First-class Atomicity via Rollback Michael F. Ringenburg and Dan Grossman University of Washington International Conference on Functional Programming.
MULTIVIE W Slide 1 (of 21) Software Transactional Memory Should Not Be Obstruction Free Paper: Robert Ennals Presenter: Emerson Murphy-Hill.
10 1 Chapter 10_B Concurrency Control Database Systems: Design, Implementation, and Management, Rob and Coronel.
Transactional Memory Student Presentation: Stuart Montgomery CS5204 – Operating Systems 1.
Novel Paradigms of Parallel Programming Prof. Smruti R. Sarangi IIT Delhi.
Adaptive Software Lock Elision
Lecture 20: Consistency Models, TM
Minh, Trautmann, Chung, McDonald, Bronson, Casper, Kozyrakis, Olukotun
Part 2: Software-Based Approaches
Transaction Management
A Qualitative Survey of Modern Software Transactional Memory Systems
Lecture 22: Consistency Models, TM
Hybrid Transactional Memory
Introduction of Week 13 Return assignment 11-1 and 3-1-5
Software Transactional Memory Should Not be Obstruction-Free
Locking Protocols & Software Transactional Memory
Dynamic Performance Tuning of Word-Based Software Transactional Memory
Database Systems (資料庫系統)
Presentation transcript:

Advanced Topics in Computing Winter 2009: Reliable Distributed Systems Oved Itzhak

Agenda Ennals’ McRT-STM (Saha et al.’s) TL (Shavit & Dice) TL II (Shavit, Dice & Shalev)

Original Shavit & Touitou’s STM Wait/Lock/Obstruction-Free? Lock-Free

Ennals’ arguments for using locks STM will be used mostly for improving the performance of otherwise sequential programs In the programming paradigms that programmers are accustomed to, correctness does not depend on obstruction- freedom It’s OK for an atomic operation to wait for other atomic operations at the same or lower priority level The runtime sees that #Running-tasks == #Cores, thus making it unlikely for a transaction to be blocked by a switched-out transaction Using locks enables better performance than achieved with obstruction-freedom through Storing per-object metadata adjacent to the object or in processor private memory Keep #Active transactions <= #Cores – less conflicts.

Ennal’s design Encounter-order locking Deadlock and Livelock prevention through Transactions Prioritization a lower priority transaction cannot abort a higher one Use Version lock-word A bit denotes locked/unlocked; The rest contain (Read-) version when not locked and pointer (to transaction metadata) when locked. Use Write-Buffering as opposed to Undo-Logging Per-Object lock No redirection

Ennals’ locking STM

Ennals’ characteristics May observe inconsistent state Requires managed execution environment Otherwise may dereference invalid pointers Requires periodic Read-set validation May get into infinite loops Do not support explicit memory lifecycle management (i.e. malloc/free style) (?)

McRT-STM’s arguments for using Locks “Non-Blocking” property should be achieved through the scheduler There should be much less preemptions in a CMP world – acquired locks are released quickly Transaction aborts are reduced Simplified memory management can be done without a GC

McRT-STM’s design Encounter-order locking Deadlock detection through timeout Simple contention management with the help of McRT’s cooperative scheduler A transation aborts another only if the latter’s thread has yielded Use Read-versioning/Write-Locking Empirically, this is much faster that Reader/Writer-Lock Use Undo-logging Empirically, faster than write-buffering Support both object-based and cache-line-based conflict detection Support nested transactions

McRT-STM’s locking STM ValAddr …… …… …… State Depth Write locks log Read locks log Update log Log Object / OldVal Buffer Next Nesting Stack... … Transaction Log Object / Version

McRT-STM’s characteristics May observe inconsistent state Semi-Explicit memory lifecycle management Uses implementation-specific heap

TL locking STM design Locking STM Builds on Ennals’ and McRT-STM’s rationale Have different operation modes for performance comparison: Encounter- vs Commit-order locking Per-Object (1-1) vs Per-Stripe (1-many) Lock-to-object association Use Version lock-word locks Shown by Saha et al. to perform better than R/W-locks

NewOld Transaction TL STM VersionObject Read-set Write-set Object (value) Version lock-word Assoc. Object (value) Bloom Filter

TL STM characteristics May observe inconsistent state Explicit memory lifecycle management (i.e. malloc/free style) possible with Per-Stripe locks-to-objects association Quiescing to prevent an object from being accessed after it was recycled

TL II STM design Variation of TL: a different versioning scheme Main advantage: efficient detection of inconsistent memory-view No need for managed environment to catch broken invariants Helps with explicit memory management schemes

NewOld Transaction TL STM VersionObject Read-set Write-set Object (value) Version lock-word Assoc. Object (value) Bloom Filter

NewOld Transaction TL STM VersionObject Read-set Write-set Object (value) Version lock-word Assoc. Object (value) Bloom Filter Global Version Clock Version

Locking STMs comparison TL IITLMcRT-STMEnnals’ CMTBothENC ENC/CMT lock Both PO PS/PO Write ENC: Undo CMT: Write Undo Write-set/Undo √---Consistent view √ (only in PS) --Malloc/free

Some insights “… contrary to our initial intuition ( for the data structures we tested) it is the overhead of the STM implementations (measured, for example, by single thread performance cost) that is best correlated with overall performance…” Shavit & Dice (TL) “If we could implement fine-grained locking with the same simplicity of course grained, we would never think of building a transactional memory. “ Shavit, Dice & Shalev (TL II Presentation)

Bibliography Software Transactional Memory Should Not Be Obstruction Free Robert Ennals McRT-STM: A Hogh Performance Software Transactional Memory System for a Multi-Core Runtime Bratin Saha, Ali-Reza Adl-Tabatabai, Richard L. Hudson, Chi Cao Minh, Benjamin Hertzberg Understanding Tradeoffs in Software Transactional Memory Dave Dice, Nir Shavit Transactional Locking II Dave Dice, Ori Shalev, Nir Shavit

Backup

Contention Management Methods Aggressivealways abort Politebackoff before aborting Sensitive to preemption, page-faults etc. Randomized“flip a coin” for backoff Coin bias and backoff time are tunable Kindegartenprioritize according to a partial-order defined by Aborted > Aborted-By

Contention Management Methods Karmaprioritize according to amount of work done Variations: EruptionGive my priority to the conflicting transaction and backoff KillBlockedJust 2 priority levels TimestampFCFS QueueOnBlockbounded-wait

Contention Management Measurements Kidergarten is best in Counter and IntSet benchmarks, most of LFUCache and some of IntSetRelease. However, it’s worst with RBTree. Karma is best or among the best most other cases. In some benchmarks several managers provide best performance