Trusted by millions of Kenyans
Study resources on Kenyaplex

Get ready-made curriculum aligned revision materials

Exam papers, notes, holiday assignments and topical questions – all aligned to the Kenyan curriculum.

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

Answer Attachments

Exams With Marking Schemes

Related Questions