SlideShare a Scribd company logo
2
Most read
5
Most read
6
Most read
PRESENTATION ON
DEADLOCK AVOIDANCE
In this slide we are going to
know:
What is Deadlock?
How can we Avoid Deadlock?
What is Deadlock?
A deadlock is a situation which occurs when a process enters in a waiting state
because the requested resource is being held by another waiting process, which in
turn is waiting for another resource held by another waiting process. If a process is
unable to change its state indefinitely because the resources requested by it are
being used by another waiting process, then the system is said to be in a deadlock.
A practical example of Deadlock
 You can't get a job without experience. You can't get experience without a job.
Let’s visualize Deadlock
Two processes competing for two resources in opposite order.
(A) A single process goes through.
(B) The later process has to wait.
(C) A deadlock occurs when the first process locks the first resource at the
same time as the second process locks the second resource.
(D) The deadlock can be resolved by cancelling and restarting the first
process.
Deadlock Avoidance
 Deadlock can be avoided if certain information about processes
are available to the operating system before allocation of resources.
 For every resource request, the system sees whether granting the
request will cause the system to enter an unsafe state that means
this state could result in deadlock.
The system then only grants the requests that will lead to safe
states.
Possible States
 Deadlock: No further progress is possible.
 Unsafe State: A state that may allow deadlock. It is possible for a
process to be in an unsafe state but for this not to result in a
deadlock.
 Safe State: A state is safe if it has a bunch of processes and there
are enough resources for the 1st process to be finished and after it
releases it’s resources there are enough resources for the next
process to be proceed. There is no chance of Deadlock.
In order to determine the condition of next state (safe/ unsafe/ deadlock) the
system must know these information in advance:
 Resources currently available.
 Resources currently allocated to each process.
 Resources that will be required and released by these processes in the future.
To avoid deadlock we have to follow a simple rule. If a request causes the next
state into unsafe mood or deadlock then we shouldn’t proceed the request.
THE END
Presented by:
Mohammad Hafiz-Al-Masud,
ID: 1209035,
Session: 2012/13,
Department of ICT,
Comilla University.

More Related Content

PPT
deadlock avoidance
PPTX
DeadLock in Operating-Systems
PPT
Multiple integrals
PDF
Software Cost Estimation Techniques
PPTX
Normal Probability Curve by Dr. Neha Deo
PPTX
Cryptography
PPTX
Critical section problem in operating system.
deadlock avoidance
DeadLock in Operating-Systems
Multiple integrals
Software Cost Estimation Techniques
Normal Probability Curve by Dr. Neha Deo
Cryptography
Critical section problem in operating system.

What's hot (20)

PPTX
Deadlock Prevention
PPTX
Deadlock Presentation
PDF
Deadlock Avoidance - OS
PPTX
Deadlocks in operating system
PPT
Chapter 7 - Deadlocks
DOCX
BANKER'S ALGORITHM
PDF
PDF
Methods for handling deadlocks
PPTX
Dead Lock in operating system
PPTX
Deadlock ppt
PPTX
Bankers algorithm
PPTX
Deadlock dbms
PPT
Operating System: Deadlock
PPTX
deadlock handling
PPTX
Transaction management DBMS
PPT
OS Process Synchronization, semaphore and Monitors
PPT
15. Transactions in DBMS
PPT
Deadlock
PPTX
Process in operating system
Deadlock Prevention
Deadlock Presentation
Deadlock Avoidance - OS
Deadlocks in operating system
Chapter 7 - Deadlocks
BANKER'S ALGORITHM
Methods for handling deadlocks
Dead Lock in operating system
Deadlock ppt
Bankers algorithm
Deadlock dbms
Operating System: Deadlock
deadlock handling
Transaction management DBMS
OS Process Synchronization, semaphore and Monitors
15. Transactions in DBMS
Deadlock
Process in operating system
Ad

Similar to Deadlock Avoidance in Operating System (20)

