Hany E. Ramadan and Emmett Witchel University of Texas at Austin TRANSACT 2/15/2009 The Xfork in the Road to Coordinated Sibling Transactions.

Slides:



Advertisements
Similar presentations
Copyright 2008 Sun Microsystems, Inc Better Expressiveness for HTM using Split Hardware Transactions Yossi Lev Brown University & Sun Microsystems Laboratories.
Advertisements

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.
MINJAE HWANG THAWAN KOOBURAT CS758 CLASS PROJECT FALL 2009 Extending Task-based Programming Model beyond Shared-memory Systems.
Enabling Speculative Parallelization via Merge Semantics in STMs Kaushik Ravichandran Santosh Pande College.
Monitoring Data Structures Using Hardware Transactional Memory Shakeel Butt 1, Vinod Ganapathy 1, Arati Baliga 2 and Mihai Christodorescu 3 1 Rutgers University,
Hardware Transactional Memory for GPU Architectures Wilson W. L. Fung Inderpeet Singh Andrew Brownsword Tor M. Aamodt University of British Columbia In.
Transactions (Chapter ). What is it? Transaction - a logical unit of database processing Motivation - want consistent change of state in data Transactions.
1 CS216 Advanced Database Systems Shivnath Babu Notes 11: Concurrency Control.
Using DSVM to Implement a Distributed File System Ramon Lawrence Dept. of Computer Science
Thread-Level Transactional Memory Decoupling Interface and Implementation UW Computer Architecture Affiliates Conference Kevin Moore October 21, 2004.
Transactional Memory (TM) Evan Jolley EE 6633 December 7, 2012.
PARALLEL PROGRAMMING with TRANSACTIONAL MEMORY Pratibha Kona.
ECE 526 – Network Processing Systems Design Software-based Protocol Processing Chapter 7: D. E. Comer.
Lock vs. Lock-Free memory Fahad Alduraibi, Aws Ahmad, and Eman Elrifaei.
University of Michigan Electrical Engineering and Computer Science 1 Parallelizing Sequential Applications on Commodity Hardware Using a Low-Cost Software.
Distributed DBMSPage © 1998 M. Tamer Özsu & Patrick Valduriez Outline Introduction Background Distributed DBMS Architecture Distributed Database.
1 Lecture 7: Transactional Memory Intro Topics: introduction to transactional memory, “lazy” implementation.
Supporting Nested Transactional Memory in LogTM Authors Michelle J Moravan Mark Hill Jayaram Bobba Ben Liblit Kevin Moore Michael Swift Luke Yen David.
Based on Silberschatz, Galvin and Gagne  2009 Threads Definition and motivation Multithreading Models Threading Issues Examples.
Christopher J. Rossbach, Owen S. Hofmann, Donald E. Porter, Hany E. Ramadan, Aditya Bhandari, and Emmett Witchel - Presentation By Sathish P.
Department of Computer Science Presenters Dennis Gove Matthew Marzilli The ATOMO ∑ Transactional Programming Language.
1 More on Distributed Coordination. 2 Who’s in charge? Let’s have an Election. Many algorithms require a coordinator. What happens when the coordinator.
XCalls: Safe I/O in Memory Transactions Haris Volos, Andres Jaan Tack, Neelam Goyal +, Michael Swift, Adam Welc § University of Wisconsin - Madison + §
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.
A Transaction-Friendly Dynamic Memory Manager for Embedded Multicore Systems Maurice Herlihy Joint with Thomas Carle, Dimitra Papagiannopoulou Iris Bahar,
Accelerating SQL Database Operations on a GPU with CUDA Peter Bakkum & Kevin Skadron The University of Virginia GPGPU-3 Presentation March 14, 2010.
COLLABORATIVE EXECUTION ENVIRONMENT FOR HETEROGENEOUS PARALLEL SYSTEMS Aleksandar Ili´c, Leonel Sousa 2010 IEEE International Symposium on Parallel & Distributed.
CS162 Section Lecture 10 Slides based from Lecture and
STRATEGIC NAMING: MULTI-THREADED ALGORITHM (Ch 27, Cormen et al.) Parallelization Four types of computing: –Instruction (single, multiple) per clock cycle.
Programming Paradigms for Concurrency Part 2: Transactional Memories Vasu Singh
The Linux Kernel: A Challenging Workload for Transactional Memory Hany E. Ramadan Christopher J. Rossbach Emmett Witchel Operating Systems & Architecture.
1 Parallelizing FPGA Placement with TMSteffan Parallelizing FPGA Placement with Transactional Memory Steven Birk*, Greg Steffan**, and Jason Anderson**
OpenMP – Introduction* *UHEM yaz çalıştayı notlarından derlenmiştir. (uhem.itu.edu.tr)
1 Wenguang WangRichard B. Bunt Department of Computer Science University of Saskatchewan November 14, 2000 Simulating DB2 Buffer Pool Management.
Condition Variables and Transactional Memory: Problem or Opportunity? Polina Dudnik and Michael Swift University of Wisconsin, Madison.
Distributed Transaction & Long-running transactions Rossen Zhivkov Freelance SharePoint Consultant January 19 th, 2008 Sofia, Bulgaria Krasimir Parushev.
Low-Overhead Software Transactional Memory with Progress Guarantees and Strong Semantics Minjia Zhang, 1 Jipeng Huang, Man Cao, Michael D. Bond.
Source: Operating System Concepts by Silberschatz, Galvin and Gagne.
University of Washington What is parallel processing? Spring 2014 Wrap-up When can we execute things in parallel? Parallelism: Use extra resources to solve.
Memory Consistency Models. Outline Review of multi-threaded program execution on uniprocessor Need for memory consistency models Sequential consistency.
Department of Computer Science MapReduce for the Cell B. E. Architecture Marc de Kruijf University of Wisconsin−Madison Advised by Professor Sankaralingam.
MULTIPLEX: UNIFYING CONVENTIONAL AND SPECULATIVE THREAD-LEVEL PARALLELISM ON A CHIP MULTIPROCESSOR Presented by: Ashok Venkatesan Chong-Liang Ooi, Seon.
Solving Difficult HTM Problems Without Difficult Hardware Owen Hofmann, Donald Porter, Hany Ramadan, Christopher Rossbach, and Emmett Witchel University.
Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9 th Edition Chapter 4: Threads.
4 November 2005 CS 838 Presentation 1 Nested Transactional Memory: Model and Preliminary Sketches J. Eliot B. Moss and Antony L. Hosking Presented by:
A BORTING C ONFLICTING T RANSACTIONS IN AN STM PP O PP’09 2/17/2009 Hany Ramadan, Indrajit Roy, Emmett Witchel University of Texas at Austin Maurice Herlihy.
Novel Paradigms of Parallel Programming Prof. Smruti R. Sarangi IIT Delhi.
December 1, 2006©2006 Craig Zilles1 Threads & Atomic Operations in Hardware  Previously, we introduced multi-core parallelism & cache coherence —Today.
6. Application Server Issues for the Project
Chapter 4: Threads Modified by Dr. Neerja Mhaskar for CS 3SH3.
Lecture 20: Consistency Models, TM
(Nested) Open Memory Transactions in Haskell
Atomic Operations in Hardware
Operating System (013022) Dr. H. Iwidat
Atomic Operations in Hardware
Isotope: Transactional Isolation for Block Storage
Chapter 4: Threads.
Changing thread semantics
Lecture 6: Transactions
Christopher J. Rossbach, Owen S. Hofmann, Donald E. Porter, Hany E
Outline Introduction Background Distributed DBMS Architecture
EE 4xx: Computer Architecture and Performance Programming
Chapter 4: Threads & Concurrency
Chapter 4: Threads.
Why Threads Are A Bad Idea (for most purposes)
UNIVERSITAS GUNADARMA
Why Threads Are A Bad Idea (for most purposes)
Why Threads Are A Bad Idea (for most purposes)
CSE 542: Operating Systems
Presentation transcript:

