Back to the 2023 paper

Module 4: Deadlocks

20237m

For a deadlock to occur, each of the necessary conditions must hold. By ensuring that at least one of these conditions cannot hold, we can prevent the occurrence of a deadlock. Give one approach individually to prevent each of these necessary conditions.

Worked SolutionAI Assisted

Deadlock Prevention per Condition

  1. Mutual Exclusion: make resource shareable (read-only, spooling)
  2. Hold-and-Wait: require process to request all resources at once, or release held before new request
  3. No Preemption: allow OS to preempt resources
  4. Circular Wait: impose total ordering of resource types, request in order

Similar questions

Official AppAndroid App

PYQDeck for Android

Solve BEU previous-year exam papers anywhere, anytime. Fast search, offline paper viewing, and step-by-step solutions designed specifically for your phone.