BYTHE NAME OFALLAH
Presented To-
Ms. Mahbuba Maliha Mourin
Lecturer,Dept Of CSE
Daffodil International University
GROUP: MARS
2
 Humayra Khanum [161-15-7325]
 Rezwana Islam Ria [161-15-7071]
DEOpAeraDtingLSysOtem
CK
3
3
WHATIS DEADLOCK?
o An example from US Kansas law:
o “When two trains approach each other at a
crossing, both shall come to a full stop and
neither shall start up again until the other
has gone.”
44
Real World Deadlocks
5
Deadlock in Operating System
A DEADLOCK is a situation in which two process is sharing the same
resource and preventing each other from accessing the resource, resulting
in case where both process is not working.
Example
6
Four Conditions Of deadlock
Mutual Exclusion
At least on resource of the system is in non-sharable mode, that is only one process may use it at
any given time. Thus if any other process requests for the resource, then that process will have to
wait until the current process which is using the resource release it.
Hold and Wait
A process must exist which is already holding a resource and also waiting to grab one or more
resources which are currently being held by another processes.
No preemption
Resources can not be preempted, that is, a resource can be released only by the process that is
currently holding it, voluntarily. Thus, release of the process is out of control and a process may
hold a resource forever.
Circular Wait
There must exist a set of processes; such as, p0,p1,p2….pN; which are waiting for resources which
are in hold by other processes. The process that p0 need is in hold by p1, the process that p1 need
is in hold by p2 and so on. It is a dead-end.
7
DEADLOCK PREVENTION
Eliminate one (or more) of:
 mutual exclusion
 hold and wait
 no preemption (i.e. have preemption)
 circular wait
8
Name : Rezwana Islam Ria
ID: 161-15-7071
Banker’s Algorithm
Deadlock avoidance algorithm.
It’s less efficient than resource allocation graph
algorithm.
But it is applicable to resource allocation
system with multiple instances of each resource
type.
1
0
In this algorithm there are
following matrices:
1.N number of processes
2. m number of resources.
.Calculate safe sequence is if
possible .
1
1
Banker’s Algorithm
1
2
Banker’s Algorithm
1
3
Banker’s Algorithm
1
4
Wait For Graph
Create a wait for graph by removing the
resource type nodes from a resource allocation
graph
Deadlock exists if and only if the wait-for graph
contains a cycle.
1
5
271
6
281
7

More Related Content

PPTX
Deadlock in Operating System
PPTX
Operating system - Deadlock
PPS
Deadlock
PPTX
Deadlock- Operating System
PPTX
Deadlock Avoidance in Operating System
PPTX
Deadlock Presentation
PPTX
Chapter 4
PPT
Operating System: Deadlock
Deadlock in Operating System
Operating system - Deadlock
Deadlock
Deadlock- Operating System
Deadlock Avoidance in Operating System
Deadlock Presentation
Chapter 4
Operating System: Deadlock

What's hot (20)

PPTX
deadlock detection using Goldman's algorithm by ANIKET CHOUDHURY
PDF
Sucet os module_3_notes
PDF
Deadlock
PPTX
Deadlocks in operating system
PPTX
Deadlock avoidance and prevention .. computer networking
PPTX
PPTX
Deadlock
PPT
Mca ii os u-3 dead lock & io systems
PDF
Dead Lock In Operating Systems
DOCX
Deadlocks 160928121516-160928183232
PPT
Dead Lock
PPTX
Deadlock detection & prevention
PPTX
Dead Lock in operating system
PPTX
Deadlock ppt
PPTX
Deadlocks by wani zahoor
PDF
OS - Deadlock
PPT
Deadlock detection and recovery by saad symbian
PPT
Chapter 7 - Deadlocks
PDF
Deadlock in distribute system by saeed siddik
deadlock detection using Goldman's algorithm by ANIKET CHOUDHURY
Sucet os module_3_notes
Deadlock
Deadlocks in operating system
Deadlock avoidance and prevention .. computer networking
Deadlock
Mca ii os u-3 dead lock & io systems
Dead Lock In Operating Systems
Deadlocks 160928121516-160928183232
Dead Lock
Deadlock detection & prevention
Dead Lock in operating system
Deadlock ppt
Deadlocks by wani zahoor
OS - Deadlock
Deadlock detection and recovery by saad symbian
Chapter 7 - Deadlocks
Deadlock in distribute system by saeed siddik
Ad

