Question: Consider a system that deals with deadlocks by periodically detecting them and resolving them. Whenever a process requests a resource, it is granted to the
Consider a system that deals with deadlocks by periodically detecting them and resolving them. Whenever a process requests a resource, it is granted to the process if the resource is free. Otherwise, the process is blocked, waiting for the resource.
Whenever a process releases a resource, if there are other processes waiting for that resource, the resource is granted to the first waiter in the list. All other waiters now wait for the new holder of the resource to release the resource.
Periodically, a deadlockdetection algorithm is run. This algorithm builds a waitfor graph for the processes and identifies the set of processes that are deadlocked. Note that each process in the system corresponds to a vertex in the waitfor graph and an arc mathrmPirightarrow mathrmPj in the waitfor graph represents the fact that process Pi is waiting for a resource currently held by process Pj When the system is ascertained to have deadlocks ie the waitfor graph has cycles one or more processes that are deadlocked ie part of the cycles in the waitforgraph are aborted so that the system is free from deadlocks ie there are no cycles in the resulting waitfor graph
Now, consider the following sequence of resource requests in the system note that REQA B indicates a request by process A for resource B :
REQP R
REQP R
REQP R
REQP R
REQP R
REQP R
REQP R
REQP R
REQP R
REQP R
REQP R
REQP R
REQP R
REQP R
After processing the above sequence of requests, let the deadlockdetection algorithm be run. Determine all of the processes that are deadlocked. Identify the process, from below, that can be aborted so that the system becomes deadlock free?
A P
B P
C P
D P
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
