On disjoint access parallelism

Slides:



Advertisements
Similar presentations
Great Theoretical Ideas in Computer Science for Some.
Advertisements

Impossibilities for Disjoint-Access Parallel Transactional Memory : Alessia Milani [Guerraoui & Kapalka, SPAA 08] [Attiya, Hillel & Milani, SPAA 09]
Greedy Algorithms Greed is good. (Some of the time)
Distributed Algorithms – 2g1513 Lecture 10 – by Ali Ghodsi Fault-Tolerance in Asynchronous Networks.
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.
3.3 Spanning Trees Tucker, Applied Combinatorics, Section 3.3, by Patti Bodkin and Tamsen Hunter.
Consistency Conditions for STM Sandeep Hans. Agenda Database Consistency Conditions STM Consistency Conditions A different perspective Consistency with.
Zoo-Keeper’s Problem An O(nlogn) algorithm for the zoo-keeper’s problem Sergei Bespamyatnikh Computational Geometry 24 (2003), pp th CGC Workshop.
CS 206 Introduction to Computer Science II 11 / 11 / Veterans Day Instructor: Michael Eckmann.
Applied Discrete Mathematics Week 12: Trees
Dynamic Programming Technique. D.P.2 The term Dynamic Programming comes from Control Theory, not computer science. Programming refers to the use of tables.
Algorithmics for Software Transactional Memory Hagit Attiya Technion.
Is the following graph Hamiltonian- connected from vertex v? a). Yes b). No c). I have absolutely no idea v.
Lecture 11. Matching A set of edges which do not share a vertex is a matching. Application: Wireless Networks may consist of nodes with single radios,
CS 206 Introduction to Computer Science II 03 / 25 / 2009 Instructor: Michael Eckmann.
The Cost of Privatization Hagit Attiya Eshcar Hillel Technion & EPFLTechnion.
Lecture 11. Matching A set of edges which do not share a vertex is a matching. Application: Wireless Networks may consist of nodes with single radios,
Minimum Spanning Trees. Subgraph A graph G is a subgraph of graph H if –The vertices of G are a subset of the vertices of H, and –The edges of G are a.
GRAPH Learning Outcomes Students should be able to:
Spring 2015 Lecture 10: Elementary Graph Algorithms
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Sets.
CS4231 Parallel and Distributed Algorithms AY 2006/2007 Semester 2 Lecture 3 (26/01/2006) Instructor: Haifeng YU.
Discrete Structures Lecture 12: Trees Ji Yanyan United International College Thanks to Professor Michael Hvidsten.
Introduction to Graph Theory
The countable character of uncountable graphs François Laviolette Barbados 2003.
Defining Liveness by Bowen Alpern and Fred B. Schneider Presented by Joe Melnyk.
Bipartite Matching. Unweighted Bipartite Matching.
 2004 SDU Lectrue4-Properties of DFS Properties of DFS Classification of edges Topological sort.
