Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Question 2: Total Points (15) Consider the following ways of handling deadlock:

ID: 3536891 • Letter: Q

Question

Question 2: Total Points (15)

Consider the following ways of handling deadlock:

(1) Banker%u2019s 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

(6) Detect deadlock and roll back thread%u2019s actions.

(a) One criterion to use in evaluating different approaches to deadlock is which approach permits the greatest concurrency. In other words, which approach allows the most threads to make progress without waiting when there is no deadlock? Give a rank order from 1 to 6 for each of the ways of handling deadlock just listed, where 1 allows the greatest degree of concurrency. Comment on your ordering.

(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. Does your ordering change if deadlocks occur frequently?

Explanation / Answer

a. 1st: (4), if thread need wait, it shouldn

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote