Deadlock full details from Operating System. It will help study about the deadlock in details. Each topic is covered thoroughly. The file is compatible for Microsoft PowerPoint 365 for animations and live images. Otherwise, it will support static slide in other apps.
Topics Covered:
1. Introduction of Deadlock
2. Characteristics of Deadlocks
3. Strategies For handling
4. Deadlock
5. Deadlock Prevention
6. Deadlock Avoidance
7. Recovery from Deadlock
7. Strategies For Handling Deadlock
Ensure
1. Deadlock prevention
2. Deadlock avoidance
Allow
Allow the system to
enter a deadlock state
and then recover
Ignore
Ignore the problem and
pretend that deadlocks
never occur in the
system
8. Deadlock Prevention
Mutual
Exclusion
Not required for
sharable resources
(e.g., read-only
files); must hold for
non-sharable
resources
Hold and
Wait
Must guarantee
that whenever a
process requests a
resource, it does
not hold any other
resources
No
Preemption
If a process that is
holding some
resources requests
another resource that
cannot be
immediately allocated
to it, then all
resources currently
being held are
released
Circular
Wait
Impose a total
ordering of all
resource types,
and require that
each process
requests resources
in an increasing
order of
enumeration
10. โข Abort all deadlocked processes
โข Abort one process at a time until the deadlock cycle
is eliminated
Process
Termination
โข Selecting a victim โ minimize cost
โข Rollback โ return to some safe state, restart process
for that state
โข Starvation โ same process may always be picked as
victim, include number of rollback in cost facto
Resource
Preemption
Deadlock Recovery
A Deadlock is a situation where each of the computer process waits for a resource which is being assigned to some another process. In this situation, none of the process gets executed since the resource it needs, is held by some other process which is also waiting for some other resource to be released.
1. Mutual Exclusion :
Mutual exclusion means that a resource can be used by only one process at a time.ย For example,ย if a process P1 locks the resource R in exclusive mode, no other process can acquire this resource R. If another process requests, this resource, the requesting process must be delayed until the resource has been Ans. released.
2. Hold and Wait :
The processes involved in deadlock acquires at least one resource and wait for at least another resource that has been acquired by another process.
3. No preemption :
Resources held by a process cannot be preempted. A resource can be released only voluntarily by the process holding it, after that process has completed its task.
4. Circular Wait :
A circular chain or a circular relationship exists among the processes involved in a deadlock. In such a chain each process waits for a resource that is held by the next process in the chain.ย For example, there are three processes, P1, P2 and P3.
The process P1 is waiting for a resource which is held by the process P2, P2 is waiting for a resource held by P3 and P3 is waiting for a resource that is held by the process P1.
Ensure that the system will never enter a deadlock state:
๏ฌ Deadlock prevention
๏ฌ Deadlock avoidence
๏ฎ Allow the system to enter a deadlock state and then recover
๏ฎ Ignore the problem and pretend that deadlocks never occur in the system; used by most operating systems, including UNIX