Hany E. Ramadan and Emmett Witchel University of Texas at Austin TRANSACT 2/15/2009 The Xfork in the Road to Coordinated Sibling Transactions

TM solving the wrong problem ? 2 Finding parallelism is the key challenge of the multi-core era Transactional memory makes creating critical regions easier Transactional memory can also make.. finding parallelism easier... but not with current model/API ! “Numerous types of processing are not well-served by [the flat transaction model’s simplicity] “ - Gray & Reuter 2

How will TM find threads ? 3 Approach Intratransaction parallelism Benefits Improve performance of individual transactions & utilize cores Methodology Revisit transaction model, API Advice “Intratransaction parallelism requires genuine support for nested transactions.” – Gray & Reuter

Nested Transactions 4 Two types Closed Nesting (commits into parent) Open Nesting (commits into world) Serial closed nesting Simpler semantics (than open) Small or no performance gain Parallel closed nesting Defined semantics for siblings How much performance gain ? Begin Tx (parent) // work a Begin Tx (nested) // work b End Tx (nested) End Tx (parent)

Forms of intra-transaction parallelism 5 Independent Dependent Speculative atomic Foo { } 5 atomic Foo { }

Programmer’s mental picture 6 Foo OR FooBottomFooTop ANDXOR 6 # of leafs = maximum amount of intratransaction parallelism atomic Foo { }

