Raphael Eidenbenz Roger Wattenhofer Roger Wattenhofer Good Programming in Transactional Memory Game Theory Meets Multicore Architecture.

Slides:



Advertisements
Similar presentations
1 Copyright © 2012 Oracle and/or its affiliates. All rights reserved. Convergence of HPC, Databases, and Analytics Tirthankar Lahiri Senior Director, Oracle.
Advertisements

Concurrency Issues Motivation, Problems, Directions Dennis Kafura - CS Operating Systems1.
Unit 9 Concurrency Control. 9-2 Wei-Pang Yang, Information Management, NDHU Content  9.1 Introduction  9.2 Locking Technique  9.3 Optimistic Concurrency.
Transaction Management: Concurrency Control CS634 Class 17, Apr 7, 2014 Slides based on “Database Management Systems” 3 rd ed, Ramakrishnan and Gehrke.
Enabling Speculative Parallelization via Merge Semantics in STMs Kaushik Ravichandran Santosh Pande College.
SE-292 High Performance Computing
Chapter 8-1 : Multiple Processor Systems Multiple Processor Systems Multiple Processor Systems Multiprocessor Hardware Multiprocessor Hardware UMA Multiprocessors.
Knapsack Problem: Greedy vs. Brute Force pp (Section 7.6)
Transactional Contention Management as a Non-Clairvoyant Scheduling Problem Alessia Milani [Attiya et al. PODC 06] [Attiya and Milani OPODIS 09]
Silberschatz, Galvin and Gagne  2002 Modified for CSCI 399, Royden, Operating System Concepts Operating Systems Lecture 19 Scheduling IV.
Thread-Level Transactional Memory Decoupling Interface and Implementation UW Computer Architecture Affiliates Conference Kevin Moore October 21, 2004.
Nested Parallelism in Transactional Memory Kunal Agrawal, Jeremy T. Fineman and Jim Sukha MIT.
Transactions are back But are they the same? R. Guerraoui, EPFL.
PARALLEL PROGRAMMING with TRANSACTIONAL MEMORY Pratibha Kona.
An Introduction To PARALLEL PROGRAMMING Ing. Andrea Marongiu
Presented by: Ofer Kiselov & Omer Kiselov Supervised by: Dmitri Perelman Final Presentation.
TOWARDS A SOFTWARE TRANSACTIONAL MEMORY FOR GRAPHICS PROCESSORS Daniel Cederman, Philippas Tsigas and Muhammad Tayyab Chaudhry.
Meanwhile RAM cost continues to drop Moore’s Law on total CPU processing power holds but in parallel processing… CPU clock rate stalled… Because.
Concurrency Control and Recovery In real life: users access the database concurrently, and systems crash. Concurrent access to the database also improves.
1 Johannes Schneider Transactional Memory: How to Perform Load Adaption in a Simple And Distributed Manner Johannes Schneider David Hasenfratz Roger Wattenhofer.
1 MetaTM/TxLinux: Transactional Memory For An Operating System Hany E. Ramadan, Christopher J. Rossbach, Donald E. Porter and Owen S. Hofmann Presenter:
EPFL - March 7th, 2008 Interfacing Software Transactional Memory Simplicity vs. Flexibility Vincent Gramoli.
CS 501: Software Engineering Fall 2000 Lecture 19 Performance of Computer Systems.
Selfishness in Transactional Memory Raphael Eidenbenz, Roger Wattenhofer Distributed Computing Group Game Theory meets Multicore Architecture.
1 Scalable Transactional Memory Scheduling Gokarna Sharma (A joint work with Costas Busch) Louisiana State University.
Software Transaction Memory for Dynamic-Sized Data Structures presented by: Mark Schall.
LogTM: Log-Based Transactional Memory Kevin E. Moore, Jayaram Bobba, Michelle J. Moravan, Mark D. Hill, & David A. Wood Presented by Colleen Lewis.
A Transaction-Friendly Dynamic Memory Manager for Embedded Multicore Systems Maurice Herlihy Joint with Thomas Carle, Dimitra Papagiannopoulou Iris Bahar,
A performance analysis of multicore computer architectures Michel Schelske.
Multi-Threading and Load Balancing Compiled by Paul TaylorCSE3AGR Stolen mainly from Orion Granatir
Multi Core Processor Submitted by: Lizolen Pradhan
Window-Based Greedy Contention Management for Transactional Memory Gokarna Sharma (LSU) Brett Estrade (Univ. of Houston) Costas Busch (LSU) 1DISC 2010.
Parallel and Distributed Systems Instructor: Xin Yuan Department of Computer Science Florida State University.
Lecture 1: Performance EEN 312: Processors: Hardware, Software, and Interfacing Department of Electrical and Computer Engineering Spring 2013, Dr. Rozier.
A Non-Monetary Protocol for P2P Content Distribution in Wireless Broadcast Networks with Network Coding I-Hong Hou, Yao Liu, and Alex Sprintson Dept. of.
[Tim Shattuck, 2006][1] Performance / Watt: The New Server Focus Improving Performance / Watt For Modern Processors Tim Shattuck April 19, 2006 From the.
Chapter 101 Multiprocessor and Real- Time Scheduling Chapter 10.
Evaluating FERMI features for Data Mining Applications Masters Thesis Presentation Sinduja Muralidharan Advised by: Dr. Gagan Agrawal.
Integrating and Optimizing Transactional Memory in a Data Mining Middleware Vignesh Ravi and Gagan Agrawal Department of ComputerScience and Engg. The.
TECHNIQUES FOR REDUCING CONSISTENCY- RELATED COMMUNICATION IN DISTRIBUTED SHARED-MEMORY SYSTEMS J. B. Carter University of Utah J. K. Bennett and W. Zwaenepoel.
Parallel Processing Sharing the load. Inside a Processor Chip in Package Circuits Primarily Crystalline Silicon 1 mm – 25 mm on a side 100 million to.
Randomized Parallel Proof-Number Search ACG 12, Pamplona, May 2009.
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.
Transactional Coherence and Consistency Presenters: Muhammad Mohsin Butt. (g ) Coe-502 paper presentation 2.
ETH Zurich – Distributed Computing Group Raphael Eidenbenz, PhD Thesis 1ETH Zurich – Distributed Computing Group PhD Thesis Raphael Eidenbenz Prof. Roger.
Copyright © Curt Hill Concurrent Execution An Overview for Database.
Parallel Computing Presented by Justin Reschke
4 November 2005 CS 838 Presentation 1 Nested Transactional Memory: Model and Preliminary Sketches J. Eliot B. Moss and Antony L. Hosking Presented by:
The Scalable Commutativity Rule: Designing Scalable Software for Multicore Processors Austin T. Clements, M. Frans Kaashoek, Nickolai Zeldovich, Robert.
Commutativity and Coarse-Grained Transactions Maurice Herlihy Brown University Joint work with Eric Koskinen and Matthew Parkinson (POPL 10)
Window-Based Greedy Contention Management for Transactional Memory Gokarna Sharma (LSU) Brett Estrade (Univ. of Houston) Costas Busch (LSU) DISC
Spark on Entropy : A Reliable & Efficient Scheduler for Low-latency Parallel Jobs in Heterogeneous Cloud Huankai Chen PhD Student at University of Kent.
Transactional Contention Management as a Non-Clairvoyant Scheduling Problem Hagit Attiya, Alessia Milani Technion, Haifa-LABRI, University of Bordeaux.
Adaptive Software Lock Elision
Sathya Ronak Alisha Zach Devin Josh
Part 2: Software-Based Approaches
Transactional Memory: How to Perform Load Adaption
Challenges in Concurrent Computing
Expander: Lock-free Cache for a Concurrent Data Structure
Transactions are back But are they the same? R. Guerraoui , EPFL
Christopher J. Rossbach, Owen S. Hofmann, Donald E. Porter, Hany E
Process scheduling Chapter 5.
Erlang Multicore support
Software Transactional Memory Should Not be Obstruction-Free
Performance Pathologies in Hardware Transactional Memory
Performance Pathologies in Hardware Transactional Memory
Concurrency in Smart Contracts
Dynamic Performance Tuning of Word-Based Software Transactional Memory
Tim Harris (MSR Cambridge)
Presentation transcript:

