SUPPORTING LOCK-FREE COMPOSITION OF CONCURRENT DATA OBJECTS Daniel Cederman and Philippas Tsigas.

Slides:



Advertisements
Similar presentations
Fast and Lock-Free Concurrent Priority Queues for Multi-Thread Systems Håkan Sundell Philippas Tsigas.
Advertisements

CS 603 Process Synchronization: The Colored Ticket Algorithm February 13, 2002.
Wait-Free Queues with Multiple Enqueuers and Dequeuers
On Dynamic Load Balancing on Graphics Processors Daniel Cederman and Philippas Tsigas Chalmers University of Technology.
Concurrency: Deadlock and Starvation Chapter 6. Deadlock Permanent blocking of a set of processes that either compete for system resources or communicate.
1 Chapter 4 Synchronization Algorithms and Concurrent Programming Gadi Taubenfeld © 2014 Synchronization Algorithms and Concurrent Programming Synchronization.
Chapter 6: Process Synchronization
Scalable and Lock-Free Concurrent Dictionaries
Wait-Free Reference Counting and Memory Management Håkan Sundell, Ph.D.
Parallel Programming in Distributed Systems Or Distributed Systems in Parallel Programming Philippas Tsigas Chalmers University of Technology Computer.
Scalable Synchronous Queues By William N. Scherer III, Doug Lea, and Michael L. Scott Presented by Ran Isenberg.
Parallel Processing (CS526) Spring 2012(Week 6).  A parallel algorithm is a group of partitioned tasks that work with each other to solve a large problem.
Locality-Conscious Lock-Free Linked Lists Anastasia Braginsky & Erez Petrank 1.
Concurrent Data Structures in Architectures with Limited Shared Memory Support Ivan Walulya Yiannis Nikolakopoulos Marina Papatriantafilou Philippas Tsigas.
Progress Guarantee for Parallel Programs via Bounded Lock-Freedom Erez Petrank – Technion Madanlal Musuvathi- Microsoft Bjarne Steensgaard - Microsoft.
TOWARDS A SOFTWARE TRANSACTIONAL MEMORY FOR GRAPHICS PROCESSORS Daniel Cederman, Philippas Tsigas and Muhammad Tayyab Chaudhry.
Lock-free Cuckoo Hashing Nhan Nguyen & Philippas Tsigas ICDCS 2014 Distributed Computing and Systems Chalmers University of Technology Gothenburg, Sweden.
Introduction to Lock-free Data-structures and algorithms Micah J Best May 14/09.
10/31/20111 Relativistic Red-Black Trees Philip Howard 10/31/2011
Computer Laboratory Practical non-blocking data structures Tim Harris Computer Laboratory.
CS510 Advanced OS Seminar Class 10 A Methodology for Implementing Highly Concurrent Data Objects by Maurice Herlihy.
Concurrency CS 510: Programming Languages David Walker.
CS510 Concurrent Systems Class 2 A Lock-Free Multiprocessor OS Kernel.
Company LOGO Lock-free and Wait-free Slot Scheduling Algorithms Pooja Aggarwal Smruti R. Sarangi Computer Science, IIT Delhi, India 1.
Copyright © 2010, Oracle and/or its affiliates. All rights reserved. Who’s Afraid of a Big Bad Lock Nir Shavit Sun Labs at Oracle Joint work with Danny.
1 Lock-Free Linked Lists Using Compare-and-Swap by John Valois Speaker’s Name: Talk Title: Larry Bush.
Practical and Lock-Free Doubly Linked Lists Håkan Sundell Philippas Tsigas.
Compositional Verification of Termination-Preserving Refinement of Concurrent Programs Hongjin Liang Univ. of Science and Technology of China (USTC) Joint.
CS510 Concurrent Systems Introduction to Concurrency.
Parallel Programming Philippas Tsigas Chalmers University of Technology Computer Science and Engineering Department © Philippas Tsigas.
Simple Wait-Free Snapshots for Real-Time Systems with Sporadic Tasks Håkan Sundell Philippas Tsigas.
CS510 Concurrent Systems Jonathan Walpole. A Lock-Free Multiprocessor OS Kernel.
Understanding Performance of Concurrent Data Structures on Graphics Processors Daniel Cederman, Bapi Chatterjee, Philippas Tsigas Distributed Computing.
Håkan Sundell, Chalmers University of Technology 1 NOBLE: A Non-Blocking Inter-Process Communication Library Håkan Sundell Philippas.
November 15, 2007 A Java Implementation of a Lock- Free Concurrent Priority Queue Bart Verzijlenberg.
A Consistency Framework for Iteration Operations in Concurrent Data Structures Yiannis Nikolakopoulos A. Gidenstam M. Papatriantafilou P. Tsigas Distributed.
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.
Challenges in Non-Blocking Synchronization Håkan Sundell, Ph.D. Guest seminar at Department of Computer Science, University of Tromsö, Norway, 8 Dec 2005.
Non-blocking Data Structures for High- Performance Computing Håkan Sundell, PhD.
Maged M.Michael Michael L.Scott Department of Computer Science Univeristy of Rochester Presented by: Jun Miao.
11/18/20151 Operating Systems Design (CS 423) Elsa L Gunter 2112 SC, UIUC Based on slides by Roy Campbell, Sam.
A Methodology for Creating Fast Wait-Free Data Structures Alex Koganand Erez Petrank Computer Science Technion, Israel.
Executing Parallel Programs with Potential Bottlenecks Efficiently Yoshihiro Oyama Kenjiro Taura Akinori Yonezawa {oyama, tau,
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.
Practical concurrent algorithms Mihai Letia Concurrent Algorithms 2012 Distributed Programming Laboratory Slides by Aleksandar Dragojevic.
Hazard Pointers: Safe Memory Reclamation for Lock-Free Objects Maged M. Michael Presented by Abdulai Sei.
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.
Techniques and Structures in Concurrent Programming Wilfredo Velazquez.
November 27, 2007 Verification of a Concurrent Priority Queue Bart Verzijlenberg.
1 1 Nastaran Shafiei VERIFICATION OF A NON-BLOCKING ARRAY-BASED QUEUE ALGORITHM.
An algorithm of Lock-free extensible hash table Yi Feng.
CS510 Concurrent Systems Tyler Fetters. A Methodology for Implementing Highly Concurrent Data Objects.
Scalable lock-free Stack Algorithm Wael Yehia York University February 8, 2010.
1 Critical Section Problem CIS 450 Winter 2003 Professor Jinhua Guo.
Concurrency 2 CS 2110 – Spring 2016.
Håkan Sundell Philippas Tsigas
Multicore Programming Final Review
Faster Data Structures in Transactional Memory using Three Paths
Challenges in Concurrent Computing
A Lock-Free Algorithm for Concurrent Bags
Expander: Lock-free Cache for a Concurrent Data Structure
Practical Non-blocking Unordered Lists
Anders Gidenstam Håkan Sundell Philippas Tsigas
Concurrent Data Structures Concurrent Algorithms 2017
Yiannis Nikolakopoulos
Multicore programming
Software Transactional Memory Should Not be Obstruction-Free
A Concurrent Lock-Free Priority Queue for Multi-Thread Systems
Presentation transcript:

SUPPORTING LOCK-FREE COMPOSITION OF CONCURRENT DATA OBJECTS Daniel Cederman and Philippas Tsigas

Overview SUPPORTING OF CONCURRENT DATA OBJECTS COMPOSITION LOCK-FREE

Concurrent Data Objects Data structures shared between processes and other … Trees Skiplists Queues Hashtables For example …

Synchronization  Synchronization is required for concurrency  Mutual exclusion  Locks limits concurrency  Busy waiting – repeated checks to see if lock has been released or not  Convoying – processes stack up before locks  A better approach is to use data structures that are …

Overview CONCURRENT DATA OBJECTS COMPOSITION LOCK-FREE

Lock-free  Lock-freedom is a progress guarantee  In practice it means that  A fast process doesn’t have to wait for a slow or dead process  Can’t be designed with blocking parts  No deadlocks  Shown to scale better than blocking approaches Definition For all possible executions, at least one concurrent operation will succeed in a finite number of its own steps Definition For all possible executions, at least one concurrent operation will succeed in a finite number of its own steps

Libraries using Lock-free Data Objects  Java Concurrency Package  Threading Building Blocks by Intel .NET Parallel Extensions  NOBLE Non-Blocking Library  …

Overview CONCURRENT DATA OBJECTS COMPOSITION LOCK-FREE

Composition F F C C D D C C A A B B C C F F C C D D A A B B C C DequeueInsert Dequeue Insert Queue Tree Queue Tree ?

Lock-free Libraries  Java Concurrency Package  Intel Threading Building Blocks  Parallel Extensions for.NET  NOBLE  …

Challenge  Providing efficiency and correctness while dealing with  Specialized designs  Few common algorithmic components  Complex proofs of correctness  We target a large class of concurrent data objects

Concurrent Data Objects Have operations for insertion and removal of elements Can be composed to form move operations Can be composed to form move operations Trees Skiplists Queues Hashtables and other …

Contributions  We provide a framework that consists of three parts  Properties used to identify compatible objects  Steps needed to adapt object  Algorithmic design of operation for performing lock-free moves between adapted objects

Characterization 1.Have operations equivalent to insert and remove 2.These operations are linearizable 3.… 4.…

Linearizability Operation A Operation C Operation B Operation D Linearizable if for any concurrent history there exists a correct sequential history where … A happens before B, if A finished before B started A happens before B, if A finished before B started Either C happens before D or D happens before C, if C and D are concurrent Either C happens before D or D happens before C, if C and D are concurrent

Linearization Points Operation A Operation C Operation B Operation D Linearization point

Linearization Points Operation A Operation C Operation B Operation D

Characterization 1.Have operations equivalent to insert and remove 2.These operations are linearizable 3.… 4.…

Insert Element into B Remove Element from A Composition

Remove - prolog Insert - prolog Remove - epilog Insert - epilog

Composition Remove - prolog Insert - prolog Remove - epilog Insert - epilog Element to remove must be accessible here!

Characterization 1.Have operations equivalent to insert and remove 2.These operations are linearizable 3.The element to remove is accessible before the linearization point 4.…

Composition Remove - prolog Insert - prolog Remove - epilog Insert - epilog Linearization point is often a successful compare-and-swap

Composition Remove - prolog Insert - prolog Remove - epilog Insert - epilog Prolog Epilog if(CAS(…)) Only fails if other process succeeds

Failed! Success!Failed! Success! RemoveInsertDCAS Failed! Success! Composition Remove - prolog Insert - prolog Remove - epilog Insert - epilog Combined using a double-word compare-and-swap

Characterization 1.Have operations equivalent to insert and remove 2.These operations are linearizable 3.The element to remove is accessible before the linearization point 4.The linearization point for a successful operation is a successful compare-and-swap  Can be composed to move operations

Compatible Concurrent Data Objects  There are a wide variety of commonly used lock-free data structures that supports these requirements  Queues [PODC ‘96]  Lists [PODC ‘04]  Skip-Lists [IPDPS ‘03]  Priority Queues [JPDC ‘05]  Hash-tables [SPAA ‘02]  Dictionaries [SAC ‘04]  Stacks [Treiber ‘86]  …

Reverts to normal compare-and- swap if used outside move operation Move Operation Prolog SCAS 1 Prolog SCAS 2 Epilog Remove operationInsert operationMove support Performs double-word compare-and-swap Can only fail if other process succeeds

Case Study - Stack bool pop(value) while(true) ltop = top; if(ltop == 0) return false; value = ltop.value; if(cas(top, ltop, ltop.next)) return true; Not a successful operation Successful operation connected to a successful CAS Accessible before linearization point

Case Study - Stack bool pop(value) while(true) ltop = top; if(ltop == 0) return false; value = ltop.value; if(scas(top, ltop, ltop.next, value)) return true; The scas is called with the value to move

Generic Move Operation

Performance Evaluation  The evaluation was performed on a machine with an Intel Core i GHz processor and 6GB DDR memory  4 Cores with Hyper-Threading EnqueueDequeue Move EnqueueDequeue

Queue – Insert and Remove

Queue – Move Operations

Queue – Insert/Remove/Move

Queue – Before/After Adaptation

Summary  We provide a framework that consists of three parts  Properties used to identify compatible objects  Steps needed to adapt object  Algorithmic design of operation for performing lock-free moves between adapted objects  Adaptation does not affect standard operations

For more information: Thank you!