Question 3: (9 marks)
Explain how starvation can happen as a result of deadlock recovery. Support your answer with an example and suggest how to avoid the starvation in your example.
Answers
Answer:In a system, it may happen that same process is always picked as a victim. As a result, that process will never complete its designated task. This situation is called Starvation and must be avoided.
Explanation:Starvation occurs when a process requires a resource for execution that it is never allowed.
A deadlock occurs when two or more processes need some resource to complete the execution held by the other process.
A deadlock occurs when two or more processes need some resource to complete the execution held by the other process.
For this, we use two methods:
(a). Abort all the Deadlocked Processes: Aborting all the processes will certainly break the deadlock, but with a great expenses. ...
(b). Abort one process at a time untill deadlock is eliminated: Abort one deadlocked process at a time, untill deadlock cycle is eliminated from the system.
hope it is helpfull