Concurrency control in real-time database, How concurrency control is achieved in a real-time database? Pessimistic and Optimistic concurrency control mechanism, Explain concurrency control in real-time database
Concurrency Control in Real-Time Database
A database transaction normally involves
one or more data items to be accessed in read mode or write mode. A transaction
is said to be successfully completed if and only if,
- It is able to use all the required data items,
- Make necessary changes to the data items (if any) consistently, and
- Store the changes permanently in the permanent storage.
In this process, a transaction may
consume considerable time depends on the size of a transaction, the number of
data items needed, the availability of CPU, etc. In a conventional database, to
increase the number of transactions that is completed in a given time, we need
to execute several transactions simultaneously. Here we need to ensure ACID
properties for individual transactions. Execution of all active transactions
concurrently is referred as concurrent transactions.
Concurrency control is about ensuring
non-interference among transactions by restricting concurrent transactions to
be serializable. A concurrent execution of a set of transactions is said to be
serializable if and only if the database operations carried out by them is equivalent
to some serial execution of these transactions.
Concurrency control protocols usually
adopt any of the following types of approaches; concurrency control mechanisms used in a conventional database may not
fit for real-time database. Hence, the modified versions of these protocols
according to the real-time requirements of a database are presented below;
- Pessimistic Concurrency Control Protocols(Lock based protocols)
- Achieving concurrency control by disallowing certain transactions based on the data items they locked. CLICK to continue.
- Optimistic Concurrency Control Protocols
- Achieving concurrency control by allowing all the transactions and pruning (or validating) them at the time of commit for further allowing them. CLICK to continue.
- Speculative Concurrency Control Protocols
- Achieving concurrency control by applying the combination of both pessimistic and optimistic protocols on a transaction. CLICK to continue.
- Multi-version Concurrency Control Protocols
- CLICK to continue.
********************
Go to REAL TIME DATABASE Home page
No comments:
Post a Comment