1 / 5

Recovery from deadlock 1) Process Terminaton

Recovery from deadlock 1) Process Terminaton. Abort all deadlock process Expensive -> Some computations done by the killed process might be required by some other running process. Abort one at a time Overhead -> Deadlock detection algorithm is required.

Download Presentation

Recovery from deadlock 1) Process Terminaton

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Recovery from deadlock1) Process Terminaton • Abort all deadlock process Expensive -> Some computations done by the killed process might be required by some other running process. • Abort one at a time Overhead -> Deadlock detection algorithm is required. In which order should we choose to abort ? -> Priority of the process -> Better to stop a process at a initial stage

  2. Deadlock Avoidance • Requires that the system has some prior initial information. • At the time of allocation, system should check if it is safe to allocate resources. If safe, only then allocate the resources. • The check must also be performed at intermediate stages to check if the allocation leaves the system in safe state. • System is safe if there exists a sequence <P1,P2,...Pn> of All the processes in the system such that for each Pi, the resources that Pi can require be satisfied bu currently available resources + resources held by all Pj with j < i

  3. Safe Sequence <P1,...Pi,Pj.....Pn> • In the safe sequence, if Pi resource needs are not immediately available, then Pi can wait until all Pj have finished. • When Pj finished, Pi can obtain needed resources, execute and return allocated resources and terminate. • This sequence can go on and all the processes in the line can be safely executed.

  4. Example • Safe sequence <P1, P0, P2> Safe state

More Related