Home » Operating Systems

Issues related to resource preemption

Here, we are going to discus issue related to resource preemption in the operating system.
Submitted by Akash Kumar, on November 16, 2018

To eliminate deadlocks basically using preemption, we successively preempt some resources from processes and give these resources to other processes until the deadlock cycle is broken.

If preemption is required to deal with deadlocks, then three issues related to it need to be addressed.

These issues are as follows:

1) Selecting a Victim

The basic issue is that how to select the resources and which process are to be preempted, we must determine the order of preemption to minimize cost. Basically, the cost factor may include some parameters such as a number of resources a deadlocked process is holding and the amount of time the process has thus far consumed during its execution.

2) Rollback

If we preempt a resource from the process, what should be done with that process is the biggest question and the only answer we get is to roll back the process and goto some safe state and restart it from that start.

Basically, in general, it is very hard to determine the safe state and hence it is better to rollback completely abort the process and then restart it again. Although it is more effective to roll back the process only as far as to break the deadlock. This method basically requires the system to keep more information about the state of all running process.

3) Starvation

How do we ensure that starvation will not occur? That is, how can we guarantee that resource will not always be preempted from the same process?

In a system where victim selection is basically based on the cost factor. It may happen that the same process is always picked as a victim. As a result, process will never complete its designated task and which may lead to starvation.





Comments and Discussions

Ad: Are you a blogger? Join our Blogging forum.



Languages: » C » C++ » C++ STL » Java » Data Structure » C#.Net » Android » Kotlin » SQL
Web Technologies: » PHP » Python » JavaScript » CSS » Ajax » Node.js » Web programming/HTML
Solved programs: » C » C++ » DS » Java » C#
Aptitude que. & ans.: » C » C++ » Java » DBMS
Interview que. & ans.: » C » Embedded C » Java » SEO » HR
CS Subjects: » CS Basics » O.S. » Networks » DBMS » Embedded Systems » Cloud Computing » Machine learning » CS Organizations » Linux » DOS
More: » Articles » Puzzles » News/Updates

© https://www.includehelp.com some rights reserved.