Operating System Deadlock Galvin


Published on

Published in: Technology
No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide
  • Enumeration:- The act of counting; reciting numbers in ascending order or A numbered list
  • Operating System Deadlock Galvin

    1. 1. Operating System: DEADLOCKS SONALI C. BSc (IT) UDIT Deadlocks-Galvin sonali C.
    2. 2. What is Deadlock? <ul><li>A set of blocked processes each holding a resource and waiting to acquire a resource held by another process in the set. </li></ul><ul><li>Example </li></ul><ul><ul><li>System has 2 disk drives. </li></ul></ul><ul><ul><li>P 1 and P 2 each hold one disk drive and each needs another one. </li></ul></ul><ul><li>Example </li></ul><ul><ul><li>2 train approaches each other at crossing, both will come to full stop and neither shall start until other has gone. </li></ul></ul>Deadlocks-Galvin sonali C.
    3. 3. Deadlock Example <ul><li>Traffic only in one direction. </li></ul><ul><li>Each section of a bridge can be viewed as a resource. </li></ul><ul><li>If a deadlock occurs, it can be resolved if one car backs up (preempt resources and rollback). </li></ul><ul><li>Several cars may have to be backed up if a deadlock occurs. </li></ul><ul><li>Starvation is possible </li></ul>Deadlocks-Galvin sonali C.
    4. 4. What are we covering? <ul><li>To develop a description of deadlocks, which prevent sets of concurrent processes from completing their tasks </li></ul><ul><li>To present a number of different methods for preventing or avoiding deadlocks in a computer system. </li></ul>Deadlocks-Galvin sonali C.
    5. 5. SYSTEM MODEL <ul><li>Each resource type R i has W i instances. </li></ul><ul><li>Resource types R 1 , R 2 , . . ., R m </li></ul><ul><ul><ul><li>CPU cycles, memory space, I/O devices </li></ul></ul></ul><ul><li>System has 2 CPUs, then resource type CPU has 2 instance. </li></ul><ul><li>Each process utilizes a resource as follows: </li></ul><ul><ul><li>request (system call) </li></ul></ul><ul><ul><li>use </li></ul></ul><ul><ul><li>release (system call) </li></ul></ul>Deadlocks-Galvin sonali C.
    6. 6. DEADLOCK CHARACTERIZATION <ul><li>Deadlock can arise if four conditions hold simultaneously. </li></ul><ul><ul><li>Mutual exclusion: only one process at a time can use a resource. </li></ul></ul><ul><ul><li>Hold and wait: a process holding at least one resource is waiting to acquire additional resources held by other processes. </li></ul></ul>Deadlocks-Galvin sonali C.
    7. 7. <ul><ul><li>No preemption: a resource can be released only voluntarily by the process holding it, after that process has completed its task. </li></ul></ul><ul><ul><li>Circular wait: there exists a set { P 0 , P 1 , …, P 0 } of waiting processes such that P 0 is waiting for a resource that is held by P 1 , P 1 is waiting for a resource that is held by </li></ul></ul><ul><li>P 2 , …, P n –1 is waiting for a resource that is held by P n , and P 0 is waiting for a resource that is held by P 0 . </li></ul>Deadlocks-Galvin sonali C. CONT…
    8. 8. RESOURCE-ALLOCATION GRAPH <ul><li>Deadlocks can be described in term of directed graph- SYSTEM RESOURCE-ALLOCATION GRAPH . </li></ul><ul><li>A set of vertices V and a set of edges E . </li></ul><ul><ul><li>V is partitioned into two types: </li></ul></ul><ul><ul><ul><li>P = { P 1 , P 2 , …, P n }, the set consisting of all the processes in the system. </li></ul></ul></ul><ul><ul><ul><li>R = { R 1 , R 2 , …, R m }, the multi-set consisting of all resource types in the system. </li></ul></ul></ul><ul><ul><li>request edge – directed edge P 1  R j </li></ul></ul><ul><ul><li>assignment edge – directed edge R j  P i </li></ul></ul>Deadlocks-Galvin sonali C.
    9. 9. RESOURCE-ALLOCATION GRAPH <ul><li>Process </li></ul><ul><li>Resource Type with 4 instances </li></ul><ul><li>P i requests instance of R j </li></ul><ul><li>P i is holding an instance of R j </li></ul>Deadlocks-Galvin sonali C. CONT… P i P i R j R j
    10. 10. EXAMPLE OF RESOURCE-ALLOCATION GRAPH Deadlocks-Galvin sonali C. CONT…
    11. 11. RESOURCE-ALLOCATION GRAPH WITH A DEADLOCK <ul><li>P1 -> R1 -> P2 -> R3 -> P3 -> R2 -> P1 </li></ul><ul><li>P2 -> R3 -> P3 -> R2 -> P1 </li></ul>Deadlocks-Galvin sonali C. CONT…
    12. 12. GRAPH WITH A CYCLE BUT NO DEADLOCK <ul><li>P1 -> R1 -> P3 -> R2 -> P1 </li></ul><ul><li>No deadlock </li></ul><ul><li>P4 may release its instance of resource R2 </li></ul><ul><li>Then it can be allocated to P3 </li></ul>Deadlocks-Galvin sonali C. CONT…
    13. 13. <ul><li>If graph contains no cycles  no deadlock. </li></ul><ul><li>If graph contains a cycle  </li></ul><ul><ul><li>if only one instance per resource type, then deadlock. </li></ul></ul><ul><ul><li>if several instances per resource type, possibility of deadlock. </li></ul></ul>RESOURCE-ALLOCATION GRAPH Deadlocks-Galvin sonali C. CONT…
    14. 14. METHODS FOR HANDLING DEADLOCK <ul><li>We can deal with DL problem in 3-ways: </li></ul><ul><ul><li>Prevention/Avoidance </li></ul></ul><ul><ul><ul><li>Ensure that the system will never enter a deadlock state. </li></ul></ul></ul><ul><ul><li>Detection/Correction </li></ul></ul><ul><ul><ul><li>Allow system to enter a deadlock state and then recover. </li></ul></ul></ul><ul><ul><li>Ignorance </li></ul></ul><ul><ul><ul><li>Ignore problem and pretend that deadlocks never occur </li></ul></ul></ul><ul><ul><ul><li>Used by most operating systems, including UNIX . </li></ul></ul></ul>Deadlocks-Galvin sonali C.
    15. 15. METHODS FOR HANDLING DEADLOCK <ul><li>Prevention </li></ul><ul><ul><li>Set of methods for ensuring that at least one of the condition cannot hold. </li></ul></ul><ul><li>Avoidance </li></ul><ul><ul><li>OS be given information about the resources request used in advance </li></ul></ul>Deadlocks-Galvin sonali C. CONT…
    16. 16. DEADLOCK PREVENTION <ul><li>Restrain the ways request can be made. </li></ul><ul><li>Mutual Exclusion – not required for sharable resources; must hold for non-sharable resources. </li></ul><ul><ul><li>A printer cannot simultaneously shared by several process </li></ul></ul>Deadlocks-Galvin sonali C.
    17. 17. DEADLOCK PREVENTION <ul><li>Hold and Wait – must guarantee that whenever a process requests a resource, it does not hold any other resources. </li></ul><ul><ul><ul><li>Require process to request and be allocated all its resources before it begins execution </li></ul></ul></ul><ul><ul><ul><li>Or…allow process to request resources only when the process has none. </li></ul></ul></ul><ul><ul><ul><li>Cons: </li></ul></ul></ul><ul><ul><ul><ul><li>Lower resource utilization </li></ul></ul></ul></ul><ul><ul><ul><ul><li>Starvation </li></ul></ul></ul></ul>Deadlocks-Galvin sonali C. CONT…
    18. 18. DEADLOCK PREVENTION <ul><li>No Preemption – </li></ul><ul><ul><li>If a process that is holding some resources requests another resource that cannot be immediately allocated to it, then all resources currently being held are released. </li></ul></ul><ul><ul><li>Preempted resources are added to the list of resources for which the process is waiting. </li></ul></ul><ul><ul><li>Process will be restarted only when it can regain its old resources, as well as the new ones that it is requesting. </li></ul></ul><ul><ul><li>If process is requesting another resource, if it is available then it is given to requesting process </li></ul></ul><ul><ul><li>If it is held by another process which is waiting for another resource, we release it n give it to requesting process. </li></ul></ul>Deadlocks-Galvin sonali C. CONT…
    19. 19. DEADLOCK PREVENTION <ul><li>Circular Wait – </li></ul><ul><ul><li>impose a total ordering of all resource types, and require that each process requests resources in an increasing order of enumeration. </li></ul></ul>Deadlocks-Galvin sonali C. CONT…
    20. 20. DEADLOCK AVOIDANCE <ul><li>Requires additional information about how resources are to be used. </li></ul><ul><li>Simplest and most useful model requires that each process declare the maximum number of resources of each type that it may need. </li></ul><ul><li>The deadlock-avoidance algorithm dynamically examines the resource-allocation state to ensure that there can never be a circular-wait condition. </li></ul><ul><li>Resource-allocation state is defined by the number of available and allocated resources, and the maximum demands of the processes. </li></ul>Deadlocks-Galvin sonali C.
    21. 21. SAFE STATE <ul><li>When a process requests an available resource, system must decide if immediate allocation leaves the system in a safe state. </li></ul><ul><li>Systems is in safe state if there exists a safe sequence of all process </li></ul><ul><li>A sequence < P 1 , P 2 , …, P n > of ALL the processes is the system such that for each P i , the resources that P i can still request can be satisfied by currently available resources + resources held by all the P j , with j < i . </li></ul>Deadlocks-Galvin sonali C.
    22. 22. SAFE STATE <ul><li>That is: </li></ul><ul><ul><li>If P i resource needs are not immediately available, then P i can wait until all P j have finished. </li></ul></ul><ul><ul><li>When P j is finished, P i can obtain needed resources, execute, return allocated resources, and terminate. </li></ul></ul><ul><ul><li>When P i terminates, P i +1 can obtain its needed resources, and so on. </li></ul></ul>Deadlocks-Galvin sonali C. CONT…
    23. 23. SAFE, UNSAFE DEADLOCK STATE <ul><li>If system is in safe state => No deadlock </li></ul><ul><li>If system in not in safe state => possibility of deadlock </li></ul><ul><ul><li>OS cannot prevent processes from requesting resources in a sequence that leads to deadlock </li></ul></ul><ul><li>Avoidance => ensue that system will never enter an unsafe state, prevent getting into deadlock </li></ul>Deadlocks-Galvin sonali C. CONT…
    24. 24. SAFE STATE - Example <ul><li>Suppose processes P0, P1, and P2 share 12 magnetic tape drives </li></ul><ul><li>Currently 9 drives are held among the processes and 3 are available </li></ul><ul><li>Question: Is this system currently in a safe state? </li></ul><ul><li>Answer: Yes! </li></ul><ul><ul><li>Safe Sequence: <P1, P0, P2> </li></ul></ul>Deadlocks-Galvin sonali C. CONT…
    25. 25. System in UNSAFE STATE <ul><li>Suppose process P2 requests and is allocated 1 more tape drive. </li></ul><ul><li>Question: Is the resulting state still safe? </li></ul><ul><li>Answer: No! Because there does not exist a safe sequence anymore. </li></ul><ul><ul><li>Only P1 can be allocated its maximum needs. </li></ul></ul><ul><ul><li>IF P0 and P2 request 5 more drives and 6 more drives, respectively, then the resulting state will be deadlocked. </li></ul></ul>Deadlocks-Galvin sonali C. CONT… 3
    26. 26. SAFE STATE - DEADLOCK AVOIDANCE <ul><li>Key Ideas: </li></ul><ul><ul><li>Initially the system is in a safe state </li></ul></ul><ul><ul><li>Whenever a process requests an available resource, system will allocate resource immediately only if the resulting state is still safe! </li></ul></ul><ul><ul><li>Otherwise, requesting process must wait. </li></ul></ul>Deadlocks-Galvin sonali C. CONT…
    27. 27. DEADLOCK AVOIDANCE ALGORITHM <ul><li>Single instance of a resource type . </li></ul><ul><ul><li>Use a resource-allocation graph </li></ul></ul><ul><ul><li>Cycles are necessary are sufficient for deadlock </li></ul></ul><ul><li>Multiple instances of a resource type. </li></ul><ul><ul><li>Use the banker’s algorithm </li></ul></ul><ul><ul><li>Cycles are necessary, but not sufficient for deadlock </li></ul></ul>Deadlocks-Galvin sonali C.
    28. 28. RESOURCE ALLOCATION GRAPH ALGORITHM <ul><li>Claim edge P i  R j indicates that process P j may request resource R j ; represented by a dashed line. </li></ul><ul><li>Claim edge converts to request edge when a process requests a resource. </li></ul><ul><li>Request edge converted to an assignment edge when the resource is allocated to the process. </li></ul><ul><li>When a resource is released by a process, assignment edge reconverts to a claim edge. </li></ul><ul><li>Resources must be claimed a priori in the system. </li></ul>Deadlocks-Galvin sonali C.
    29. 29. RESOURCE ALLOCATION GRAPH ALGORITHM <ul><li>P2 requesting R1, but R1 is already allocated to P1. </li></ul><ul><li>Both processes have a claim on resource R2 </li></ul><ul><li>What happens if P2 now requests resource R2? </li></ul>Deadlocks-Galvin sonali C. CONT…
    30. 30. UNSAFE STATE IN RESOURCE ALLOCATIONGRAPH ALGORITHM <ul><li>Cannot allocate resource R2 to process P2 </li></ul><ul><li>Why? Because resulting state is unsafe </li></ul><ul><ul><li>P1 could request R2, thereby creating deadlock! </li></ul></ul>Deadlocks-Galvin sonali C. CONT…
    31. 31. RESOURCE ALLOCATION GRAPH ALGORITHM <ul><li>Use only when there is a single instance of each resource type </li></ul><ul><li>Suppose that process P i requests a resource R j </li></ul><ul><li>The request can be granted only if converting the request edge to an assignment edge does not result in the formation of a cycle in the resource allocation graph. </li></ul><ul><li>Here we check for safety by using cycle-detection algorthim. </li></ul>Deadlocks-Galvin sonali C. CONT…
    32. 32. BANKER’S ALGORITHM <ul><li>RAL is not applicable for multiple instance of resource </li></ul><ul><li>Bankers’ algorithm - Multiple instances. </li></ul><ul><li>Each process claims maximum resource needs a priori . </li></ul><ul><li>When a process requests a resource it may have to wait. </li></ul><ul><li>When a process gets all of its resources it must return them in a finite amount of time. </li></ul>Deadlocks-Galvin sonali C.
    33. 33. BANKER’S ALGORITHM -Data structure <ul><li>Let, </li></ul><ul><ul><li>n = number of processes </li></ul></ul><ul><ul><li>m = number of resources types </li></ul></ul><ul><li>Available : Vector of length m . If Available[ j ] = k , there are k instances of resource type R j available. </li></ul><ul><li>Max : n x m matrix. If Max [ i,j ] = k , then process P i may request at most k instances of resource type R j . </li></ul><ul><li>Allocation : n x m matrix. If Allocation[ i,j ] = k then P i is currently allocated k instances of R j. </li></ul><ul><li>Need : n x m matrix. If Need [ i,j ] = k , then P i may need k more instances of R j to complete its task. Need [ i,j] = Max [ i,j ] – Allocation [ i,j ]. </li></ul>Deadlocks-Galvin sonali C. CONT…
    34. 34. BANKER’S ALGORITHM - Safety Algorithm <ul><li>1. Let Work and Finish be vectors of length m and n , respectively. Initialize: </li></ul><ul><ul><ul><ul><li>Work = Available </li></ul></ul></ul></ul><ul><ul><ul><ul><li>Finish [ i ] = false for i = 0, 1, …, n- 1 . </li></ul></ul></ul></ul><ul><li>2. Find and i such that both: </li></ul><ul><ul><li>(a) Finish [ i ] = false </li></ul></ul><ul><ul><li>(b) Need i  Work </li></ul></ul><ul><ul><li>If no such i exists, go to step 4. </li></ul></ul><ul><li>3. Work = Work + Allocation i Finish [ i ] = true go to step 2. </li></ul><ul><li>4. If Finish [ i ] == true for all i , then the system is in a safe state. </li></ul>Deadlocks-Galvin sonali C. CONT…
    35. 35. BANKER’S ALGORITHM - Resource Allocation Algorithm <ul><li>Request = request vector for process P i . If Request i [ j ] = k then process P i wants k instances of resource type R j . </li></ul><ul><ul><li>1. If Request i  Need i go to step 2. Otherwise, raise error condition, since process has exceeded its maximum claim. </li></ul></ul><ul><ul><li>2. If Request i  Available , go to step 3. Otherwise P i must wait, since resources are not available. </li></ul></ul><ul><ul><li>3. Pretend to allocate requested resources to P i by modifying the state as follows: </li></ul></ul><ul><ul><ul><ul><li>Available = Available – Request; </li></ul></ul></ul></ul><ul><ul><ul><ul><li>Allocation i = Allocation i + Request i ; </li></ul></ul></ul></ul><ul><ul><ul><ul><li>Need i = Need i – Request i ; </li></ul></ul></ul></ul><ul><ul><ul><li>If safe  the resources are allocated to Pi. </li></ul></ul></ul><ul><ul><ul><li>If unsafe  Pi must wait, and the old resource-allocation state is restored </li></ul></ul></ul>Deadlocks-Galvin sonali C. CONT…
    36. 36. BANKER’S ALGORITHM - Example <ul><li>5 processes P 0 through P 4 ; </li></ul><ul><li>3 resource types: </li></ul><ul><ul><li>A (10 instances), B (5instances), and C (7 instances). </li></ul></ul><ul><li>Snapshot at time T 0 : </li></ul><ul><li>Allocation Max Available </li></ul><ul><li>A B C A B C A B C </li></ul><ul><li>P 0 0 1 0 7 5 3 3 3 2 </li></ul><ul><li> P 1 2 0 0 3 2 2 </li></ul><ul><li> P 2 3 0 2 9 0 2 </li></ul><ul><li> P 3 2 1 1 2 2 2 </li></ul><ul><li> P 4 0 0 2 4 3 3 </li></ul>Deadlocks-Galvin sonali C. CONT…
    37. 37. BANKER’S ALGORITHM - Example cont… <ul><li>The content of the matrix Need is defined to be Max – Allocation . </li></ul><ul><li>Need </li></ul><ul><li>A B C </li></ul><ul><li> P 0 7 4 3 </li></ul><ul><li> P 1 1 2 2 </li></ul><ul><li> P 2 6 0 0 </li></ul><ul><li> P 3 0 1 1 </li></ul><ul><li> P 4 4 3 1 </li></ul><ul><li>The system is in a safe state since the sequence < P 1 , P 3 , P 4 , P 2 , P 0 > satisfies safety criteria. </li></ul>Deadlocks-Galvin sonali C. CONT…
    38. 38. BANKER’S ALGORITHM - Example cont…(P1 Request (1,0,2)) <ul><li>Check that Request  Available (that is, (1,0,2)  (3,3,2)  true . Allocation Need Available </li></ul><ul><li>A B C A B C A B C </li></ul><ul><li>P 0 0 1 0 7 4 3 2 3 0 </li></ul><ul><li>P 1 3 0 2 0 2 0 </li></ul><ul><li>P 2 3 0 1 6 0 0 </li></ul><ul><li>P 3 2 1 1 0 1 1 </li></ul><ul><li>P 4 0 0 2 4 3 1 </li></ul><ul><li>Executing safety algorithm shows that sequence < P 1 , P 3 , P 4 , P 0 , P 2 > satisfies safety requirement. </li></ul><ul><li>Can request for (3,3,0) by P 4 be granted? –NO </li></ul><ul><li>Can request for (0,2,0) by P 0 be granted? –NO ( Results Unsafe) </li></ul>Deadlocks-Galvin sonali C. CONT…
    39. 39. DEADLOCK DETECTION <ul><li>Allow system to enter deadlock state </li></ul><ul><li>Detection algorithm </li></ul><ul><li>Recovery scheme </li></ul>Deadlocks-Galvin sonali C.
    40. 40. Resource-Allocation Graph and Wait-for Graph <ul><li>For single instance </li></ul><ul><li>P i -> P j (P i is waiting for P j to release a resource that P i needs) </li></ul><ul><li>P i -> P j exist if and only if RAG contains 2 edges P i -> R q and R q -> P j for some resource R q </li></ul>Deadlocks-Galvin sonali C. Resource-Allocation Graph Corresponding wait-for graph
    41. 41. Several Instances of a Resource Type <ul><li>Available : A vector of length m indicates the number of available resources of each type. </li></ul><ul><li>Allocation : An n x m matrix defines the number of resources of each type currently allocated to each process. </li></ul><ul><li>Request : An n x m matrix indicates the current request of each process. If Request [ i j ] = k , then process P i is requesting k more instances of resource type. R j . </li></ul>Deadlocks-Galvin sonali C.
    42. 42. Detection Algorithm <ul><li>Let Work and Finish be vectors of length m and n , respectively Initialize: </li></ul><ul><ul><li>(a) Work = Available </li></ul></ul><ul><ul><li>(b) For i = 1,2, …, n , if Allocation i  0, then Finish [i] = false;otherwise, Finish [i] = true . </li></ul></ul><ul><li>2. Find an index i such that both: </li></ul><ul><ul><li>(a) Finish [ i ] == false </li></ul></ul><ul><ul><li>(b) Request i  Work </li></ul></ul><ul><ul><li>If no such i exists, go to step 4. </li></ul></ul>Deadlocks-Galvin sonali C.
    43. 43. <ul><li>Work = Work + Allocation i Finish [ i ] = true go to step 2. </li></ul><ul><li>4. If Finish [ i ] == false, for some i , 1  i  n , then the system is in deadlock state. Moreover, if Finish [ i ] == false , then P i is deadlocked. </li></ul>Deadlocks-Galvin sonali C.
    44. 44. Example of Detection Algorithm <ul><li>Five processes P 0 through P 4 ; three resource types A (7 instances), B (2 instances), and C (6 instances). </li></ul><ul><li>Snapshot at time T 0 : </li></ul><ul><li> Allocation Request Available </li></ul><ul><li>A B C A B C A B C </li></ul><ul><li>P 0 0 1 0 0 0 0 0 0 0 </li></ul><ul><li>P 1 2 0 0 2 0 2 </li></ul><ul><li>P 2 3 0 3 0 0 0 </li></ul><ul><li>P 3 2 1 1 1 0 0 </li></ul><ul><li>P 4 0 0 2 0 0 2 </li></ul><ul><li>Sequence < P 0 , P 2 , P 3 , P 1 , P 4 > will result in Finish [ i ] = true for all i . </li></ul>Deadlocks-Galvin sonali C.
    45. 45. <ul><li>P 2 requests an additional instance of type C . </li></ul><ul><li>Request </li></ul><ul><li>A B C </li></ul><ul><li> P 0 0 0 0 </li></ul><ul><li> P 1 2 0 1 </li></ul><ul><li>P 2 0 0 1 </li></ul><ul><li>P 3 1 0 0 </li></ul><ul><li>P 4 0 0 2 </li></ul><ul><li>State of system? </li></ul><ul><ul><li>Can reclaim resources held by process P 0 , but insufficient resources to fulfill other processes; requests. </li></ul></ul><ul><ul><li>Deadlock exists, consisting of processes P 1 , P 2 , P 3 , and P 4 . </li></ul></ul>Deadlocks-Galvin sonali C.
    46. 46. Detection-Algorithm Usage <ul><li>When, and how often, to invoke depends on: </li></ul><ul><ul><li>How often a deadlock is likely to occur? </li></ul></ul><ul><ul><li>How many processes will need to be rolled back? </li></ul></ul><ul><ul><ul><li>One for each disjoint cycle </li></ul></ul></ul><ul><li>If detection algorithm is invoked arbitrarily, there may be many cycles in the resource graph and so we would not be able to tell which of the many deadlocked processes “caused” the deadlock </li></ul>Deadlocks-Galvin sonali C.
    47. 47. Recovery from Deadlock: Process Termination <ul><li>Abort all deadlocked processes. </li></ul><ul><li>Abort one process at a time until the deadlock cycle is eliminated. </li></ul><ul><li>In which order should we choose to abort? </li></ul><ul><ul><li>Priority of the process. </li></ul></ul><ul><ul><li>How long process has computed, and how much longer to completion. </li></ul></ul><ul><ul><li>Resources the process has used. </li></ul></ul><ul><ul><li>Resources process needs to complete. </li></ul></ul><ul><ul><li>How many processes will need to be terminated. </li></ul></ul><ul><ul><li>Is process interactive or batch? </li></ul></ul>Deadlocks-Galvin sonali C.
    48. 48. Recovery from Deadlock: Resource Preemption <ul><li>Selecting a victim – minimize cost. </li></ul><ul><li>Rollback – return to some safe state, restart process for that state. </li></ul><ul><li>Starvation – same process may always be picked as victim, include number of rollback in cost factor. </li></ul>Deadlocks-Galvin sonali C.
    49. 49. Thank You All The Best Deadlocks-Galvin sonali C.