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.
GeeksforGeeks has prepared a complete interview preparation course with premium videos, theory, practice problems, TA support and many more features. Please refer Placement 100 for details
- Get/Set process resource limits in C
- Resource Allocation Techniques for Processes
- Resource Allocation Graph (RAG) in Operating System
- Resource Reservation Protocol in Real-time Systems
- Difference between Delay and Deadline Constraint in Real-time System
- Minimal to Canonical Form Conversion
- Loop Optimization Techniques | Set 2
- Multistep Processing of a User Program
- Interesting Facts about WINDOWS
- Difference between SSTF and LOOK disk scheduling algorithm
- Not Recently Used (NRU) page replacement algorithm
- Types of Priority Inversions under PCP
- Cartesian Product Operation in Relational Algebra
- Difference between PIP and HLP
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.