Technology from seed Exploiting Off-the-Shelf Virtual Memory Mechanisms to Boost Software Transactional Memory Amin Mohtasham, Paulo Ferreira and João.

Slides:



Advertisements
Similar presentations
Enabling Speculative Parallelization via Merge Semantics in STMs Kaushik Ravichandran Santosh Pande College.
Advertisements

Monitoring Data Structures Using Hardware Transactional Memory Shakeel Butt 1, Vinod Ganapathy 1, Arati Baliga 2 and Mihai Christodorescu 3 1 Rutgers University,
5.1 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts with Java – 8 th Edition Chapter 5: CPU Scheduling.
Evaluating Database-Oriented Replication Schemes in Software Transacional Memory Systems Roberto Palmieri Francesco Quaglia (La Sapienza, University of.
Safety Definitions and Inherent Bounds of Transactional Memory Eshcar Hillel.
Inherent limitations on DAP TMs 1 Inherent Limitations on Disjoint-Access Parallel Transactional Memory Hagit Attiya, Eshcar Hillel, Alessia Milani Technion.
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)
Study of Hurricane and Tornado Operating Systems By Shubhanan Bakre.
Transactional Memory (TM) Evan Jolley EE 6633 December 7, 2012.
PARALLEL PROGRAMMING with TRANSACTIONAL MEMORY Pratibha Kona.
TOWARDS A SOFTWARE TRANSACTIONAL MEMORY FOR GRAPHICS PROCESSORS Daniel Cederman, Philippas Tsigas and Muhammad Tayyab Chaudhry.
DMITRI PERELMAN IDIT KEIDAR TRANSACT 2010 SMV: Selective Multi-Versioning STM 1.
Lock-free Cuckoo Hashing Nhan Nguyen & Philippas Tsigas ICDCS 2014 Distributed Computing and Systems Chalmers University of Technology Gothenburg, Sweden.
1 MetaTM/TxLinux: Transactional Memory For An Operating System Hany E. Ramadan, Christopher J. Rossbach, Donald E. Porter and Owen S. Hofmann Presenter:
Boost Write Performance for DBMS on Solid State Drive Yu LI.
University of Michigan Electrical Engineering and Computer Science 1 Parallelizing Sequential Applications on Commodity Hardware Using a Low-Cost Software.
Algorithmics for Software Transactional Memory Hagit Attiya Technion.
CMPT 300: Operating Systems Review THIS REIVEW SHOULD NOT BE USED AS PREDICTORS OF THE ACTUAL QUESTIONS APPEARING ON THE FINAL EXAM.
Language Support for Lightweight transactions Tim Harris & Keir Fraser Presented by Narayanan Sundaram 04/28/2008.
G Robert Grimm New York University Recoverable Virtual Memory.
The Cost of Privatization Hagit Attiya Eshcar Hillel Technion & EPFLTechnion.
Unbounded Transactional Memory Paper by Ananian et al. of MIT CSAIL Presented by Daniel.
11/10/2005Comp 120 Fall November 10 8 classes to go! questions to me –Topics you would like covered –Things you don’t understand –Suggestions.
/ PSWLAB Eraser: A Dynamic Data Race Detector for Multithreaded Programs By Stefan Savage et al 5 th Mar 2008 presented by Hong,Shin Eraser:
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.
Highly Available ACID Memory Vijayshankar Raman. Introduction §Why ACID memory? l non-database apps: want updates to critical data to be atomic and persistent.
An Introduction to Software Transactional Memory
1 Scalable and transparent parallelization of multiplayer games Bogdan Simion MASc thesis Department of Electrical and Computer Engineering.
Maximum Benefit from a Minimal HTM Owen Hofmann, Chris Rossbach, and Emmett Witchel The University of Texas at Austin.
CS 153 Design of Operating Systems Spring 2015 Lecture 17: Paging.
Reduced Hardware NOrec: A Safe and Scalable Hybrid Transactional Memory Alexander Matveev Nir Shavit MIT.
This project and the research leading to these results has received funding from the European Community's Seventh Framework Programme [FP7/ ] under.
Lowering the Overhead of Software Transactional Memory Virendra J. Marathe, Michael F. Spear, Christopher Heriot, Athul Acharya, David Eisenstat, William.
Supporting Multi-Processors Bernard Wong February 17, 2003.
Low-Overhead Software Transactional Memory with Progress Guarantees and Strong Semantics Minjia Zhang, 1 Jipeng Huang, Man Cao, Michael D. Bond.
On the Performance of Window-Based Contention Managers for Transactional Memory Gokarna Sharma and Costas Busch Louisiana State University.
Virtual Memory 1 1.
DOUBLE INSTANCE LOCKING A concurrency pattern with Lock-Free read operations Pedro Ramalhete Andreia Correia November 2013.
Wait-Free Multi-Word Compare- And-Swap using Greedy Helping and Grabbing Håkan Sundell PDPTA 2009.
Darko Makreshanski Department of Computer Science ETH Zurich
CS510 Concurrent Systems Why the Grass May Not Be Greener on the Other Side: A Comparison of Locking and Transactional Memory.
Operating Systems ECE344 Ashvin Goel ECE University of Toronto Demand Paging.
Software Transactional Memory Should Not Be Obstruction-Free Robert Ennals Presented by Abdulai Sei.
Full and Para Virtualization
© 2008 Multifacet ProjectUniversity of Wisconsin-Madison Pathological Interaction of Locks with Transactional Memory Haris Volos, Neelam Goyal, Michael.
Eraser: A dynamic Data Race Detector for Multithreaded Programs Stefan Savage, Michael Burrows, Greg Nelson, Patrick Sobalvarro, Thomas Anderson Presenter:
Read-Log-Update A Lightweight Synchronization Mechanism for Concurrent Programming Alexander Matveev (MIT) Nir Shavit (MIT and TAU) Pascal Felber (UNINE)
LECTURE 12 Virtual Memory. VIRTUAL MEMORY Just as a cache can provide fast, easy access to recently-used code and data, main memory acts as a “cache”
Architectural Features of Transactional Memory Designs for an Operating System Chris Rossbach, Hany Ramadan, Don Porter Advanced Computer Architecture.
Translation Lookaside Buffer
Mihai Burcea, J. Gregory Steffan, Cristiana Amza
Memory Hierarchy Ideal memory is fast, large, and inexpensive
Algorithmic Improvements for Fast Concurrent Cuckoo Hashing
Lecture 12 Virtual Memory.
Minh, Trautmann, Chung, McDonald, Bronson, Casper, Kozyrakis, Olukotun
PHyTM: Persistent Hybrid Transactional Memory
Faster Data Structures in Transactional Memory using Three Paths
Lecture 6: Transactions
Translation Lookaside Buffer
Hassium: Hardware Assisted Database Synchronization
Hybrid Transactional Memory
CS510 - Portland State University
CSE451 Virtual Memory Paging Autumn 2002
Deferred Runtime Pipelining for contentious multicore transactions
Lecture 8: Efficient Address Translation
Paging and Segmentation
Controlled Interleaving for Transactions
Tim Harris (MSR Cambridge)
Sarah Diesburg Operating Systems COP 4610
Virtual Memory 1 1.
Presentation transcript:

