k vidyasankar
play

K. Vidyasankar Memorial University St. Johns CANADA Software - PowerPoint PPT Presentation

HParSTM: A Hierarchy-based STM Protocol for Supporting Nested Parallelism Ranjeet Kumar K. Vidyasankar Memorial University St. Johns CANADA Software Transactional Memory (STM) Systems Processes execute programs. Atomic regions are


  1. HParSTM: A Hierarchy-based STM Protocol for Supporting Nested Parallelism Ranjeet Kumar K. Vidyasankar Memorial University St. John’s CANADA

  2. Software Transactional Memory (STM) Systems  Processes execute programs.  Atomic regions are specified in the programs.  Atomic regions are treated as transactions.  Transactions are executed concurrently.  Correctness of concurrent executions is to be assured by STM system. TRANSACT 2011 2

  3. Correctness Criterion  Opacity  Both committed and aborted transactions should read from a consistent state of the shared memory.  The state resulting from a (strongly) serializable execution of some committed transactions is taken to be consistent. TRANSACT 2011 3

  4. Our Protocol  Nested transactions  A (root-level) transaction consists of sub-transactions, which again may consist of sub-transactions, and so on.  Closed nested transactions  Aborted sub-transactions are ignored.  Commitment of sub-transactions are local – at the parent level.  Only the writes of the root-level transactions affect the shared memory state.  We extend Imbs and Raynal’s [OPODIS 2008] optimistic protocol for non-nested transactions to closed nested transactions. TRANSACT 2011 4

  5. Optimistic Approach  Three phases  Execution phase – writes are done in local copies of objects.  Validation phase.  Write phase – local copy values are written in global copies of objects.  Validation of a transaction amounts to ensuring that the values of the objects read by that transaction were not overwritten by other already validated transactions.  We consider validation phase and write phase executed together, atomically. TRANSACT 2011 5

  6. Optimistic approach-Illustration t 1 comes up for t 1 starts r 1 (x) r 1 (y) t 2 validates & validation writes w 2 (x), w 2 (y)  Validation of t 1 fails since x value has been overwritten, and hence t 1 should be aborted. TRANSACT 2011 6

  7. Optimistic approach-Illustration (STM) t 1 comes up for t 1 starts r 1 (x) r 1 (y) t 2 validates & validation writes w 2 (x), w 2 (y)  Validation of t 1 fails since x value has been overwritten, and hence t 1 should be aborted.  x and y values that t 1 read are not from a consistent state.  We want aborted transactions also to read from consistent states  t 1 should be forbidden to read y. TRANSACT 2011 7

  8. Optimistic approach- Imbs & Raynal’s protocol t 1 starts r 1 (x) r 1 (y) t 2 validates & writes w 2 (x), w 2 (y) add t 1 to add t 1 to ow, disallow x.rs x.fbd, y.fbd since t 1 is in y.fbd  The reads are made visible. TRANSACT 2011 8

  9. Optimistic approach- Imbs & Raynal’s protocol  Reads are visible.  When a read step is forbidden, the transaction is aborted and treated as a read-only transaction with the read steps already performed.  Validation of a transaction t succeeds if t is a read- only or t is not in ow. TRANSACT 2011 9

  10. Our extension  Imbs and Raynal’s approach is employed at each level of the nested transaction tree.  For each sub-transaction t, we have  Local copies of objects accessed by t  Set ow  Sets x.rs, x.fbd, for each local object x. TRANSACT 2011 10

  11. Operations of Sub-transaction t  Read  If the value is not available locally, then it is obtained from the nearest ancestor having the value.  In the worst case, the value from the global copy is read.  To read x from an ancestor t’, we need to ensure that t’.x.fbd does not include the transactions from t to t’ and their descendants who have merged with them.  Commit  The commitment conditions as in Imbs and Raynal’s protocol are applied at each level.  In addition, we need to check compatibility.  An aborted transaction’s write steps as well as read steps are ignored (at the parent’s and other ancestors’ levels). TRANSACT 2011 11

  12. Nested Parallelism  For each sub-transaction t,  We allow t as well as its children to execute concurrently.  If t is aborted, then all the descendants of t are also aborted.  t will be committed only after all its children have committed or aborted. TRANSACT 2011 12

  13. Compatibility 2 1 3  t 111 and hence t 11 should occur before t 12.  t 112 and hence t 11 should occur after t 12. t 111 and t 112 are incompatible.  TRANSACT 2011 13

  14. Compatibility  Incompatible sibling transactions are kept track of.  If one commits, then the other, incompatible, transactions are not allowed to commit. TRANSACT 2011 14

  15. Correctness  The schedule resulting from pruning all aborted sub- transactions and their descendants is strictly serializable.  For each aborted sub-transaction t, the schedule obtained by pruning all the aborted descendants of t and including all the committed transactions at the ancestor levels and “closed” versions of the active ancestors is strictly serializable. TRANSACT 2011 15

  16. Discussion  Overhead  Buffers and auxiliary sets (ow, x.rs, x.fbd, etc.) at every non-leaf node, and updating them;  Lock management at every level; and  Transfer of data between levels.  Can sub-transactions be executed independently?  Needed data can be sent as parameters?  Other data can be read directly from global values?  Mixing both will not work in certain cases.  Types of workload  Flexible parallelism – limiting concurrent executions of child and parent, of different children, etc.? TRANSACT 2011 16

  17. Thank you

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend