Sie sind auf Seite 1von 8

Concurrency Control

Lock based Protocol Time-Stamp Protocol

Concurrency control
Concurrency control in database management systems (DBMS), other Transactional objects (objects with states accessed and modified by database transactions), and related distributed applications (e.g., Grid computing and Cloud computing) ensures that database transactions are performed concurrently without the concurrency violating the data integrity of a database. Executed transactions should follow the ACID rules. The DBMS must guarantee that only serializable recoverable schedules are generated.

It also guarantees that no effect of committed transactions is lost, and no effect of aborted (rolled back) transactions remains in the related database.

Transaction ACIDS rules


Atomicity - Either the effects of all or none of its operations remain when a transaction is completed - in other words, to the outside world the transaction appears to be indivisible, atomic. Consistency - Every transaction must leave the database in a consistent state. Isolation - Transactions cannot interfere with each other. Providing isolation is the main goal of concurrency control. Durability - Successful transactions must persist through crashes. Serializability - The property, if its outcome (the resulting database state, the values of the database's data) is equal to the outcome of its transactions executed serially, i.e., sequentially without overlapping in time.

Concurrency control mechanism


The main categories of concurrency control mechanisms are:

Optimistic - Delay the synchronization for a transaction until its end without blocking (read, write) operations, and then abort transactions that violate desired synchronization rules.
Pessimistic - Block operations of transaction that would cause violation of synchronization rules.

Concurrency control in operating systems


Multitasking operating systems, especially real-time operating systems, need to maintain the illusion that all tasks running on top of them are all running at the same time, even though only one or a few tasks really are running at any given moment due to the limitations of the hardware the operating system is running on. Such multitasking is fairly simple when all tasks are independent from each other. However, when several tasks try to use the same resource, or when tasks try to share information, it can lead to confusion and inconsistency. The task of concurrent computing is to solve that problem. Some solutions involve "locks" similar to the locks used in databases, but they risk causing problems of their own such as deadlock. Other solutions are lock-free and wait-free algorithms.

Lock based protocol


Once one transaction is accessing the data, no other transaction is

made to modify the data. A locking protocol is a set of rules to be followed by each transaction to ensure that, even though actions of several transactions might be interleaved , the net effect is identical to executing all transactions in some serial order.

Time-Stamp Protocol
The Time-Stamp Protocol, or TSP is a cryptographic protocol for certifying timestamps using X.509 certificates and public key infrastructure. The timestamp is the signer's assertion that a piece of electronic data existed at or before a particular time. Trusted time-stamping is the process of securely keeping track of the creation and modification time of a document. Security here means that no one--not even the owner of the document--should be able to change it once it has been recorded provided that the time-stamper's integrity is never compromised.

Das könnte Ihnen auch gefallen