A DAPs World - Sites personnels de TELECOM ParisTech

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
base obj
SEARCH(L,v)
APPEND(L,v)
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
T1
x
T2
y
T3
w
T1
• The conflict graph of
a set of transactions
is an undirected
graph where
y
T2
z
z
T3
• 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 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
T1
x
y
T2
y
T3
w
z
z
T1
T2
T3
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
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
Conflict graph of the minimal
execution interval of T1 and T2
T1
x
y
T2
y
T3
w
z
z
T4
x
T1
T2
T3
z
Minimal execution interval
A transaction in the very past, justifies the contention
between transactions on disjoint part of the list
A1
A2
A3
…
An-1
An
S1
execution α
•
•
A2
A3 … An
S1
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
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
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
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
Idea of the Proof
•
•
APPEND(L,v)
L.start
L.start
L.start
p
SEARCH(L,0)
•
SEARCH(L,0)
q
L.end
Initial configuration : the
list has tree nodes
A process p starts a
A process q executes
an unbounded number
L.end
ofL.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
• weak dap
• opaque
• wait-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
mDAP : 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
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
Longest prefix of the solo execution by p of
SEARCH(L,0)
never
starting at configuration
C :: terminates
p does not access any
SEARCH(L,0)
3
base object accessed by q in 1 2 3
APPEND(L,1)
APPEND(L,2)
C0  C1
1
2
APPEND(L,3)
C2
3
C3
C4
…
31
APPEND(L,4)
4 APPEND(L,5)

4
4 is the longest prefix of the solo…execution of
SEARCH(L,0) startingat
5 C4 :: p does not access
2
any base object accessed by q in 2 3 4
APPEND(L,1)
APPEND(L,2)
C0  C1
1
2
APPEND(L,3)
C2
3
APPEND(L,4)
C3 4
C4
3 1
42
The base objects in 4
are the only ones
whose value may be
different at C4 w.r.t. C3
4
31 is a prefix of 42
C0  C1
1
2 C2
C4 … Ci
3 C3
 31
42
Ci+1
ii-2
i+1i-1
Ci+2
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
1. The search starting at Ci executes at least
one step more after ii-2
 relies on linearizability
2. 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
3. By the property of disjoint access
parallelism bB(i)B(i+1)B(i+2)
 contradiction
Proof Step 1
APPEND(1)
C0 
1
APPEND(2)
C1
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)
C0 
1
APPEND(2)
C1 
2
…
APPEND(0)
Ci-3 
i-2
i-2 APPEND(i-1) i-2
Ci-2 
Ci-1
The execution is not linearizable 
The search executes another step after ii-2
•
•
APPEND(i)
i-1
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)
C0 
1
•
•
•
C1 
2
…
APPEND(0)
Ci-3 
i-2
i-2 APPEND(i-1)
i-2
APPEND(i)
Ci-2 
Ci-1 
i-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-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.
•
•
APPEND(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