Similar to Deadloack-Operating System (20)

PPTX
Deadlock
DOCX
Deadlocksprefinal 161014115456
DOCX
Deadlocks prefinal
DOCX
deadlock-operating-systems (1jjhkh).docx
PPTX
Ch 4 deadlock
DOCX
Deadlocks final
PPT
Lecture 11,12 and 13 deadlocks
PPTX
Deadlock - An Operating System Concept.pptx
PPTX
deadlock in OS.pptx
PPTX
dead-locks and deadlock handling in operating systems.pptx
PDF
OPERATING SYSTEM deadlock prevention techniques
PPT
Os module 2 d
PDF
osvishal-160830131208 (1).pdf
PPTX
Operting System- unit5-part1_Deadlock.pptx
PPTX
Deadlock-in-Operating-Systems.pptx os os
PPTX
Unit iv: Deadlocks
PDF
Unit 3 part 2(DEADLOCK)
PPT
Principles of Operating system and types
PDF
Distributed deadlock
PDF
“Understanding Distributed Deadlocks: Causes, Detection
Deadlock
Deadlocksprefinal 161014115456
Deadlocks prefinal
deadlock-operating-systems (1jjhkh).docx
Ch 4 deadlock
Deadlocks final
Lecture 11,12 and 13 deadlocks
Deadlock - An Operating System Concept.pptx
deadlock in OS.pptx
dead-locks and deadlock handling in operating systems.pptx
OPERATING SYSTEM deadlock prevention techniques
Os module 2 d
osvishal-160830131208 (1).pdf
Operting System- unit5-part1_Deadlock.pptx
Deadlock-in-Operating-Systems.pptx os os
Unit iv: Deadlocks
Unit 3 part 2(DEADLOCK)
Principles of Operating system and types
Distributed deadlock
“Understanding Distributed Deadlocks: Causes, Detection
Ad

More from Humayra Khanum (8)

PPTX
System analysis and design - presentation
PPTX
About me / Myself
PPTX
Embedded systems -Smart Cap
PPTX
Cache Memory Computer Architecture and organization
PPTX
Final project presentation CSE
PPTX
IPv4 VS IPv6
PPTX
Golden Ratio
PPTX
Golden Ratio
System analysis and design - presentation
About me / Myself
Embedded systems -Smart Cap
Cache Memory Computer Architecture and organization
Final project presentation CSE
IPv4 VS IPv6
Golden Ratio
Golden Ratio

Recently uploaded (20)