technology from seed Exploiting Off-the-Shelf Virtual Memory Mechanisms to Boost Software Transactional Memory Amin Mohtasham, Paulo Ferreira and João Barreto Exploiting Off-the-Shelf Virtual Memory Mechanisms to Boost Software Transactional Memory Amin Mohtasham

technology from seed Multicore revolution Chip-multiprocessors are mainstream hardware We must effectively program these systems Exploiting Off-the-Shelf Virtual Memory Mechanisms to Boost Software Transactional MemoryJanuary 22nd, 2014

technology from seed Lock-based methods Parallel Programming with traditional locks is difficult There is a trade-off between complexity and performance Exploiting Off-the-Shelf Virtual Memory Mechanisms to Boost Software Transactional MemoryJanuary 22nd, 2014

technology from seed Software Transactional Memory Exploiting Off-the-Shelf Virtual Memory Mechanisms to Boost Software Transactional Memory Amin Mohtasham Software Transactional Memory is: –Easy to use –Portable –Not limited by hardware capacity

technology from seed The dark side of STM STM has more sequential overhead than HTM How can we alleviate this overhead? Exploiting Off-the-Shelf Virtual Memory Mechanisms to Boost Software Transactional Memory Amin Mohtasham

technology from seed A typical STM read operation Amin Mohtasham Exploiting Off-the-Shelf Virtual Memory Mechanisms to Boost Software Transactional Memory Physical Memory Thread#1 X=10 readTx(X) read(X) if isConsistent() then here comes the overhead

technology from seed Our objective Most transactional workloads are Read-Dominated Most of the read operations are consistent –Validation is a waste of work for consistent reads Exploiting Off-the-Shelf Virtual Memory Mechanisms to Boost Software Transactional Memory Amin Mohtasham Can we actually read directly from memory and avoid the validation?

technology from seed A naïve approach: Direct read operations Amin Mohtasham Exploiting Off-the-Shelf Virtual Memory Mechanisms to Boost Software Transactional Memory Physical Memory Thread#1 X=10 read(X) Thread#2 write(X) read(X) TX1 TX2 TX3 Is there any safe way to read directly from memory? Inconsistent X=99

