L22.sp11 - These slides derived from slides posted by the...

Info iconThis preview shows pages 1–7. Sign up to view the full content.

View Full Document Right Arrow Icon
Copyright © George Coulouris, Jean Dollimore, Tim Kindberg 2001 email: authors@cdk2.net This material is made available for private study and for direct use by individual teachers. It may not be included in any product or employed in any service without the written permission of the authors. Viewing: These slides must be viewed in slide show mode. Transactions and Concurrency Control Readings: Sections 13.5, 13.6 of 4 th edition of textbook These slides derived from slides posted by the textbook authors.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
2 Nested transactions transactions may be composed of other transactions several transactions may be started from within a transaction we have a top-level transaction and subtransactions which may have their own subtransactions T : top-level transaction T 1 = openSubTransaction T 2 = openSubTransaction openSubTransaction openSubTransaction openSubTransaction openSubTransaction T 1 : T 2 : T 11 : T 12 : T 211 : T 21 : prov.commit prov. commit abort prov. commit prov. commit prov. commit commit
Background image of page 2
3 Nested transactions To a parent, a subtransaction is atomic with respect to failures and concurrent access transactions at the same level (e.g. T 1 and T 2) can run concurrently but access to common objects is serialised a subtransaction can fail independently of its parent and other subtransactions when it aborts, its parent decides what to do, e.g. start another subtransaction or give up
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
4 Advantages of nested transactions (over flat ones) Subtransactions may run concurrently with other subtransactions at the same level. this allows additional concurrency in a transaction. when subtransactions run in different servers, they can work in parallel. e.g. consider the branchTotal operation it can be implemented by invoking getBalance at every account in the branch. these can be done in parallel when the branches have different servers Subtransactions can commit or abort independently. this is potentially more robust a parent can decide on different actions according to whether a subtransaction has aborted or not
Background image of page 4
5 Commitment of nested transactions A transaction may commit or abort only after its child transactions have completed. A subtransaction decides independently to commit provisionally or to abort . Its decision to abort is final. When a parent aborts, all of its subtransactions are aborted. When a subtransaction aborts, the parent can decide whether to abort or not. If the top-level transaction commits, then all of the subtransactions that have provisionally committed can commit too, provided that none of their ancestors has aborted.
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
6 Summary on transactions atomic in the presence of concurrent transactions which can be achieved by serially equivalent executions atomic in the presence of server crashes they save committed state in permanent storage they use strict executions to allow for aborts they use tentative versions to allow for commit/abort
Background image of page 6
Image of page 7
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 18

L22.sp11 - These slides derived from slides posted by the...

This preview shows document pages 1 - 7. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online