For an effective operating system, when to check for deadlock?

a) every time a resource request is made at fixed time intervals
b) at fixed time intervals
c) every time a resource request is made
d) none of the mentioned

Checking for deadlock every time a resource request is made is the most effective approach.

This is because:

  • Early detection: It allows for immediate identification of potential deadlocks, preventing them from escalating.
  • Resource optimization: By detecting deadlocks early, the system can take corrective actions, such as process termination or resource preemption, to avoid system-wide issues.
  • Efficient resource utilization: Continuously monitoring resource requests helps in optimizing resource allocation and preventing deadlocks.

While checking at fixed intervals might be less computationally expensive, it increases the risk of missing deadlock conditions, especially if the interval is too long.

Therefore, checking for deadlock at every resource request offers the best balance between efficiency and deadlock prevention.

Leave a Comment

Your email address will not be published. Required fields are marked *

Exit mobile version