- When should we invoke the detection algorithm? The answer depends on two factors:
- How often is a deadlock likely to occur?
- How many processes will be affected by deadlock when it happens?
- If deadlocks occur frequently, then the detection algorithm should be invoked frequently. Resources allocated to deadlocked processes will be idle until the deadlock can be broken.
- In the extreme, we can invoke the deadlock-detection algorithm every time a request for allocation cannot be granted
immediately (considerable overhead).
- A less expensive alternative is simply to invoke the algorithm at less frequent intervals -for example, once per hour or whenever CPU utilization drops below 40 percent.
Cem Ozdogan
2010-04-19