On disjoint access parallelism Alessia Milani Labri Universit
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 L. start SEARCH(v) APPEND(v’) L. end 22
Concurrent data structures implementations SEARCH(L, v) APPEND(L, v) base obj Primitives operations (read, write, CAS…) on base objects (memory locations) • Transactions do not interfere they do not access some common base object 33
Conflict graph T 1 x T 2 y T 3 w T 1 • The conflict graph of a set of transactions is an undirected graph where y T 2 z z T 3 • vertices represent transactions • an edge connects two transactions that access the same data item
Strict DAP Guerraoui & Kapalka, SPAA 2008 Definition. A TM is strict disjoint-access parallel if, in every execution, for all transactions T 1 ≠ T 2 performed by different processes, if there is a base object accessed by both T 1 and T 2 and at least one of T 1 and T 2 modifies its value, then there is a data item that is accessed by both T 1 and T 2. There is an edge between T 1 and T 2 in the conflict graph of all transactions in the execution
Strict DAP & wait-freedom T 1 x y T 2 y T 3 w z z T 1 T 2 T 3 Processes executing T 1 and T 3 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
DAP Israeli, & Rappaport, PODC 1994 Definition. A TM is disjoint-access parallel if in every execution, for all transactions T 1 ≠ T 2 performed by different processes, if there is a base object accessed by both T 1 and T 2 then there is a path between them in the conflict graph of the transactions in the minimal execution interval containing T 1 and T 2
Conflict graph of the minimal execution interval of T 1 and T 2 T 1 x y T 2 y T 3 w z z T 4 x T 1 T 2 T 3 z
Minimal execution interval A transaction in the very past, justifies the contention between transactions on disjoint part of the list A 1 A 2 A 3 … An-1 An S 1 execution α • • A 2 A 3 … A n S 1 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 • • A 1 accesses node 1 and L. start A 2 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 T 1 ≠ T 2 performed by different processes, if there is a base object accessed by both T 1 and T 2 at the same time and at least one of T 1 and T 2 may modify its value, then there is a path between them in the conflict graph of the transactions in the minimal execution interval containing T 1 and T 2
weak DAP & wait-freedom • Theorem. No TM with invisible and waitfree read-only transactions is weak Disjoint Access Parallel Attiya, Hillel & Milani, SPAA 2009 not write to base objects
Minimal Disjoint Access Parallelism Suppose is a solo execution of a transaction T 1 and is a solo execution of a transaction T 2, both starting from the same quiescent configuration. If there is a base object accessed by both T 1 and T 2 respectively in and at least one of T 1 and T 2 modifies its value, then T 1 and T 2 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
Idea of the Proof • APPEND(L, v) L. start SEARCH(L, 0) • SEARCH(L, 0) p • q L. end Initial configuration : the list has tree nodes A process p starts a A process q executes an unbounded number L. end of. L. end APPEND(L, v)
Idea of the Proof E’ L. start p 10 L. end 2 APPEND(L, 4) 3 4 5 • Process p cannot distinguish if a node inserted by q was already in the list before starting its search … • unless q and p communicate APPEND(L, 5) • SEARCH(L, 0) • 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
Idea of the Proof L. start p 1 L. end 2 3 4 5 No ‘ 0’ in L L. start p 1 2 3 L. end 0 • 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
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 Pweak dap Popaque Pwait-free for data structures of bounded size
To circumvent the impossibility 2 T” • 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 T’ x z p y T T and T’ can both access a same base object w
m. DAP : conflict graph 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''. p q y T' x z y T w
Thanks
m. DAP 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 T 1 ≠ T 2 performed by different processes, if there is a base object (not B) accessed by both T 1 and T 2 at the same time and at least one of T 1 and T 2 modify its value, then there is a path between them in the conflict graph of all transactions in the execution
Infinite execution where Longest prefix of the solo execution by p of SEARCH(L, 0) never starting at configuration C : : terminates p does not access any base SEARCH(L, 0) 3 object accessed by q in 1 2 3 APPEND(L, 1) APPEND(L, 2) C 0 C 1 1 2 APPEND(L, 3) C 2 3 C 4 … 3 1 APPEND(L, 4) 4 APPEND(L, 5) 4 4 is the longest prefix of the solo…execution of SEARCH(L, 0) starting at 5 C 4 : : p does not access any base object accessed by q in 2 3 4 2 APPEND(L, 1) APPEND(L, 2) C 0 C 1 1 2 APPEND(L, 3) C 2 3 APPEND(L, 4) C 3 4 C 4 3 1 4 2 The base objects in 4 are the only ones whose value may be different at C 4 w. r. t. C 3 4 31 is a prefix of 42
C 0 C 1 1 2 C 2 3 C 4 … Ci C 3 3 1 4 2 Ci+1 ii-2 i+1 i-1 Ci+2 i+2 i 4 4 … i-2 i-1 i i • It remains to prove that ii-2 is a proper prefix of i+2 i pour i>3 an infinite number of i are not empty
By contradiction Let ii-2 = i+2 i 1. 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+2 i , b B(i) B(i+1) B(i+2) P B(i) is the set of base objects accessed by q during the execution of i 1. By the property of disjoint access parallelism b B(i) B(i+1) B(i+2) contradiction
Proof Step 1 APPEND(1) C 0 1 APPEND(2) C 1 2 … APPEND(i-2) Ci-3 i-2 APPEND(i-1) Ci-2 i-1 APPEND(i) Ci-1 i Ci ii-2 The list consists of i nodes and the (i-2)th node has value ‘ 0’ APPEND(1) C 0 1 APPEND(2) C 1 2 … APPEND(0) Ci-3 i-2 Ci-2 The execution is not linearizable The search executes another step after ii-2 • • APPEND(i-1) i-1 i-2 Ci-1 APPEND(i) i i-2 Ci ii-2 No ‘ 0’ in L p 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 APPEND(1) C 0 1 • • • … APPEND(0) Ci-3 i-2 APPEND(i-1) i-2 APPEND(i) Ci-2 Ci-1 i i-2 Ci 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-1 i-2 are the ones accessed in i i-1 i-2 = ii-2 and p accesses b after i-1 i-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. • • APPEND(2) C 1 2 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
- Slides: 27