Presentation is loading. Please wait.

Presentation is loading. Please wait.

On disjoint access parallelism

Similar presentations


Presentation on theme: "On disjoint access parallelism"— Presentation transcript:

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

2 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

3 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

4 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

5 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

6 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

7 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

8 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

9 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

10 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

11 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

12 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

13 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

14 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

15 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,

16 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

17 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.

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

19 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

20 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''.

21 Thanks 21

22 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

23 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

24 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

25 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

26 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

27 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


Download ppt "On disjoint access parallelism"

Similar presentations


Ads by Google