Knowee
Questions
Features
Study Tools

How do optimistic concurrency control techniques differ from other concurrency control techniques? Why they are also called validation or certification techniques? Discuss the typical phases of an optimistic concurrency control method.

Question

How do optimistic concurrency control techniques differ from other concurrency control techniques? Why they are also called validation or certification techniques? Discuss the typical phases of an optimistic concurrency control method.

🧐 Not the exact question you are looking for?Go ask a question

Solution

Optimistic Concurrency Control (OCC) techniques differ from other concurrency control techniques, such as pessimistic concurrency control, in their approach to handling conflicts.

  1. Approach to Handling Conflicts:

    • In pessimistic concurrency control, locks are used to prevent conflicts from occurring. This means that if a transaction wants to access a data item that is already being used by another transaction, it must wait until the other transaction releases it. This can lead to delays and inefficiencies, especially in systems with high contention.
    • On the other hand, OCC assumes that conflicts are rare and allows transactions to proceed without locks. Instead, it checks for conflicts at the end of each transaction. If a conflict is detected, the transaction is aborted and restarted.
  2. Why are they called validation or certification techniques?

    • OCC techniques are also known as validation or certification techniques because they validate or certify that a transaction has not caused any conflicts before it is committed. This is done in the validation phase, where the system checks if the transaction has read any data items that were modified by other transactions that committed during its execution. If such a conflict is detected, the transaction is aborted and restarted.
  3. Phases of an Optimistic Concurrency Control Method:

    • Read Phase: The transaction reads from the database without acquiring any locks. Any changes made by the transaction are made to a local copy of the database.
    • Validation Phase: The system checks if the transaction has read any data items that were modified by other transactions that committed during its execution. If such a conflict is detected, the transaction is aborted and restarted.
    • Write Phase: If the transaction passes the validation phase, it is allowed to write its changes to the database. This is done atomically to ensure consistency.

In summary, OCC techniques are more optimistic in their approach to handling conflicts, assuming that they are rare and allowing transactions to proceed without locks. They are called validation or certification techniques because they validate or certify transactions before they are committed. The typical phases of an OCC method are the read phase, validation phase, and write phase.

This problem has been solved

Similar Questions

n a database system employing both pessimistic and optimistic concurrency control mechanisms, which of the following scenarios would typically be handled more efficiently by optimistic concurrency control?A high volume of transactions where most of them update a common set of data.Transactions that are mostly read-only and seldom update the database.Transactions in a banking system where account balances are frequently updated.

Determine the need of concurrency control.

Which of the following concurrency control techniques ensures that transactions maintain consistency by preventing the occurrence of phenomena like dirty reads, non-repeatable reads, and phantom reads?Multiversion Concurrency Control (MVCC)Two-Phase Locking (2PL)

Compare concurrency and parallelism.

Which of the following is not a method for achieving synchronization in concurrent systems?a.Locking mechanismsb.Scheduling algorithmsc.Message passingd.Atomic operations

1/2

Upgrade your grade with Knowee

Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.