Q46 In a database system unique time stamps are assigned to each transaction using Lamports logical clock Let TST1 and TST2 be the time stamps of transactions T1 and T2 respectively Besides T1 holds a lock on the resource R and T2 has requested a conflicting lock on the same resource R The following algorithm is used to prevent deadlocks in the database assuming that a killed transaction is restarted with the same timestamp gate computer science 2017
The Eduladder is a community of students, teachers, and programmers just interested to make you pass any exams. So we solve previous year question papers for you.
See Our team
Wondering how we keep quality?
Got unsolved questions?

Ask Questions
Hey! Want to work with us? Our youtube channel See our Jd Want to apply? Do it today

Use Me  ?

New searches
GATE-Computer-Science-Engineering-2017-->View question


Q.46) In a database system, unique time stamps are assigned to each transaction using Lamport’s logical clock. Let TS(T1) and TS(T2) be the time stamps of transactions T1 and T2 respectively. Besides, T1 holds a lock on the resource R, and T2 has requested a conflicting lock on the same resource R. The following algorithm is used to prevent deadlocks in the database assuming that a killed transaction is restarted with the same timestamp. -gate computer science 2017

if  TS(T2)
      T1 is killed
else T2  waits.

Assume any transactions that is not killed terminates eventually. Which of the following is TRUE about the database system that uses the above algorithm to prevent deadlocks ?
A) The database system is both deadlock-free and starvation- free.
B) The database system is deadlock- free, but not starvation-free.
C) The database system is starvation-free but not deadlock- free.
D) The database system is neither deadlock- free nor starvation-free.


By:satyashiromani

Taged users:
|Msshikhil|aksingh1818|prajwalamv|avaishnavi8888gmailcom|debikadebnath|harshshah822|bekezela17|Giri|satyashiromani|msumesh|rajeshdotsinghgmailcom|prabhat2346|Khushveer|Astha-Tiwari-|nidhi-gupta|pankaj|mmodi1995|winmyintthein|Akhil-Raj|sukhil-vadakkan|Shivaratnakumar-Patil|244|Mokshikaa|wangwe|tanya|salazar|praveen-kumar-verma-|fmtatenda|soumya|amrita98

Likes:
Be first to like this question

Dislikes:
Be first to dislike this question

Talk about thisDelete|Like|Dislike|


Answers

A) The database system is both deadlock-free and starvation- free.

Explanation: 
Given, if TS(T2) <TS(T1) then T1 is killed else T2 waits.
T1 holds a lock on the resource R
T2 has requested a conflicting lock on the same resource R
According to algo, TS(T2) <TS(T1) then T1 is killed else T2 will wait. So in both cases neither deadlock will happen nor starvation. Therefore, option A is correct

This explanation is contributed by Deepak Raj


deepuckraj

Likes:
|deepuckraj

Dislikes:
Be first to dislike this answer
Talk about this|Once you have earned teacher badge you can edit this questionDelete|Like|Dislike|
------------------------------------

Can you help us to add better answer here? Please see this

Loading...


Not the answer you're looking for? Browse other questions from this Question paper or ask your own question.

Join eduladder!