1 / 16

Concurrency Control in Advanced Database Applications

Concurrency Control in Advanced Database Applications. Dr. Muhammad Shafique 31 March 2007. Outline. Advanced computer-based applications An example Nested and Multi-level transactions CC requirements in advanced database applications Advanced Concurrency control techniques

lula
Download Presentation

Concurrency Control in Advanced Database Applications

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Concurrency ControlinAdvanced Database Applications Dr. Muhammad Shafique 31 March 2007 CC in Adv. DB Applications

  2. Outline • Advanced computer-based applications • An example • Nested and Multi-level transactions • CC requirements in advanced database applications • Advanced Concurrency control techniques • Concurrency control requirements in advanced databases • Supporting long transactions • Altruistic locking • Snapshot validation • Semantic-based concurrency control • Sagas and compensation functions • Supporting coordination CC in Adv. DB Applications

  3. Reference “Concurrency Control in Advanced Database Applications” Naser S. Barghouto, and gail E. Kaiser, ACM Computing Surveys, Volume 23, number 3, September 1991, pp269-317 NOTE: Please focus on pages 269 to 297 (Sections 1 to 6) CC in Adv. DB Applications

  4. Advanced Computer-based Applications • Traditional database applications • Banking • Airline reservation systems, etc. • Advanced database applications • Computer Supported Cooperative Work (CSCW) • Computer-aided design (CAD) • Computer-aided manufacturing (CAM) • Network management • Financial instruments trading • Medical informatics • Office automation • Software development environments CC in Adv. DB Applications

  5. An Example • Software project • Four modules, A, B, C, and D • Modules A, B, and C consists of procedures and declarations • Module D consists of library procedures called by the other modules CC in Adv. DB Applications

  6. Nested Transactions • Nested transactions • A nested transaction is a composition of a set of sub-transactions; each sub-transaction can itself be a nested transaction. • To other transactions, only top-level nested transaction is visible and appears as a normal atomic transaction. • Internally sub-transactions are run concurrently and their actions are synchronized by an internal concurrency control mechanisms • A sub-transaction can fail and can be restarted or replaced by another sub-transaction without causing the whole nested transaction to fail or restart • An example CC in Adv. DB Applications

  7. Nested Transactions CC in Adv. DB Applications

  8. Multi-level Transactions • Multi-level transaction classes • Transactions in some systems can be grouped into levels. Level one groups all transactions in the system whereas the subsequent levels group transactions that are more strongly related to each other • A strong relation between two transactions might be that they often need to access the same objects at the same time with non-conflicting way. CC in Adv. DB Applications

  9. Advanced Concurrency Control Techniques • Traditional DBMS enforce serializable executions of transactions wrt read and write operations • No semantic consistency constraints on data • If enough information is known about the transactions and operations, a non-serializable but consistent schedule can be constructed • CC requirements in advanced database applications • Supporting long transactions • Supporting user control • Supporting synergistic cooperation • Support for complex objects CC in Adv. DB Applications

  10. Advanced Concurrency Control Techniques • Supporting long transactions • Extending serializability • Altruistic locking • Snapshot validation • Order-preserving serializability for multi-level transactions • Relaxing serializability • Semantic-based concurrency control • Sagas • Conflict predicate correctness • Dynamic restructuring of transactions CC in Adv. DB Applications

  11. Advanced Concurrency Control Techniques • Altruistic locking • Resources should be locked only for the needed time • Makes use of access pattern of a transaction to decide on which resources to release • Negative access pattern and positive access pattern • Wake of a transaction --- the set of all data items that have been locked and then released • Extended basic 2PL with release option should adhere to two conditions • No two transactions can hold locks on the same data item simultaneously unless one of them has locked and released the object before the other locks it (Later lock holder is said to be in wake of the former) • If a transaction is in the wake of another transaction then it must be completely in the wake of that transaction. CC in Adv. DB Applications

  12. Advanced Concurrency Control Techniques • Snapshot validation • Extension of optimistic CC technique • Serious VS non-serious conflicts • Solutions to starvation problem • Substitute transaction • Order-preserving serializability for multi-level transactions • Commutativity of operations CC in Adv. DB Applications

  13. Advanced Concurrency Control Techniques • Relaxing serializability • Semantic-based concurrency controlsemantic consistency constraint rather than serializability constraint • Two transactions are said to be compatible if their operations can be interleaved at certain points without violating semantic consistency • A transaction is said to be semantically atomic if all its steps are executed or if any executed steps are eventually followed by their counter-steps CC in Adv. DB Applications

  14. Advanced Concurrency Control Techniques • Relaxing serializability • Sagas • Sagas are LTs that can be broken up into a collection of subtransactions that can be interleaved in any way with other transactions. • A saga is a collection of unrelated transactions which guarantees that all its sub-transactions will be completed or they will be compensated. • Compensation functions rather than simple rollback • A compensation function undoes the actions performed by a transaction from a semantic point of view. For example, reserving a seat and compensating with canceling the seat. • In SDEs, a transaction to fix a bug can be modeled as a saga that consists of edit a file, compile source code, and run the debugger. CC in Adv. DB Applications

  15. Advanced Concurrency Control Techniques • Supporting coordination • Coordination VS synergistic cooperation • Pessimistic coordination • Optimistic coordination • Synergistic cooperation • Coordination primitives • Interactive notification • The group paradigm • Cooperating transactions • Transaction groups CC in Adv. DB Applications

  16. Summary • Concurrency control techniques • Locking techniques • Timestamp ordering techniques • Multi-version concurrency control techniques • Optimistic concurrency control techniques • Advanced Concurrency control techniques Thank you CC in Adv. DB Applications

More Related