search
Log In
1 vote
533 views

in Databases 533 views
0
C is correct

1 Answer

3 votes

In Wait Die System :

  • if Old process requests for resource held by young process then Old one waits.
  • if Young process requests for resource held by older process then younger process aborts or is rolled back

In Wound-wait System :

  • If Old process requests for a resource held by a younger process then Old forces(wounds) the younger one to be rolled back(Preempts) and start again with the same timestamp after a certain delay.
  • If young process requests for a certain resource held by older process then young has to wait for old to finish its execution and release the resource.

Hence here in the given question since P has been running for several days so P is the Old Process and Q is the young process.

So :

(a) In wait and die if Old(P) needs a resource held by younger one(Q) then P (Old) should wait.

(b) In wait and die if Young (Q) needs a resource held by Old(P) , then Q(Young) aborts.

(c) In wound-Wait system if Old(P) needs a resource held by younger one(Q) then P(Old) forces Q(Young) to get rolled back or abort.

(d) In Wound-wait system  if Young (Q) needs a resource held by Old(P) then Young(Q) has to wait.

Hence answer is (C)

For more details you can refer to : https://stackoverflow.com/questions/32794142/what-is-the-difference-between-wait-die-and-wound-wait

Related questions

2 votes
0 answers
2
230 views
Answer given is 24 which is the no. of serial schedules possible, but my doubt is since no two transactions share same variables then all the schedules possible will be conflict serializable then why only serial schedules are considered ?
asked Jan 26, 2018 in Databases ashish pal 230 views
1 vote
2 answers
3
264 views
Whether the given schedule is conflict serializable or view serializable or none.
asked Jan 29, 2017 in Databases Kai 264 views
0 votes
1 answer
4
151 views
Consider the following transaction T1 T2 T3 R(A) W(A) commit W(A) commit W(A) commit Which of the following is TRUE regarding above transaction? (1) Transaction is view serializable since it has a view-equivalent serial schedule < T1, T2 T3 > (2) Transaction ... a view-equivalent serial schedule < T3, T2 T1 > (4) Transaction is not serializable Your Answer: 3 Correct Answer: 1 Status: incorrect
asked Jan 19, 2017 in Databases vishwa ratna 151 views
...