We know that when the deadlock has occurred in the operating system, then for removing it we are going to preempt some process and give resources to others processes, so whenever the preemption is required to remove the deadlock, some drawbacks are arises as: Select the victim, Rollback of processes, and Starvation.
- Select the victim:
First drawback is that when we want to select the resources and which process needs to be preempted, we must pre-determine the processes that in which order the processes are to use the resources to minimize the cost, so selecting a victim is a drawback during the resource preemption.
- Rollback of processes:
Second drawback is that when we preempt one resource from the process then that time one question is raised that what should we do with that process and the only possible answer is that we should get to roll back the process and place it on some safe state and restart it. But in reality, it is very difficult to get a safe state, so the better way is to roll back completely abort the process and restart it again. It is the more effective way to roll back the process only as for as to remove the deadlock.
Third drawback is how we can ensure that starvation will further not occur is the system, that is how we can ensure that resources will not be preempted. In an operating system, we know that selection a victim is a cost-effective process, so it may happen when we select the same victim as the same process, and the result will be as the process will never be completed and which lead to starvation.