The Gateway to Computer Science Excellence
0 votes
242 views

in Databases by Junior (529 points) | 242 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

by Active (1.7k points)
Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
50,737 questions
57,302 answers
198,306 comments
105,007 users