THE UNIVERSAL TRANSACTIONAL MEMORY CONSTRUCTION
Jons-Tobias Wamhoff and Christof Fetzer Dresden University of Technology, Germany
1
THE UNIVERSAL TRANSACTIONAL MEMORY CONSTRUCTION Jons-Tobias - - PowerPoint PPT Presentation
THE UNIVERSAL TRANSACTIONAL MEMORY CONSTRUCTION Jons-Tobias Wamhoff and Christof Fetzer Dresden University of Technology, Germany 1 MOTIVATION Universal construction Shows how to convert sequential algorithm into concurrent wait-free
1
The Universal Transactional Memory Construction TRANSACT‘11, San Jose, CA
2
The Universal Transactional Memory Construction TRANSACT‘11, San Jose, CA
3
Thread n Operating System Thread 1 Perf Ctr 1 Perf Ctr n
Code Code
Transactional Memory Shared Memory
The Universal Transactional Memory Construction TRANSACT‘11, San Jose, CA
Thread n Operating System Thread 1 Perf Ctr 1 Perf Ctr n
Code Code
Transactional Memory Shared Memory
4
The Universal Transactional Memory Construction TRANSACT‘11, San Jose, CA
invocations (operations)
memory
linerizable object
number of steps
5
Log 1 Log 0 Invocation 0
txBegin txRead txWrite txCommit
S1
txBegin txRead txWrite txCommit
S2
txBegin txRead txWrite txCommit
S3
txBegin txRead txWrite txCommit
S4
Invocation 1
The Universal Transactional Memory Construction TRANSACT‘11, San Jose, CA
6
Thread n Operating System Thread 1 Perf Ctr 1 Perf Ctr n
Code Code
Transactional Memory Shared Memory
Log 1 Log 0 Invocation 0
txBegin txRead txWrite txCommit
S1
txBegin txRead txWrite txCommit
S2
txBegin txRead txWrite txCommit
S3
txBegin txRead txWrite txCommit
S4
Invocation 1
The Universal Transactional Memory Construction TRANSACT‘11, San Jose, CA
7
The Universal Transactional Memory Construction TRANSACT‘11, San Jose, CA
8
Memory ... ...
1 2 3 4
ct key
S0
chunks
1 1 2 3 1 4 S1 1 1 2 2 2 3 1 4 S2 3 1 2 2 2 3 3 4 3 S3
current
NULL
State History
The Universal Transactional Memory Construction TRANSACT‘11, San Jose, CA
9
Log k Log 1 Invocation 0
txBegin txRead txWrite txCommit
S1
txBegin txRead txWrite txCommit
Sk
txBegin txRead txWrite txCommit
Sk+1
txBegin txRead txWrite txCommit
S2k
Invocation 1 ...
The Universal Transactional Memory Construction TRANSACT‘11, San Jose, CA
10
Log 1 Log 0 Invocation 0
txBegin txRead txWrite txCommit
S1
txBegin txRead txWrite txCommit
S2
txBegin txRead txWrite txCommit
S3
txBegin txRead txWrite txCommit
S4
Invocation 1
The Universal Transactional Memory Construction TRANSACT‘11, San Jose, CA
11
1 1 2 2 2 3 1 4 S2
current
NULL 1 1 2 2 2 3 1 4 S4 B2
ct key
The Universal Transactional Memory Construction TRANSACT‘11, San Jose, CA
12
1 1 2 2 2 3 1 4 S2
current
NULL 1 1 4 2 2 3 1 4 S4 B2
ct key
The Universal Transactional Memory Construction TRANSACT‘11, San Jose, CA
13
1 1 2 2 2 3 1 4 S2
current
NULL 1 1 4 2 2 3 1 4 S4 B2
ct key
The Universal Transactional Memory Construction TRANSACT‘11, San Jose, CA
14
1 1 2 2 2 3 1 4 S2 3 1 2 2 2 3 3 4 3 S3
current
1 1 4 2 2 3 1 4 S4 B2
ct key
The Universal Transactional Memory Construction TRANSACT‘11, San Jose, CA
15
ct key
1 1 2 2 2 3 1 4 S2 3 1 2 2 2 3 3 4 3 S3
current
3 1 2 2 2 3 3 4 3 S4
The Universal Transactional Memory Construction TRANSACT‘11, San Jose, CA
16 Thread 2 Thread 3 Thread 4 Operating System Thread 1 Log 1 Log 0 Log 2
CT8 s1=ftx(S0) s3=ftx(S2) s2=ftx(S1) ct4 ct5 ct6 ct7 s4=ftx(S3) s5=ftx(S4) s6=ftx(S5) NULL
Invocation 0 Invocation 1 Invocation 2
S3
Global State next CT
NULL NULL
The Universal Transactional Memory Construction TRANSACT‘11, San Jose, CA
17 Log 1 Log 0
txBegin txRead txWrite txCommit
S3
txBegin txRead txWrite txCommit
S4
Invocation 1 Thread 2 Thread 1
ct3 ct4 S2
current
NULL S4
The Universal Transactional Memory Construction TRANSACT‘11, San Jose, CA
18
Log 1 Log 0
txBegin txRead txWrite txCommit
S3
txBegin txRead txWrite txCommit
S4
Invocation 1
S2
current
S3=S2 NULL S5=S4
Empty
NULL
Invocation 2
The Universal Transactional Memory Construction TRANSACT‘11, San Jose, CA
for invocation
with larger quota
means bound number of steps for transaction to complete
19
Log 1 Log 0
txBegin txRead txWrite txCommit
S3
txBegin txRead txWrite txCommit
S4
Invocation 1
S2
current
S3=S2 NULL NULL
Invocation 2
txBegin txRead txWrite txCommit
S5 t=12 t=13 t=23
The Universal Transactional Memory Construction TRANSACT‘11, San Jose, CA
20