PPTX
ASME PCC-02 TRAINING -DESKTOP-NLE5HNP.pptx
PPTX
A Brief Introduction to IoT- Smart Objects: The "Things" in IoT
PDF
Unit I -OPERATING SYSTEMS_SRM_KATTANKULATHUR.pptx.pdf
PDF
Unit1 - AIML Chapter 1 concept and ethics
PPTX
Measurement Uncertainty and Measurement System analysis
PDF
20250617 - IR - Global Guide for HR - 51 pages.pdf
PPTX
mechattonicsand iotwith sensor and actuator
PDF
Prof. Dr. KAYIHURA A. SILAS MUNYANEZA, PhD..pdf
PDF
Design Guidelines and solutions for Plastics parts
PPTX
Sorting and Hashing in Data Structures with Algorithms, Techniques, Implement...
PPTX
Software Engineering and software moduleing
PDF
Influence of Green Infrastructure on Residents’ Endorsement of the New Ecolog...
PDF
Exploratory_Data_Analysis_Fundamentals.pdf
PDF
Implantable Drug Delivery System_NDDS_BPHARMACY__SEM VII_PCI .pdf
PPTX
Graph Data Structures with Types, Traversals, Connectivity, and Real-Life App...
PPTX
Feature types and data preprocessing steps
PPTX
Building constraction Conveyance of water.pptx
PPTX
CyberSecurity Mobile and Wireless Devices
PDF
UEFA_Embodied_Carbon_Emissions_Football_Infrastructure.pdf
PDF
distributed database system" (DDBS) is often used to refer to both the distri...
ASME PCC-02 TRAINING -DESKTOP-NLE5HNP.pptx
A Brief Introduction to IoT- Smart Objects: The "Things" in IoT
Unit I -OPERATING SYSTEMS_SRM_KATTANKULATHUR.pptx.pdf
Unit1 - AIML Chapter 1 concept and ethics
Measurement Uncertainty and Measurement System analysis
20250617 - IR - Global Guide for HR - 51 pages.pdf
mechattonicsand iotwith sensor and actuator
Prof. Dr. KAYIHURA A. SILAS MUNYANEZA, PhD..pdf
Design Guidelines and solutions for Plastics parts
Sorting and Hashing in Data Structures with Algorithms, Techniques, Implement...
Software Engineering and software moduleing
Influence of Green Infrastructure on Residents’ Endorsement of the New Ecolog...
Exploratory_Data_Analysis_Fundamentals.pdf
Implantable Drug Delivery System_NDDS_BPHARMACY__SEM VII_PCI .pdf
Graph Data Structures with Types, Traversals, Connectivity, and Real-Life App...
Feature types and data preprocessing steps
Building constraction Conveyance of water.pptx
CyberSecurity Mobile and Wireless Devices
UEFA_Embodied_Carbon_Emissions_Football_Infrastructure.pdf
distributed database system" (DDBS) is often used to refer to both the distri...

Deadloack-Operating System

  • 1. BYTHE NAME OFALLAH Presented To- Ms. Mahbuba Maliha Mourin Lecturer,Dept Of CSE Daffodil International University
  • 2. GROUP: MARS 2  Humayra Khanum [161-15-7325]  Rezwana Islam Ria [161-15-7071]
  • 4. WHATIS DEADLOCK? o An example from US Kansas law: o “When two trains approach each other at a crossing, both shall come to a full stop and neither shall start up again until the other has gone.” 44
  • 6. Deadlock in Operating System A DEADLOCK is a situation in which two process is sharing the same resource and preventing each other from accessing the resource, resulting in case where both process is not working. Example 6
  • 7. Four Conditions Of deadlock Mutual Exclusion At least on resource of the system is in non-sharable mode, that is only one process may use it at any given time. Thus if any other process requests for the resource, then that process will have to wait until the current process which is using the resource release it. Hold and Wait A process must exist which is already holding a resource and also waiting to grab one or more resources which are currently being held by another processes. No preemption Resources can not be preempted, that is, a resource can be released only by the process that is currently holding it, voluntarily. Thus, release of the process is out of control and a process may hold a resource forever. Circular Wait There must exist a set of processes; such as, p0,p1,p2….pN; which are waiting for resources which are in hold by other processes. The process that p0 need is in hold by p1, the process that p1 need is in hold by p2 and so on. It is a dead-end. 7
  • 8. DEADLOCK PREVENTION Eliminate one (or more) of:  mutual exclusion  hold and wait  no preemption (i.e. have preemption)  circular wait 8
  • 9. Name : Rezwana Islam Ria ID: 161-15-7071
  • 10. Banker’s Algorithm Deadlock avoidance algorithm. It’s less efficient than resource allocation graph algorithm. But it is applicable to resource allocation system with multiple instances of each resource type. 1 0
  • 11. In this algorithm there are following matrices: 1.N number of processes 2. m number of resources. .Calculate safe sequence is if possible . 1 1
  • 15. Wait For Graph Create a wait for graph by removing the resource type nodes from a resource allocation graph Deadlock exists if and only if the wait-for graph contains a cycle. 1 5
  • 16. 271 6
  • 17. 281 7