Get premium membership and access questions with answers, video lessons as well as revision papers.

Describe the general strategy behind deadlock prevention, and give an example of a practical deadlock prevention method

      

Describe the general strategy behind deadlock prevention, and give an example of a practical deadlock prevention method

  

Answers


Faith
Deadlock prevention is theorized on the basis that if one nullifies one of the four conditions for deadlock
to occur (mutual exclusion, hold and wait, circular wait and no preemption), a deadlock cannot occur.
Attacking mutual exclusion and no preemption has no practical basis, so we commonly prevent the
circular wait condition. We do this by globally numbering all resources. (e.g. Blu-Ray drive #1 and
USB Hard Drive #2). At every instant – one of the processes will have the highest numbered resource.
The process holding it will never ask for a lower one, because we only allow processes to access higher
numbered resources. Eventually it will finish and free all its resources. All processes can finish.
Titany answered the question on April 26, 2022 at 09:45


Next: What must the banker's algorithm know a priori in order to prevent deadlock?
Previous: Filesystems can support sparse files, what does this mean? Give an example of an application's file organisation that might benefit from a file system's sparse file...

View More Operating Systems Questions and Answers | Return to Questions Index


Learn High School English on YouTube

Related Questions