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.
Don’t stop now and take your learning to the next level. Learn all the important concepts of Data Structures and Algorithms with the help of the most trusted course: DSA Self Paced. Become industry ready at a student-friendly price.
- Resource Allocation
- 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 BCNF and 4NF in DBMS
- Protocol Hierarchies in Computer Network
- Viable Prefix in Bottom-up Parsing
- Difference between macOS and Chrome OS
- Difference between Android 1.0 and Android 7.0
- Difference between Android 1.0 and Android 7.1
- Difference between Android 1.0 and Android 7.1.1
- Difference between Android 1.0 and Android 7.1.2
- Difference between Android 1.0 and Android 8.0
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.