Raphael Eidenbenz Roger Wattenhofer Roger Wattenhofer Good Programming in Transactional Memory Game Theory Meets Multicore Architecture

Raphael Eidenbenz, ETH Zurich. ISAAC 2009 Moore‘s Law Clock speed flattening sharply Transistor count still rising Advent of multi-core processors!

Raphael Eidenbenz, ETH Zurich. ISAAC 2009 Multicore Architecture  Explicit locking Parallel threads Communication through shared memory Developer: Explicit locking of shared resources Mark critical sections System: Guarantee exclusive execution Transactional Memory

Raphael Eidenbenz, ETH Zurich. ISAAC 2009 Contention Management Which transaction shall I abort??

Raphael Eidenbenz, ETH Zurich. ISAAC 2009 Contention Managers  Timestamp Oldest transaction wins  Polite Exponential backoff  Karma Transaction with most locked resources wins Priority is carried over to next attempt when aborted  Polka Karma with exponential backoff  Randomized Pick a random winner priority based non-priority based

Raphael Eidenbenz, ETH Zurich. ISAAC 2009 Is it a Game?  Yes Players = programmers Strategy space = placing of transactions Their goal: fast execution Social goal: maximize system throughput „My thread is the fastest!“

Desired Behavior Raphael Eidenbenz, ETH Zurich. ISAAC 2009 incRingCounters(Node start){ var cur = start; transaction{ while(cur.next!=start){ cur.doSomething(); cur = cur.next; } }} incRingCountersGP(Node start){ var cur = start; while(cur.next!=start){ transaction{cur.doSomething();} cur = cur.next; }}  Transactions as short as possible! R1R1 R3R3 t R2R2 RsRs R1R1 R3R3 t R2R2 RsRs

