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, 23.06.2019 07:30
To check spelling errors in a document, the word application uses the to determine appropriate spelling. internet built-in dictionary user-defined words other text in the document
Answers: 2
question
Computers and Technology, 23.06.2019 21:20
For positive constants a and b, the force between two atoms in a molecule is given f(r) = −a r2 + b r3 , where r > 0 is the distance between the atoms. note: a and b are upper case letters. (a) find f '(r) = (b) find the critical point for f(r). r = (c) find f ''(r) = (d) find the value of r so that f ''(r) = 0.
Answers: 1
question
Computers and Technology, 24.06.2019 00:30
The best definition of an idiom is a. a word or phrase that describes a noun b. a word or phrase describing a verb c. a phrase containing figurative language in which the word expresses a different idea from its exact meaning d. a phrase that compares two unlike objects or ideas
Answers: 2
question
Computers and Technology, 24.06.2019 13:00
Think of a spreadsheet as a giant calculator spread of paper chart data collector
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.03.2021 09:50
question
Computers and Technology, 09.03.2021 09:50
question
Chemistry, 09.03.2021 09:50
question
Mathematics, 09.03.2021 09:50
question
Mathematics, 09.03.2021 09:50
question
Chemistry, 09.03.2021 09:50
question
Chemistry, 09.03.2021 09:50
Questions on the website: 13722362