1 Introduction
2 Review
3 Proposed method
3.1 Basic concept
3.2 Data structure
3.2.1 Transactional data structure
3.2.2 Data object and locator object
3.2.3 Transactional memory object (TMObject)
-
*WriterTransactions: This field points to an array of pointers. Each element of this array points to the transaction locator opened in a cascading manner to access the data object. The first element of the array points to the transaction locator of the first initiated transaction in the chain that owns the sharable object. In the rest of the paper the first array element is termed as header. Rest of the transaction locators in the chain other than header are the pseudo owners of that sharable object.
-
*Data This field points to the Data object to read the recent committed data.
3.2.4 Proposed concurrency control mechanism
-
If \(T_x\) ’s status is Committed; then \(T_m\) checks for the data consistency with its old value and Data Object’s value (as Data Object stores the recent committed data updated by \(T_x\)). If the data is consistent then \(T_m\) commits otherwise \(T_m\) re-executes write operation after reading recent data value and then commits.
-
If \(T_x\) ’s status is Ready; then \(T_m\) checks the data consistency with its OldField and \(T_x\)’s NewField value. If data value is consistent then \(T_m\) backs off for some arbitrary time and if data is inconsistent then \(T_m\) re-executes its write operation after reading data value from \(T_x\)’s NewField and backs off for a very small interval and retries to commit.
-
If \(T_x\) ’s status is Active; then \(T_m\) follows the steps same as \(T_x\) is in ready state and backs off for some arbitrary time to give chance to \(T_x\) to commit.
4 New concurrency control mechanism: a critical analysis
5 Performance evaluation
-
SZ is the size of each transaction in terms of clock cycle and hence a large value indicates more clock cycle to commit.
-
ST is the initiation time of a transaction.
-
Access Time AC is the number of cycles after which a transaction accesses a sharable object.
-
EL is the write execution length in clock cycles.
-
The term CommitPoint implies the commit point of the transaction in absence of contention.
-
R_B states the number of re-execution of write process and/or number of back-offs. For example, R2B3 implies transaction has re-executed its write operations for two times and backed off three times before commit.
-
\(T_1\) and \(T_2\) are consecutive transactions in the chain, appearing in the order in which these are mentioned.
-
PSTM: The legend for the Proposed STM.
-
LOCK: Lock-based concurrency control algorithm.
-
EET: Effective Execution Time of Proposed Method over Lock-based Synchronization.
-
\(T_1\) and \(T_2\): Are two update-transactions, where \(T_1\) has initiated before \(T_2\).
-
Access \((T_2) > Access (T_1)\): transaction \(T_2\) accesses the sharable object after \(T_1\).
-
Access \((T_2) < Access (T_1)\): transaction \(T_2\) accesses the sharable object before \(T_1\).
-
CommitPoint \((T_2) > CommitPoint (T_1)\): transaction \(T_2\) reaches its commit point after \(T_1\).
-
CommitPoint \((T_2) < CommitPoint (T_1)\): transaction \(T_2\) reaches its commit point before \(T_1\).
5.1 Case I: transaction \(T_2\) accesses sharable object after transaction \(T_1\)
– | Transaction 1 (\(T_1\)) | Transaction 2 (\(T_2\)) | Commit time | – | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
SL | SZ | ST | AC | EL | SZ | ST | AC | EL | R_B | PSTM | LOCK | EET (%) |
1 | 60 | 1 | 7 | 53 | 65 | 10 | 10 | 55 | R0B0 | 74 | 115 | 64.30 |
2 | 90 | 1 | 25 | 65 | 85 | 15 | 30 | 55 | R0B0 | 99 | 145 | 68.30 |
3 | 33 | 1 | 15 | 35 | 38 | 15 | 5 | 33 | R0B0 | 52 | 66 | 78.79 |
4 | 27 | 22 | 10 | 17 | 29 | 25 | 12 | 17 | R0B0 | 53 | 65 | 81.50 |
5 | 20 | 6 | 13 | 7 | 20 | 14 | 15 | 5 | R0B0 | 33 | 33 | 100.00 |
– | Transaction 1 (\(T_1\)) | Transaction 2 (\(T_2\)) | Commit time | – | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
SL | SZ | ST | AC | EL | SZ | ST | AC | EL | R_B | PSTM | LOCK | EET (%) |
1 | 50 | 5 | 15 | 35 | 30 | 10 | 12 | 18 | R0B1 | 56 | 72 | 77.78 |
2 | 89 | 57 | 51 | 38 | 74 | 61 | 59 | 15 | R0B1 | 148 | 160 | 92.50 |
3 | 99 | 1 | 41 | 58 | 91 | 3 | 58 | 33 | R0B1 | 125 | 132 | 94.70 |
4 | 20 | 1 | 10 | 10 | 12 | 5 | 8 | 4 | R0B2 | 22 | 24 | 91.67 |
5 | 86 | 49 | 33 | 53 | 76 | 59 | 54 | 22 | R0B1 | 155 | 156 | 99.36 |
5.2 Case II: transaction \(T_2\) accesses sharable object before transaction \(T_1\)
– | Transaction 1 (\(T_1\)) | Transaction 2 (\(T_2\)) | Commit Time | – | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
SL | SZ | ST | AC | EL | SZ | ST | AC | EL | R_B | PSTM | LOCK | EET (%) |
1 | 20 | 1 | 10 | 10 | 15 | 2 | 7 | 8 | R1B0 | 23 | 28 | 82.14 |
2 | 70 | 1 | 53 | 17 | 40 | 18 | 25 | 15 | R1B0 | 71 | 85 | 83.53 |
3 | 51 | 15 | 10 | 65 | 30 | 10 | 10 | 20 | R1B1 | 77 | 85 | 90.59 |
4 | 20 | 10 | 10 | 10 | 10 | 3 | 8 | 2 | R5B4 | 30 | 31 | 96.80 |
5 | 20 | 1 | 10 | 10 | 10 | 2 | 7 | 3 | R1B3 | 23 | 23 | 100.00 |
– | Transaction 1 (\(T_1\)) | Transaction 2 (\(T_2\)) | Commit time | – | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
SL | SZ | ST | AC | EL | SZ | ST | AC | EL | R_B | PSTM | LOCK | EET (%) |
1 | 85 | 1 | 60 | 25 | 65 | 22 | 35 | 30 | R1B0 | 115 | 115 | 100.00 |
2 | 71 | 1 | 53 | 18 | 69 | 4 | 49 | 20 | R1B0 | 91 | 91 | 100.00 |
3 | 71 | 1 | 53 | 18 | 71 | 3 | 50 | 21 | R1B0 | 93 | 92 | 101.09 |
4 | 85 | 1 | 60 | 25 | 75 | 15 | 40 | 35 | R1B0 | 123 | 120 | 102.50 |
5 | 71 | 1 | 53 | 18 | 71 | 5 | 45 | 26 | R1B0 | 100 | 97 | 103.09 |
5.3 Case III: transaction \(T_2\) accesses sharable object after commit of transaction \(T_1\)
– | Transaction 1 (\(T_1\)) | Transaction 2 (\(T_2\)) | Commit time | – | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
SL | SZ | ST | AC | EL | SZ | ST | AC | EL | R_B | PSTM | LOCK | EET (%) |
1 | 70 | 1 | 60 | 10 | 65 | 40 | 35 | 30 | R0B0 | 104 | 104 | 100.00 |
2 | 40 | 5 | 20 | 20 | 35 | 30 | 25 | 10 | R0B0 | 64 | 64 | 100.00 |
3 | 35 | 1 | 12 | 23 | 30 | 28 | 9 | 21 | R0B0 | 57 | 57 | 100.00 |
4 | 25 | 1 | 10 | 15 | 23 | 20 | 17 | 6 | R0B0 | 42 | 42 | 100.00 |
5 | 20 | 1 | 5 | 15 | 20 | 10 | 12 | 8 | R0B0 | 29 | 29 | 100.00 |
5.4 Performance of PSTM over Loack based for a chain of transactions
6 Concluding remarks
– | Transaction (\(T_1\)) | Transaction (\(T_2\)) | Transaction (\(T_3\)) | Transaction (\(T_4\)) | Transaction (\(T_5\)) | |||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
SL | SZ | ST | AC |
P1/L1 | SZ | ST | AC |
P2 |
L2 | SZ | ST | AC |
P3 |
L3 | SZ | ST | AC |
P4 |
L4 | SZ | ST | AC |
P5 |
L5 |
1 | 96 | 1 | 18 | 96 | 85 | 96 | 49 | 180 | 180 | 81 | 96 | 2 | 255 | 259 | 86 | 96 | 3 | 264 | 342 | 69 | 96 | 2 | 298 | 409 |
2 | 94 | 1 | 57 | 94 | 74 | 87 | 40 | 160 | 160 | 78 | 92 | 10 | 237 | 228 | 99 | 94 | 15 | 276 | 312 | 62 | 94 | 1 | 277 | 373 |
3 | 81 | 1 | 15 | 81 | 65 | 39 | 22 | 103 | 124 | 81 | 76 | 15 | 156 | 190 | 93 | 76 | 55 | 168 | 228 | 65 | 76 | 58 | 175 | 235 |
4 | 85 | 1 | 17 | 85 | 61 | 16 | 18 | 119 | 128 | 87 | 74 | 45 | 160 | 170 | 71 | 79 | 17 | 203 | 224 | 95 | 81 | 55 | 215 | 264 |
5 | 99 | 1 | 89 | 99 | 78 | 39 | 72 | 116 | 116 | 60 | 47 | 13 | 200 | 163 | 63 | 99 | 15 | 209 | 211 | 66 | 99 | 14 | 216 | 263 |
6 | 82 | 1 | 71 | 82 | 97 | 70 | 69 | 166 | 166 | 95 | 74 | 71 | 168 | 190 | 79 | 75 | 51 | 181 | 218 | 69 | 81 | 43 | 201 | 244 |
7 | 84 | 1 | 41 | 84 | 91 | 83 | 16 | 173 | 173 | 72 | 84 | 53 | 174 | 192 | 82 | 84 | 13 | 234 | 261 | 73 | 84 | 57 | 236 | 277 |
8 | 79 | 1 | 51 | 79 | 78 | 54 | 8 | 131 | 149 | 62 | 57 | 20 | 160 | 191 | 89 | 69 | 33 | 213 | 247 | 99 | 73 | 63 | 243 | 283 |
9 | 87 | 1 | 19 | 87 | 64 | 48 | 5 | 111 | 146 | 60 | 73 | 12 | 132 | 194 | 68 | 73 | 63 | 140 | 199 | 99 | 87 | 88 | 185 | 210 |
10 | 69 | 1 | 56 | 69 | 97 | 17 | 84 | 113 | 113 | 75 | 53 | 26 | 176 | 162 | 91 | 56 | 25 | 212 | 228 | 70 | 56 | 59 | 213 | 239 |
11 | 61 | 1 | 21 | 61 | 80 | 56 | 13 | 135 | 135 | 72 | 59 | 63 | 139 | 144 | 84 | 61 | 42 | 186 | 186 | 91 | 61 | 73 | 187 | 204 |
12 | 73 | 1 | 63 | 73 | 83 | 31 | 59 | 113 | 113 | 82 | 40 | 26 | 177 | 169 | 77 | 43 | 75 | 179 | 171 | 60 | 48 | 6 | 215 | 225 |
13 | 96 | 1 | 61 | 96 | 73 | 31 | 44 | 103 | 125 | 77 | 82 | 37 | 158 | 165 | 72 | 95 | 55 | 166 | 182 | 85 | 95 | 54 | 210 | 213 |
14 | 92 | 1 | 12 | 92 | 88 | 55 | 28 | 142 | 152 | 75 | 67 | 51 | 165 | 176 | 98 | 71 | 87 | 168 | 187 | 93 | 92 | 56 | 221 | 224 |
15 | 93 | 1 | 78 | 93 | 91 | 7 | 80 | 97 | 104 | 63 | 34 | 42 | 117 | 125 | 60 | 70 | 47 | 129 | 138 | 62 | 92 | 51 | 153 | 153 |
16 | 97 | 1 | 34 | 97 | 60 | 78 | 33 | 137 | 137 | 62 | 89 | 31 | 150 | 168 | 86 | 91 | 72 | 176 | 182 | 90 | 94 | 23 | 250 | 249 |
17 | 83 | 1 | 39 | 83 | 81 | 71 | 77 | 151 | 151 | 93 | 71 | 74 | 182 | 170 | 70 | 77 | 27 | 232 | 213 | 63 | 80 | 26 | 253 | 250 |
18 | 86 | 1 | 64 | 86 | 62 | 74 | 38 | 135 | 135 | 71 | 75 | 68 | 145 | 145 | 66 | 82 | 43 | 170 | 168 | 92 | 82 | 34 | 231 | 226 |
19 | 88 | 1 | 56 | 88 | 87 | 21 | 79 | 107 | 107 | 95 | 71 | 93 | 165 | 165 | 88 | 74 | 19 | 299 | 234 | 90 | 78 | 5 | 337 | 319 |
20 | 95 | 1 | 33 | 95 | 91 | 14 | 66 | 104 | 120 | 68 | 57 | 58 | 124 | 130 | 86 | 88 | 23 | 236 | 193 | 74 | 89 | 59 | 237 | 208 |