Optimistic Concurrency Control – Broadcast Commit (OCC-BC)



Optimistic Concurrency Control – Broadcast Commit (OCC-BC) in Real-Time Database.



Optimistic Concurrency Control – Broadcast Commit (OCC-BC)


This works as follows;

  • Transactions are reading and writing the required data items freely without any blocking.
  • When any of the transactions reaches commit, then that transaction broadcasts the decision to other concurrently ongoing transactions.
  • Upon receiving this message, each ongoing transaction checks whether they have any conflict with the about-to-commit transaction.
  • If any transactions find conflict with the about-to-commit transaction, then those transactions aborts and restarts immediately.

Example:

Let us assume that transactions T1, T2, and T3 are operating concurrently. Assume that transactions are working as follows;
T1 is working on data items A and B,
T2 is working on data items C, and
T3 is working on data items B and D.
These transactions can be of any size.
If T1 is reaching its commit statement, ie., the last statement of the transaction, it broadcasts the decision to other transactions.
T2 reads this message and finds no conflict because it is working on a different data item C. Hence it continues.
T3 reads this message and finds a conflict. T3 is also working on a data item B where T1 did something. Hence, T3 aborts and restarts.

Advantages:


  • If a transaction reaches commit (the validating transaction) and broadcast its decision, the commit is guaranteed.
  • The method detects conflicts earlier than the basic OCC algorithm, resulting in both, earlier restarts and less wasted resources, which increases the chances of meeting transactions’ deadlines.

Disadvantages:

  • It does not consider priorities.

Note: OCC – Broadcast Commit does not considering priorities, hence it may not work well in the real-time database environment.  For example, low-priority transactions that reach validation unilaterally commit and cause conflicting higher priority transactions to be restarted. This may result in the affected high priority transactions missing their deadlines.


***********************



Go to REAL TIME DATABASE Home page



 




No comments:

Post a Comment

Wikipedia

Search results

Followers