An operating system implements a policy that requires a process to release all…
2008
An operating system implements a policy that requires a process to release all resources before making a request for another resource. Select the TRUE statement from the following:
- A.
Both starvation and deadlock can occur
- B.
Starvation can occur but deadlock cannot occur
- C.
Starvation cannot occur but deadlock can occur
- D.
Neither starvation nor deadlock can occur
Attempted by 335 students.
Show answer & explanation
Correct answer: B
Answer: Starvation can occur but deadlock cannot occur.
Explanation: A deadlock requires four conditions (mutual exclusion, hold-and-wait, no preemption, and circular wait). The given policy forces a process to release all held resources before requesting any new resource, which removes the hold-and-wait condition. With hold-and-wait eliminated, one of the necessary conditions for deadlock is missing, so deadlock cannot occur.
Why deadlock is prevented: Because processes never hold resources while waiting for others, the circular waiting necessary for deadlock cannot form.
Why starvation can still occur: A process might repeatedly release resources to request another and then repeatedly be denied that new resource (for example, due to scheduling, priority inversion, or other processes continually acquiring it). This can prevent the process from ever making progress, causing starvation.
Simple scenario: Process P releases resource R1 to request R2, but higher-priority processes keep taking R2 each time, so P never obtains R2 and never completes its task—starvation occurs even though no deadlock exists.
Conclusion: The policy prevents deadlock by removing hold-and-wait, but it does not guarantee freedom from starvation.
A video solution is available for this question — log in and enroll to watch it.