Do not allow one of the four conditions to occur.
No preemption:
a) Release any resource already being held if the process can't get an additional resource.
b) Allow preemption - if a needed resource is held by another process, which is also waiting on some resource, steal it. Otherwise wait.
Circular wait:
Number resources and only request in ascending order.
●
EACH of these prevention techniques may cause a decrease in utilization and/or resources. For this reason, prevention isn't necessarily the best technique.
Prevention is generally the easiest to implement.
No comments:
Post a Comment