Presentation is loading. Please wait.

Presentation is loading. Please wait.

Optimistic CC Performance Evaluation Criterion 1. Degree of Concurrency Less reshuffle  High degree of concurrency 2. Resources used to recognize - Lock.

Similar presentations


Presentation on theme: "Optimistic CC Performance Evaluation Criterion 1. Degree of Concurrency Less reshuffle  High degree of concurrency 2. Resources used to recognize - Lock."— Presentation transcript:

1 Optimistic CC Performance Evaluation Criterion 1. Degree of Concurrency Less reshuffle  High degree of concurrency 2. Resources used to recognize - Lock tables - Time stamps - Read/write sets - Complexity 3. Costs - Programming ease Scheduler Recognizes or Reshuffles history

2 Optimistic CC Performance General Comments Information needed by Concurrency Controllers –Locks on database objects (System-R, Ingres, Rosenkrantz…) –Time stamps on database objects (Thomsa, Reed) –Time stamps on transactions (Kung, SDD-1, Schlageter, Bhargava…) Observations –Time stamps mechanisms more fundamental than locking –Time stamps carry more information –Checking locks costs less than checking time stamps

3 Optimistic CC Performance General Comments (cont.) When to synchronize –First access to an object (Locking, pessimistic validation) –At each access (question of granularity) –After all accesses and before commitment (optimistic validation) Fundamental notions –Rollback –Identification of useless transactions –Delaying commit point –Semantics of transactions

4 Optimistic CC Performance Probability that two transactions do not share an object Lower bound on this problem Maximum problem that two transactions will share an object BSMProbability of conflict 5100.0576 10500.0025 201000.113 Probability of cycle = 0(PC 2 )  small

5 Optimistic CC Performance Concurrency/Multiprogramming level is low Example: I/O=.005 seconds CPU=.0001 seconds Trans size=5 Time to execute trans.=.0255 seconds For another trans. to meet this trans. in the system Arrival rate > or > 40 per second

6 Optimistic CC Performance R1R1 R2R2 R3R3 RnRn... W1W1 W2W2 W3W3 WnWn Example: Locking: This history not allowed W 2 is blocked by R 1 T 2 cannot finish before T 1 What if T 1 is a log trans. and T 2 is a small trans.? T 1 blocks T 2 ; can block T 3 … T n if Optimistic [Kung] T i (i = 2,…,n) commit. W i saved for valid n R 1 validated with W i, T 1 aborted switch to

7 Optimistic CC Performance Try this or this switch Optimistic Validation (first modification) T i ’s can commit, W i and R i saved from validation W 1 validates with W i and R i T 1 aborted if validation fails (second modification) Switch R 1 to the right after W 2, W 3 …W n Switch W 1 to the left before R n, R n-1 …R 2 If R 1 and W 1 are adjacent, T 1 is successful


Download ppt "Optimistic CC Performance Evaluation Criterion 1. Degree of Concurrency Less reshuffle  High degree of concurrency 2. Resources used to recognize - Lock."

Similar presentations


Ads by Google