PPTX
Untitled presentation.pptx os ppt deadlock prevention
DOCX
Os case study word
PDF
Unit 3 part 2(DEADLOCK)
PPTX
Deadlocks and Deadlock Detection Other Issues
PPTX
Deadlocks
PDF
“Understanding Distributed Deadlocks: Causes, Detection
PDF
OPERATING SYSTEM deadlock prevention techniques
PPTX
operating system
PPTX
operating system
DOCX
What is a deadlock
PPT
Deadlock in operating systems
PPTX
deadlock acoidence and prevention .pptx
PPTX
Deadlock-in-Operating-Systems.pptx os os
PPTX
4.3 Deadlock [Autosaved].pptx
PDF
Distributed deadlock
PDF
Deadlock in distribute system by saeed siddik
PDF
osvishal-160830131208 (1).pdf
PPTX
Deadlock
Untitled presentation.pptx os ppt deadlock prevention
Os case study word
Unit 3 part 2(DEADLOCK)
Deadlocks and Deadlock Detection Other Issues
Deadlocks
“Understanding Distributed Deadlocks: Causes, Detection
OPERATING SYSTEM deadlock prevention techniques
operating system
operating system
What is a deadlock
Deadlock in operating systems
deadlock acoidence and prevention .pptx
Deadlock-in-Operating-Systems.pptx os os
4.3 Deadlock [Autosaved].pptx
Distributed deadlock
Deadlock in distribute system by saeed siddik
osvishal-160830131208 (1).pdf
Deadlock
Ad

Recently uploaded (20)

PPTX
Foundation to blockchain - A guide to Blockchain Tech
PPTX
CYBER-CRIMES AND SECURITY A guide to understanding
PPTX
web development for engineering and engineering
PPTX
Lesson 3_Tessellation.pptx finite Mathematics
PPTX
UNIT-1 - COAL BASED THERMAL POWER PLANTS
PPTX
Recipes for Real Time Voice AI WebRTC, SLMs and Open Source Software.pptx
PPT
Mechanical Engineering MATERIALS Selection
PPTX
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
PPTX
UNIT 4 Total Quality Management .pptx
PDF
Digital Logic Computer Design lecture notes
PDF
PPT on Performance Review to get promotions
DOCX
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
PPTX
Welding lecture in detail for understanding
PPTX
KTU 2019 -S7-MCN 401 MODULE 2-VINAY.pptx
PPTX
Sustainable Sites - Green Building Construction
PPTX
bas. eng. economics group 4 presentation 1.pptx
PDF
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
PDF
composite construction of structures.pdf
PDF
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
PPTX
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
Foundation to blockchain - A guide to Blockchain Tech
CYBER-CRIMES AND SECURITY A guide to understanding
web development for engineering and engineering
Lesson 3_Tessellation.pptx finite Mathematics
UNIT-1 - COAL BASED THERMAL POWER PLANTS
Recipes for Real Time Voice AI WebRTC, SLMs and Open Source Software.pptx
Mechanical Engineering MATERIALS Selection
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
UNIT 4 Total Quality Management .pptx
Digital Logic Computer Design lecture notes
PPT on Performance Review to get promotions
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
Welding lecture in detail for understanding
KTU 2019 -S7-MCN 401 MODULE 2-VINAY.pptx
Sustainable Sites - Green Building Construction
bas. eng. economics group 4 presentation 1.pptx
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
composite construction of structures.pdf
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx

Deadlock Avoidance in Operating System

  • 2. In this slide we are going to know: What is Deadlock? How can we Avoid Deadlock?
  • 3. What is Deadlock? A deadlock is a situation which occurs when a process enters in a waiting state because the requested resource is being held by another waiting process, which in turn is waiting for another resource held by another waiting process. If a process is unable to change its state indefinitely because the resources requested by it are being used by another waiting process, then the system is said to be in a deadlock.
  • 4. A practical example of Deadlock  You can't get a job without experience. You can't get experience without a job. Let’s visualize Deadlock Two processes competing for two resources in opposite order. (A) A single process goes through. (B) The later process has to wait. (C) A deadlock occurs when the first process locks the first resource at the same time as the second process locks the second resource. (D) The deadlock can be resolved by cancelling and restarting the first process.
  • 5. Deadlock Avoidance  Deadlock can be avoided if certain information about processes are available to the operating system before allocation of resources.  For every resource request, the system sees whether granting the request will cause the system to enter an unsafe state that means this state could result in deadlock. The system then only grants the requests that will lead to safe states.
  • 6. Possible States  Deadlock: No further progress is possible.  Unsafe State: A state that may allow deadlock. It is possible for a process to be in an unsafe state but for this not to result in a deadlock.  Safe State: A state is safe if it has a bunch of processes and there are enough resources for the 1st process to be finished and after it releases it’s resources there are enough resources for the next process to be proceed. There is no chance of Deadlock.
  • 7. In order to determine the condition of next state (safe/ unsafe/ deadlock) the system must know these information in advance:  Resources currently available.  Resources currently allocated to each process.  Resources that will be required and released by these processes in the future. To avoid deadlock we have to follow a simple rule. If a request causes the next state into unsafe mood or deadlock then we shouldn’t proceed the request. THE END
  • 8. Presented by: Mohammad Hafiz-Al-Masud, ID: 1209035, Session: 2012/13, Department of ICT, Comilla University.