Thursday, August 20, 2009

deadlock prevention

At least 1 necessary condition does not hold
  • Mutual Exclusion: not required for sharable resources; must hold for non-sharable resources.
  • Hold-and-Wait: can not request new when holding resources.
  1. Protocol 1: request all resources before it begins execution
  2. Protocol 2: request resources only when the process has none.
  3. Low resource utilization; starvation possible.
  • No Preemption: preempt resources from processes
  1. Protocol 1: If a request can not be satisfied then preempt all resources held and block
  2. Protocol 2: Preempt only if resources are needed by another running process
  3. Requires resource state to be easily restored
  • Circular Wait: Block any request that results in a cycle.
  1. Impose a total ordering of all resource types, and require that each process requests resources in an increasing order

No comments:

Post a Comment