7 OR (independent) Independent siblings No short circuit AND (dependent) All siblings must commit or none do XOR (speculative) Exactly one is allowed to commit Once one sibling commits, all others made to abort More forms conceivable Coordination forms

Coordinated Sibling Model 8 Parallel closed nested transactions Safety and semantics of closed nesting Coordination forms express multiple paradigms fork/join distributed transactions speculative execution Sibling code returns Success/Fail Commit/retry / abort decision made based on form, and status of siblings 8 XOR SSF CMT ABT

xfork: API 9 xfork API shields programmer from the dirty work Threading, coordination, aborting, speculation, etc. bool xfork (xforkForm, numForks, xforkProc, optionalData); enum xforkForm { AND, OR, XOR }; delegate xforkResult xforkProc (forkNum, optionalData); enum xforkResult { Success, Failure }; 9

xfork: Example 10 using (TransactionScope ts = new TransactionScope()) { sstm.txStore.write (myAddr, “hello”); sstm.xfork( xforkForm.XOR, // form 2, // numForks new Delegate (parallelSearchProc), // xfProc myList); // data ts.Complete(); } xforkResult parallelSearchProc(int forkNum, object myList) { if (forkNum == 0) { FwdTraverse(myList) } else { ReverseTraverse(myList) } return xforkResult.Success; }

Sibling STM (SSTM): Architecture 11 System.Transactions provides database-derived framework DB terminology: TM: Transaction Manager (executes 2 phase commit protocol) RM: Resource Manager (holds transactional data / votes in 2pc) ‘Enlisting’: when RM first meets TM. Sibling Executive (SibEx) (RM) Implements xfork semantics TxStore (RM) Conventional STM

SSTM: SibEx Schedule work for each fork on some thread Use existing thread-pool 2. Create sibling nested transactions 3. Invoking user-procedure for each fork 4. Enforce semantics of each sibling form May involve finding transaction outcome (OR-form), or enlisting and voting on outcome (AND/XOR-form) 5. Stalling the parent appropriately 12

SSTM: TxStore 13 Extends TL2 to support nesting Key change: per-object version-number (for write set) Additional synchronization to supported parallel access Extend System.Transactions to support nesting Thread-local transactional context extended with “parents” list Low-level API, based on System.Object/ICloneable object TxStore.Read(int address); void TxStore.Write(int address, object obj);

SSTM: Prototype 14 System configuration Intel Core2 Quad CPU running at 2.66 Ghz Microsoft.NET v2 Framework, MS Windows Vista SSTM: 2,345 lines of C# code Benchmarks (~600 loc) SearchList: Search linked list in parallel Transfer Debit/credit of bank accounts using two lists Compare SSTM to SSTM without xfork Measure speedup, from 1 to 4 forks 14

SearchList benchmark 15 Four-fork version also searches from middle of list

Transfer benchmark 16 Higher overhead due to AND-form coordination

Related Work 17 Nested Transactions Formalized by [Moss81], [Beeri83] Used in Argus[Liskov88], Camelot [Eppinger91] TM Nesting HTM [Moravan06, McDonald06] STM [Ni07, Harris07, Moss05] Parallelism Fortress[Allen07], XCilk[Agrawal08] Parallel for-loops, etc. in OpenTM[Baek07] Composition constructs (e.g. orElse) [Harris05] 17

Conclusion 18 Intratransaction parallelism Makes TM even more relevant to the challenges of multi-core Coordinated siblings Transaction model that suits this type of processing xfork Makes coordinated siblings easy to use Will intratransaction parallelism become a commodity ?