subject

Suppose a system handles deadlocks by detecting them periodically and resolving them. In such a system, when a process requests a resource, it is granted to the process if the resource is free. Otherwise, an entry for the requesting proc ess is added to the end of the wait queue for the resource A process whose request could not be granted is allowed to request other resources and proceed. However it cannot finish all its work until it obtains all the resources it needs/requests. When a process terminates (either after finishing all its work or aborting prematurely), it releases all its resources When a resource is released by a process, the resource is granted to the first process in the wait queue. The wait-queue is maintained on a First Come First Served (FCFS) basis
On a periodic check for deadlocks, the system identifies all the that are currently deadlocked and selects a subset of them to abort (ie., terminate prematurely) in order to resolve all the existing deadlocks processes
Now, consider the following sequence of resource requests in the system (note that REQ(A, B) indicates a request by process A for resource B) .
REQ(P3, R7) .
REQ(P5, R5) .
REQ(P4,R6) .
REQ(P7, R3)
REQ(P2, R8)
REQ(P8, R2) .
REQ(P1,R9) .
REQ(P6, R4) .
REQ(P9,R1) .
REQ(P5, R6) .
REQ(P4, R8)
REQ(P2, R2) .
REQ(P6, R9)
REQ(P1, R8) .
REQ(P3,R3) .
REQ(P4, R1) .
REQ(P7, R6) .
REQ(P9, R3)
REQ(P3, R5) .
REQ(P2, R4) .
REQ(P8, R9)
At the end of processing the above sequence of requests, some of the processes in the system are deadlocked. Construct a wait-for graph for the sequence of requests above and identify the processes that are deadlocked Based on the wait-for graph, determine which of the following pairs of processes can be aborted in order to resolve all the existing deadlocks in the system?
a) P6 and P7
b) P7 and P2
c) P8 and P4
d) P2 and P4

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 23:10
Write a method that accepts a string object as an argument and returns the number of words it contains. for instance, if the argument is "four score and seven years ago", the method should return the number 6. demonstrate the method in a program that asks the user to input a string and then passes that string into the method, printing out whatever the method returns.
Answers: 3
question
Computers and Technology, 22.06.2019 08:30
Today is the anniversary of me being on yet, i don't need it anymore! here's a picture of my dog wearing a bowtie! my question is, how do i delete my account?
Answers: 1
question
Computers and Technology, 22.06.2019 11:10
Which are not examples of chronic or persistent stress? moving
Answers: 1
question
Computers and Technology, 22.06.2019 21:30
How do you take a green screen out of the video while editing?
Answers: 2
You know the right answer?
Suppose a system handles deadlocks by detecting them periodically and resolving them. In such a syst...
Questions
question
Mathematics, 09.09.2021 04:50
question
Mathematics, 09.09.2021 04:50
question
Mathematics, 09.09.2021 04:50
Questions on the website: 13722367