Question

Explain how timestamps are used for concurrency control and deadlock prevention. Also explain how does the...

Explain how timestamps are used for concurrency control and deadlock prevention. Also explain how does the Thomas write rule improve concurrency?

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Concurrency is a property of Database management system to allow more than one user to access and commit transactions. Concurrency control is the method accomplished in Database management system for overcoming the problem of conflicts occurring due to simultaneous operations. Simultaneous writing and reading of same data by different users is always against the idea of concurrency. Concurrency control is necessary for ensuring atomicity and isolation of transactions.

Deadlock is a situation in which every process is waiting for another processes, to get resources relieved from them. So all the processes will be blocked from getting executed. Deadlock prevention is possible by imposing restrictions on processes and resource usage. Negating any of the four conditions of deadlock will prevent a deadlock. Concurrency control are basically of two categories – Lock based protocols and Timestamp based protocols.

Timestamp-based algorithm as the name indicates employs timestamp to order the execution of transactions. All contradicting read and write operations are executed in timestamp order. Either System time or Logical count is used as a timestamp. So the transaction which appears first will get higher priority. In this method not every transaction is allowed to wait for another transaction. So it removes the chance of deadlocks. There are mainly two ways to prevent deadlock. They are wound-wait and wait-die. In wait-die an older transaction is allowed to wait a newer transaction. Whereas the newer transaction cannot pre-empt a resource held by older process. So the newer transaction will be aborted to avoid deadlock. Wound-wait works just opposite to wait-die as younger transaction is allowed to wait for older transactions. But if an older transaction need a resource held by younger transaction, then that resource will be pre-empted and the newer transaction will be aborted.

Thomas write rule is a modified version of timestamp protocol. It gives user the provision for ignoring outdated writes. User can accomplish concurrency in Thomas write rule with view serializable schedules. This is the most significant improvement. It ignores the obsolete write operations. This protocol checks conflict serializable and disregards Write operations by changing the check operations.

Add a comment
Know the answer?
Add Answer to:
Explain how timestamps are used for concurrency control and deadlock prevention. Also explain how does the...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT