What is the difference among deadlock avoidance, detection
and prevention?
Answer Posted / s_rock
Prevention:
• The goal is to ensure that at least one of the
necessary conditions for deadlock can never hold.
• Deadlock prevention is often impossible to
implement.
• The system doesnot require additional apriori
information regarding the overall potential use of each
resource for each process.
• In order for the system to prevent the deadlock
condition it does not need to know all the details of all
resources in existence, available and requested.
• Deadlock prevention techniques include non-blocking
synchronization algorithms, serializing tokens, Dijkstras
algorithm etc.
• Resource allocation strategy for deadlock
prevention is conservative, it under commits the resources.
• All resources are requested at once.
• In some cases preempts more than often necessary.
Avoidance:
• The goal for deadlock avoidance is to the system
must not enter an unsafe state.
• Deadlock avoidance is often impossible to
implement.
• The system requires additional apriori information
regarding the overall potential use of each resource for
each process.
• In order for the system to be able to figure out
whether the next state will be safe or unsafe, it must know
in advance at any time the number and type of all resources
in existence, available, and requested.
• Deadlock avoidance techniques include Banker’s
algorithm, Wait/Die, Wound/Wait etc.
• Resource allocation strategy for deadlock avoidance
selects midway between that of detection and prevention.
• Needs to be manipulated until atleast one safe path
is found.
• There is no preemption.
Detection:
• The goal is to detect the deadlock after it occurs
or before it occurs.
• Detecting the possibility of a deadlock before it
occurs is much more difficult and is, in fact, generally
undecidable. However, in specific environments, using
specific means of locking resources, deadlock detection may
be decidable.
• The system doesnot requires additional apriori
information regarding the overall potential use of each
resource for each process in all cases.
• In order for the system to detect the deadlock
condition it does not need to know all the details of all
resources in existence, available and requested.
• A deadlock detection technique includes, but is not
limited to, Model checking. This approach constructs a
Finite State-model on which it performs a progress analysis
and finds all possible terminal sets in the model.
• Resource allocation strategy for deadlock detection
is very liberal. Resources are granted as requested.
• Needs to be invoked periodically to test for
deadlock.
• Preemption is seen.
| Is This Answer Correct ? | 10 Yes | 2 No |
Post New Answer View All Answers
Where the system time is stored? In processor or in separate timer ic for that?
some os have a tree structure file system that limits the depth of a tree and small number of levels.what limit does this have on user? how does this simplify file system design?
If you do not have cd drive then how will you format c drive?
when affected the system from virus , which paths will be it stored in system ?
absolute path gives the location a file or directory in reference to a rile directory while relative path is a path given file starting from another file. explain?
Explain the process control block of UNIX ?
If you tries to mount a share ( home directory )in a client machine, and it fails how do u approach?
Can you tell which dlls are used for SDK?
Explain about dynamic memory allocation algorithm?
Let us suppose one application needs 2GB RAM to run and dependent plugins will be load while running application. Here My doubt is how many processes will create for this application. I know the concept of virtual memory, which will provide RAM on demand. My straight forward question is what is the size of the process and is it single process will create by operating system to complete the task of my application.??? Thanks in Advance.
Explain the ways to infect the system by virus?
Explain where the system time is stored? In processor or in separate timer ic for that?
If you do not have cd drive then how will u format c drive?
directories can be implemented either special files that can only be accused in limited ways or can be implemented as ordinary data files. what are advantages and disadvantages of this approach?
how make a bootable dick