1 Chapter 22: Elementary Graph Algorithms II. 2 About this lecture Depth First Search DFS Tree and DFS Forest Properties of DFS Parenthesis theorem (very.
Impossibility of Distributed Consensus with One Faulty Process By, Michael J.Fischer Nancy A. Lynch Michael S.Paterson.
Graphs Upon completion you will be able to:
“Towards Self Stabilizing Wait Free Shared Memory Objects” By:  Hopeman  Tsigas  Paptriantafilou Presented By: Sumit Sukhramani Kent State University.
ALGORITHMS THIRD YEAR BANHA UNIVERSITY FACULTY OF COMPUTERS AND INFORMATIC Lecture nine Dr. Hamdy M. Mousa.
1 GRAPH Learning Outcomes Students should be able to: Explain basic terminology of a graph Identify Euler and Hamiltonian cycle Represent graphs using.
Chapter 11. Chapter Summary  Introduction to trees (11.1)  Application of trees (11.2)  Tree traversal (11.3)  Spanning trees (11.4)
Lecture 12 Algorithm Analysis Arne Kutzner Hanyang University / Seoul Korea.
CSC317 1 At the same time: Breadth-first search tree: If node v is discovered after u then edge uv is added to the tree. We say that u is a predecessor.
Trees.
Capabilities, Minimization, and Transformation of Sequential Machines
Lower Bounds & Sorting in Linear Time
CSE15 Discrete Mathematics 03/06/17
Mathematical Foundations of AI
Main algorithm with recursion: We’ll have a function DFS that initializes, and then calls DFS-Visit, which is a recursive function and does the depth first.
Computing Connected Components on Parallel Computers
The countable character of uncountable graphs François Laviolette Barbados 2003.
Csc 2720 Instructor: Zhuojun Duan
PDAs Accept Context-Free Languages
Bipartite Graphs What is a bipartite graph?
Lectures on Network Flows
COMP 6/4030 ALGORITHMS Prim’s Theorem 10/26/2000.
Lecture 12 Algorithm Analysis
Planarity Testing.
Keys into Buckets: Lower bounds, Linear-time sort, & Hashing
CSE 421: Introduction to Algorithms
Enumerating Distances Using Spanners of Bounded Degree
Bart M. P. Jansen June 3rd 2016, Algorithms for Optimization Problems
Advanced Algorithms Analysis and Design
Advanced Algorithms Analysis and Design
Lectures on Graph Algorithms: searching, testing and sorting
Basic Graph Algorithms
CS 583 Analysis of Algorithms
Lecture 12 Algorithm Analysis
Lower Bounds & Sorting in Linear Time
Bipartite Graph 1. A graph G is bipartite if the node set V can be partitioned into two sets V1 and V2 in such a way that no nodes from the same set are.
A Introduction to Computing II Lecture 13: Trees
Instructor: Aaron Roth
Applied Combinatorics, 4th Ed. Alan Tucker
Lecture 12 Algorithm Analysis
Applications of Regular Closure
Presentation transcript:

On disjoint access parallelism Alessia Milani Labri, Université de Bordeaux I joint work with Faith Ellen, Panagiota Fatourou, Eleftherios Kosmas, and Corentin Travers

Disjoint Access Parallelism [Israeli and Rappoport, PODC 1994] Parallelism : allow processes executing concurrent transactions to make progress in parallel Intuitively…transactions operating on disjoint sets of data items progress concurrently without interfering with each other Because of the sequential specification some operations cannot progress in parallel without violating consistency But some operations on disjoint part of the data structure should be able to proceed in parallel L.start L.end SEARCH(v) APPEND(v’) 22

Concurrent data structures implementations base obj SEARCH(L,v) APPEND(L,v) Primitives operations (read, write, CAS…) on base objects (memory locations) An implementation of a concurrent object A, by a set of other base concurrent objects I, is a set of algorithms, one for each operation of A, defined in terms of operations on I. Transactions do not interfere  they do not access some common base object 33

Conflict graph The conflict graph of a set of transactions is an undirected graph where vertices represent transactions an edge connects two transactions that access the same data item x y y z T1 T2 T3 w z of an execution interval I T1 T2 T3

Strict DAP Guerraoui & Kapalka, SPAA 2008 Definition. A TM is strict disjoint-access parallel if, in every execution, for all transactions T1 ≠ T2 performed by different processes, if there is a base object accessed by both T1 and T2 and at least one of T1 and T2 modifies its value, then there is a data item that is accessed by both T1 and T2. There is an edge between T1 and T2 in the conflict graph of all transactions in the execution

Strict DAP & wait-freedom x y y z w z Processes executing T1 and T3 respectively cannot access and modify a same base object No helping Theorem. No obstruction free TM is Strict Disjoint Access Parallel Guerraoui & Kapalka, SPAA 2008  no wait-free TM is Strict Disjoint Access Parallel T1 cannot execute a primitive operation on the same base object than T3, so it cannot help T2 to execute its operations on z

DAP Israeli, & Rappaport, PODC 1994 Definition. A TM is disjoint-access parallel if in every execution, for all transactions T1 ≠ T2 performed by different processes, if there is a base object accessed by both T1 and T2 then there is a path between them in the conflict graph of the transactions in the minimal execution interval containing T1 and T2 7

Conflict graph of the minimal execution interval of T1 and T2 x y T2 y z T3 w z T4 x z Explain with the minimal execution interval T1 T2 T3 8

Minimal execution interval A transaction in the very past, justifies the contention between transactions on disjoint part of the list … A2 A3 An … An-1 A1 A1 A2 A3 An S1 S1 execution α conflict graph of α The linked list is initially empty Ai is the APPEND(L,i) by a process q that inserts the ith node in the list and this node has value i A1 accesses node 1 and L.start A2 accesses node 1 and node 2 All the other APPEND does not access node 1 nor L.start The SEARCH(L,1) accesses only data items L.start and node 1

weak DAP Attiya, Hillel & Milani, SPAA 2009 Definition. A TM is weak disjoint-access parallel if in every execution, for all transactions T1 ≠ T2 performed by different processes, if there is a base object accessed by both T1 and T2 at the same time and at least one of T1 and T2 may modify its value, then there is a path between them in the conflict graph of the transactions in the minimal execution interval containing T1 and T2 It is “weak” DAP because it allows read-read contention even though there is no path between two operations. This was not allowed by the original definition of Israeli and Rappaport 10

weak DAP & wait-freedom Theorem. No TM with invisible and wait-free read-only transactions is weak Disjoint Access Parallel Attiya, Hillel & Milani, SPAA 2009 not write to base objects 11

Minimal Disjoint Access Parallelism Suppose  is a solo execution of a transaction T1 and  is a solo execution of a transaction T2, both starting from the same quiescent configuration. If there is a base object accessed by both T1 and T2 respectively in  and  and at least one of T1 and T2 modifies its value, then T1 and T2 access a same data item

Impossibility result Theorem. No wait-free TM is minimal disjoint-access parallel The proof uses a data structure of unbounded size We assume that it exists a wait-free TM that is disjoint access parallel and we consider the implementation of a unordered doubly linked list. Then we show a contradiction

Idea of the Proof L.start L.end L.start L.start L.end L.end q p Initial configuration : the list has tree nodes A process p starts a SEARCH(L,0) A process q executes an unbounded number of APPEND(L,v) L.start L.end SEARCH(L,0) APPEND(L,v) p q L.start L.start L.end L.end We play with the value inserted by the append to violate linearizability

Idea of the Proof L.start L.end p 2 3 4 5 E E’ Process p cannot distinguish if a node inserted by q was already in the list before starting its search … unless q and p communicate e.g., in its APPEND(L,4) q accesses a base object accessed by p in the execution of SEARCH(L,0) But, in E’ the SEARCH(L,0) accesses only data items L.start, node 1 and APPEND(L,4) accesses only data items L.end, node 3, node 4  not disjoint-access-parallel 1 APPEND(L,4) APPEND(L,5) SEARCH(L,0) q and p communicate means that they have to access a same base object and at least one of them should write it Process q acts at the same way in execution E and E’ because its operation is value oblivious,

Idea of the Proof L.start Since process p cannot distinguish if a node was in the list before starting its search p keeps searching  no wait-free Otherwise p may stops before visiting a node with value 0 that was in the list before p started its SEARCH(L,0)  not linearizable p L.end 1 2 3 4 5 L.start L.end p 1 2 3 No ‘0’ in L We play with the value inserted by the append to violate linearizability

The set of data items it accesses does not depend on the value of its input parameters Assumption If a transaction of a data structure is value oblivious, then, the set of base objects accessed during any solo execution of this transaction does not depend on the value of its input parameters, nor on the value of the input parameters to any sequence of value oblivious transactions performed beforehand.

To circumvent the impossibility 1 We have designed a TM that is weak dap opaque wait-free for data structures of bounded size

To circumvent the impossibility 2 A new definition of DAP where a process takes some responsibility for its past actions Allow any transaction to access a restricted set of base objects B E.g. a timestamping system q y x z w p y T T and T’ can both access a same base object Explain using the picture that according to previous DAP definitions T4 and T5 could not access a same base object

mDAP : conflict graph p q T y x z w T'' T' A vertex for each transaction in the execution { T, T’} is an edge if there exists a transaction T'' by the same process that performed T', T'' is performed at or before T', the execution intervals of T and T' overlap, the execution intervals of T and T” overlap, and there is a data item that is accessed by both T and T''.

Thanks 21

mDAP Consider a TM that uses a set of base objects O and a timestamp object B. Definition. A TM is morally disjoint-access parallel if in every execution, for all overlapping transactions T1 ≠ T2 performed by different processes, if there is a base object (not B) accessed by both T1 and T2 at the same time and at least one of T1 and T2 modify its value, then there is a path between them in the conflict graph of all transactions in the execution

Infinite execution where SEARCH(L,0) never terminates Longest prefix of the solo execution by p of SEARCH(L,0) starting at configuration C3 :: p does not access any base object accessed by q in 1 2 3 1 APPEND(L,1) 2 APPEND(L,2) 3 APPEND(L,3) C0 C1 C2 C3 C4 … 5 APPEND(L,5) 31 4 APPEND(L,4) 4 42 is the longest prefix of the solo execution of SEARCH(L,0) starting at C4 :: p does not access any base object accessed by q in 2 3 4 At the initial configuration C0, the list in empty Ci is the configuration reached when process q executes solo APPEND(L,i) starting at configuration Ci-1 i is the sequence of steps in the solo execution of APPEND(L,i) by q At Ci the list consists of i nodes with values 1,2,…,i Since 31 is a prefix of 42, we have that 31 does not access any base object in 4 .Then q does not distinguish between the two executions C0 C1 C2 C3 C4 1 APPEND(L,1) 2 APPEND(L,2) 3 APPEND(L,3) 4 APPEND(L,4) 42 The base objects in 4 are the only ones whose value may be different at C4 w.r.t. C3 4 31 31 is a prefix of 42

… C0 C1 C2 C3 C4 Ci Ci+1 Ci+2 1 2 3 31 42 ii-2 i+1i-1 i+2i 4 4 i-2 … i-1 i-1 i i It remains to prove that ii-2 is a proper prefix of i+2i pour i>3  an infinite number of i are not empty

By contradiction Let ii-2 =i+2i The search starting at Ci executes at least one step more after ii-2 relies on linearizability Let b be the base object accessed by the first step of the search after ii-2  since ii-2 =i+2i , bB(i)B(i+1)B(i+2) B(i) is the set of base objects accessed by q during the execution of i By the property of disjoint access parallelism bB(i)B(i+1)B(i+2)  contradiction

Proof Step 1 C0 C1 Ci-3 Ci-2 Ci-1 Ci Ci-2 C0 C1 Ci-3 Ci i-2 Ci-1 … 1 APPEND(1) APPEND(2) APPEND(i-2) APPEND(i-1) APPEND(i) C0 C1 … Ci-3 Ci-2 Ci-1 Ci 1 2 i-2 i-1 i ii-2 The list consists of i nodes and the (i-2)th node has value ‘0’ i-1 1 2 i-2 Ci-2 … C0 C1 Ci-3 APPEND(1) APPEND(2) APPEND(0) APPEND(i-1) i Ci APPEND(i) i-2 Ci-1 ii-2 p No ‘0’ in L The execution is not linearizable  The search executes another step after ii-2 APPEND is value oblivious  the set of base objects accessed by executions leading to configuration Ci and Cii-2 are the same The only base objects that may have a different value at Cii-2 w.r.t. Ci are the ones accessed in i-2 i-1 i

Proof Step 3 Ci-2 C0 C1 Ci-3 Ci i-2 Ci-1 i-1 1 2 i-2 … i ii-2 APPEND(1) APPEND(2) APPEND(0) APPEND(i-1) i Ci APPEND(i) i-2 Ci-1 ii-2 We have that bB(i)B(i+1)B(i+2) The only base objects that may have a different value at Cii-2 w.r.t. Ci-1i-2 are the ones accessed in i  i-1i-2 =ii-2 and p accesses b after i-1i-2 In this execution the search completes at node i-2 where it finds a 0. The data sets of the SEARCH(L,0) and of APPEND(i), APPEND(i+1) and APPEND(i+2) are disjoint. by disjoint access parallelism p and q do not access a common base object in the execution of the SEARCH(L,0) and of APPEND(i), APPEND(i+1) and APPEND(i+2) respectively CONTRADICTION