technology from seed An interrupt by hardware! Exploiting Off-the-Shelf Virtual Memory Mechanisms to Boost Software Transactional Memory Process Virtual Memory MMU is a common component of commodity hardware By relying on the page-level mechanisms in MMU, we can prevent threads from accessing a memory page Amin Mohtasham

technology from seed A more sophisticated approach: Using page protection bits Page Table Physical Memory Exploiting Off-the-Shelf Virtual Memory Mechanisms to Boost Software Transactional Memory Amin Mohtasham PageBaseAddress ReadWrite 0x2FF Thread#2 Thread#1 write(X) read(X) TX1 TX2 00 read(X) blocked 0x2FF8000 X=10 X=99 For a given page, how can we give different permissions to different threads?

technology from seed Mapped memory By using memory map functions, we can define different virtual memory regions with different protection levels Amin Mohtasham Exploiting Off-the-Shelf Virtual Memory Mechanisms to Boost Software Transactional Memory Page Table Physical Memory PageBaseAddress ReadWrite 0x2FF Thread#1Thread#2 read(X) X=10 [Abadi et al., ACM PPOPP’09]

technology from seed Proof of concept: PGSTM At most, one writer transaction at each time –Using a single global lock Multiple read-only transactions can at each time Read-only transactions can execute in parallel, as long as they do not read from pages being written Exploiting Off-the-Shelf Virtual Memory Mechanisms to Boost Software Transactional Memory Amin Mohtasham

technology from seed PGSTM’s Memory Model Amin Mohtasham Exploiting Off-the-Shelf Virtual Memory Mechanisms to Boost Software Transactional Memory Page TablePhysical Memory Shared Data Read-only region Read/Write region Two different virtual memory regions pointed at same physical memory pages Read-only Region contains either read-only or inaccessible pages In Read/Write region all pages are accessible and updatable

technology from seed PGSTM in action Amin Mohtasham Exploiting Off-the-Shelf Virtual Memory Mechanisms to Boost Software Transactional Memory Page Table Physical Memory PageBaseAddress ReadWrite 0x2FF X=10 Thread#2 Thread#1 write(X) read(X) TX1 TX2 read(X) 0x2FF blocked X=99

technology from seed When to unlock a page? Can we unlock the page when the writer commits? –It is not safe if there are other active read-only transactions running Unlock only after such active transactions complete Amin Mohtasham Exploiting Off-the-Shelf Virtual Memory Mechanisms to Boost Software Transactional Memory

technology from seed Evaluation environment List look-up benchmark Read-only transactions search for a random element Read/Write transactions modify a random element We compare our results with TML [ Dalessandro et al.,Europar’10 ] Exploiting Off-the-Shelf Virtual Memory Mechanisms to Boost Software Transactional Memory Amin Mohtasham

technology from seed TML: Transactional Mutex Locks At most, one writer transaction at each time –Using a single global lock Read-only transactions can not run in parallel with the writer transaction With the lowest sequential overhead Amin Mohtasham Exploiting Off-the-Shelf Virtual Memory Mechanisms to Boost Software Transactional Memory

technology from seed Evaluation: Different contentions Exploiting Off-the-Shelf Virtual Memory Mechanisms to Boost Software Transactional Memory Throughput for different contention levels [64 threads, 10% write-load] Amin Mohtasham Less contention

technology from seed Evaluation: Scalability Exploiting Off-the-Shelf Virtual Memory Mechanisms to Boost Software Transactional Memory Throughput for different number of concurrent threads [2MB List, 10% write-load] Amin Mohtasham

technology from seed Evaluation: Different write loads Exploiting Off-the-Shelf Virtual Memory Mechanisms to Boost Software Transactional Memory Throughput for different write loads [2MB List, 64 threads] Amin Mohtasham

technology from seed Conclusion Using MMU with STMs can lower their sequential overhead We proposed PGTSM as proof of concept PGSTM outperforms TML in low contention scenarios Our preliminary results are promising Exploiting Off-the-Shelf Virtual Memory Mechanisms to Boost Software Transactional Memory Amin Mohtasham

technology from seed Future works Evaluating with non-trivial benchmarks Supporting multiple writers Using finer grained conflict detection Upgrading to a generic accelerator layer that runs on top of any STM Exploiting Off-the-Shelf Virtual Memory Mechanisms to Boost Software Transactional Memory Amin Mohtasham

technology from seed Exploiting Off-the-Shelf Virtual Memory Mechanisms to Boost Software Transactional Memory Thank you! Amin Mohtasham