The topics name are given below. Explain
o Transactions and Schedules
o Concurrent Execution of Transactions
o Need for Concurrency Control
o Serializability
o Locking
o Deadlock
- Actually, a transaction is the DBMS’s abstract view of a user program: a sequence of reads and writes. Users submit transactions, and can think of each transaction as executing by itself. Whereas a schedule is list of actions from a set of transactions.
- Concurrent transactions means 'two or more transactions can run simultaneously'. It increases Performance and throughput. While one transaction is waiting for a page to be read from the disk, the CPU can process another transaction.
- Serializability is the concurrency scheme. It ensures that a schedule for executing concurrent transactions is equivalent to one that executes the transactions serially in some order. It assumes that all accesses to the database are done using read and write operations.
- A lock is used when multiple users need to access a database concurrently. And Locking is a mechanism used by Database Engines to synchronize access by multiple users to the same piece of data at the same time. When a transaction modifies a piece of data, it holds the lock protecting the modification until the end of the transaction.All locks held by a transaction are released when the transaction completes (either commits or rolls back).
- At last, a deadlock occurs if each of two transactions (for example, A and B) needs exclusive use of some resource (for example, a particular record in a data set) that the other already holds. Transaction A waits for the resource to become available. However, if transaction B is not in a position to release it because it, in turn, is waiting on some resource held by A, both are deadlocked and the only way of breaking the deadlock is to cancel one of the transactions, thus releasing its resources.
0 Comments
Please add nice comments or answer ....