Raphael Eidenbenz, ETH Zurich. ISAAC 2009 Simulation Setup  „Free-riding“ threads in DSTM2 Coarse transaction granularity ( ¸ 20 accesses per transaction)  Collaborative threads Granularity =1  16 threads on 16 cores do random updates on shared ordered list or red-black tree during 10 s. 1 or 8 free-riders High contention

Raphael Eidenbenz, ETH Zurich. ISAAC 2009 Simulation Results Karma Polka Timestamp throughput collaborators (updates/s) Randomized throughput collaborators (updates/s) throughput free-riders (updates/s)

Good Programming Incentives  A CM is GPI compatible iff it punishes unnecessary locking and rewards partitioning. Raphael Eidenbenz, ETH Zurich. ISAAC 2009

Priority Based CM  CM associates with each thread J i a priority ! i  Thread with highest priority wins conflicts  Rationale: „Don‘t discard the transaction who has done most“ Underlying assumption: Priority measures the amount of work done  E.g. Timestamp CM The oldest transaction has done the most work Raphael Eidenbenz, ETH Zurich. ISAAC 2009 Theorem: Polite, Greedy, Karma, Timestamp and Polka are not GPI compatible.

What is wrong? Raphael Eidenbenz, ETH Zurich. ISAAC 2009 R1R1 R3R3 t R2R2 RsRs R1R1 R3R3 t R2R2 RsRs

What is wrong? Raphael Eidenbenz, ETH Zurich. ISAAC 2009  Snatching up resources pushes priority R1R1 R3R3 t R2R2 RsRs R1R1 R3R3 t R2R2 RsRs

More Results Raphael Eidenbenz, ETH Zurich. ISAAC 2009 Theorem 3 : Any priority-accumulating CM M is not GPI compatible if one of the following holds: i.M increases a job’s priority on  -events. ii.M increases relative priority on  -events. iii.M schedules transactions gapless and increases priorities on  -events. iv.M restarts aborted transactions immediately and increases priorities on  -events Theorem 2 : Quasi priority accumulating CMs are not GPI compatible. Theorem 4 : Any priority-accumulating CM that is based only on time is GPI compatible.

TiTi T i1 T i2 Randomized CM  Not priority based „Choose random winner“  Proof Intuition Unnecessary Locks: Stupid because only risk conflict (no priority gain) Partitioning: Raphael Eidenbenz, ETH Zurich. ISAAC 2009 Lemma 3 : Randomized CM is GPI compatible. TiTi T i1 T i2

TiTi T i1 T i2 Randomized CM  Not priority based „Choose random winner“  Proof Intuition Unnecessary Locks: Stupid because only risk conflict (no priority gain) Partitioning: Raphael Eidenbenz, ETH Zurich. ISAAC 2009 Lemma 3 : Randomized CM is GPI compatible. TiTi T i2

Raphael Eidenbenz, ETH Zurich. ISAAC 2009 Conclusion & Open Problems  Further work: Relax GPI compatibility Trace effect in „real“ software Thank you!