169k views
0 votes
Consider the following ways of handling deadlock:

(1) banker’s algorithm,
(2) detect deadlock and kill thread, releasing all resources,
(3) reserve all resources in advance,
(4) restart thread and release all resources if thread needs to wait,
(5) resource ordering, and
(6) detect deadlock and roll back thread’s actions.
b) Another criterion is efficiency; in other words, which requires the least processor overhead. Rank order the approaches from 1 to 6, with 1 being the most efficient, assuming that deadlock is a very rare event. Comment on your ordering

User Matt Spoon
by
4.7k points

1 Answer

5 votes

Answer:

banker’s algorithm,

(2) detect deadlock and kill thread, releasing all resources,

(3) reserve all resources in advance,

(4) restart thread and release all resources if thread needs to wait,

(5) resource ordering, and

(6) detect deadlock and roll back thread’s actions.

b) Another criterion is efficiency; in other words, which requires the least processor overhead. Rank order the approaches from 1 to 6, with 1 being the most efficient, assuming that deadlock is a very rare event. Comment on your ordering

Step-by-step explanation:

User Rngbus
by
4.9k points