![]() ![]() With timestamping, there are no locks to prevent transactions seeing uncommitted changes, and all physical updates are deferred to commit time. Another method used in some DMBS is timestamping. ![]() Two-phase locking is not the only approach to enforcing database consistency. The technical names for the two phases of the locking protocol are the `lock-acquisition phase' and the `lock-release phase'. After releasing a lock, a transaction must never go on to acquire any more locks.Thus no item can be accessed without first obtaining the correct lock. Before operating on any item, a transaction must acquire at least a shared lock on that item.If all transactions obey the `two-phase locking protocol', then all possible interleaved executions are guaranteed serialisable. If a transaction is allowed to release locks before the transaction has completed, and is also allowed to acquire more (or even the same) locks later then the benifit or locking is lost. The presence of locks does not guarantee serialisability. A message is passed to the victim and depending on the system the transaction may or may not be started again automatically.The rollback terminates the transaction, undoing all its updates and releasing all of its locks.rollback `victim' transaction and restart it.If a set of transactions is considered to be deadlocked: ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |