SlideShare a Scribd company logo
Operating Systems by Muhammad Umair 
Circular Wait 
Inherited from Deadlock Conditions
Deadlock Visual Concept 
Is it a state where two ore more operations are 
waiting for each other, say a computing action 
'A' is waiting for action 'B' to complete, while 
action 'B' can only execute when 'A' is completed.
Cont.. 
• A deadlock happens in this case if Thread1 and 
Thread2 are running simultaneously, and Thread1 
acquires lock A and Thread2 acquires lock B. Then, 
they both need the lock that the other thread has to 
proceed. No advancement. 
One way to deal with a case like this would be to 
make a function which would grab two locks for a 
thread simultaneously, instead of one at a time.
Circular wait 
It only happens when there is 
a processes which are waiting 
for other resources to finish.
4 Reasons of Deadlock 
1: Mutual Exclusion 
2 : Hold and Wait 
3 : No Primitive 
4 : Circular wait 
Circular wait - Each process is waiting 
to obtain a resource which is held by 
another process.
• Thank 
You

More Related Content

What's hot

Abstract Data Types
Abstract Data TypesAbstract Data Types
Abstract Data Types
karthikeyanC40
 
OS Process Synchronization, semaphore and Monitors
OS Process Synchronization, semaphore and MonitorsOS Process Synchronization, semaphore and Monitors
OS Process Synchronization, semaphore and Monitors
sgpraju
 
Producer consumer
Producer consumerProducer consumer
Producer consumer
Mohd Tousif
 
Assignment problem branch and bound.pptx
Assignment problem branch and bound.pptxAssignment problem branch and bound.pptx
Assignment problem branch and bound.pptx
KrishnaVardhan50
 
Operating Systems - "Chapter 5 Process Synchronization"
Operating Systems - "Chapter 5 Process Synchronization"Operating Systems - "Chapter 5 Process Synchronization"
Operating Systems - "Chapter 5 Process Synchronization"
Ra'Fat Al-Msie'deen
 
Critical Section in Operating System
Critical Section in Operating SystemCritical Section in Operating System
Critical Section in Operating System
MOHIT AGARWAL
 
Os case study word
Os case study wordOs case study word
Os case study word
Dhol Yash
 
Knowledge representation
Knowledge representationKnowledge representation
Knowledge representation
Md. Tanvir Masud
 
Hadoop Distributed File System
Hadoop Distributed File SystemHadoop Distributed File System
Hadoop Distributed File System
Rutvik Bapat
 
Deadlock Avoidance - OS
Deadlock Avoidance - OSDeadlock Avoidance - OS
Deadlock Avoidance - OS
MsAnita2
 
Dead Lock in operating system
Dead Lock in operating systemDead Lock in operating system
Dead Lock in operating system
Ali Haider
 
deadlock handling
deadlock handlingdeadlock handling
deadlock handling
Suraj Kumar
 
Synchronization hardware
Synchronization hardwareSynchronization hardware
Synchronization hardware
Saeram Butt
 
Process synchronization in Operating Systems
Process synchronization in Operating SystemsProcess synchronization in Operating Systems
Process synchronization in Operating Systems
Ritu Ranjan Shrivastwa
 
Servlet life cycle
Servlet life cycleServlet life cycle
Servlet life cycle
Venkateswara Rao N
 
Unit II - 2 - Operating System - Threads
Unit II - 2 - Operating System - ThreadsUnit II - 2 - Operating System - Threads
Unit II - 2 - Operating System - Threads
cscarcas
 
Reader/writer problem
Reader/writer problemReader/writer problem
Reader/writer problem
RinkuMonani
 
System calls
System callsSystem calls
System calls
Bernard Senam
 

What's hot (20)

Abstract Data Types
Abstract Data TypesAbstract Data Types
Abstract Data Types
 
OS Process Synchronization, semaphore and Monitors
OS Process Synchronization, semaphore and MonitorsOS Process Synchronization, semaphore and Monitors
OS Process Synchronization, semaphore and Monitors
 
Producer consumer
Producer consumerProducer consumer
Producer consumer
 
Assignment problem branch and bound.pptx
Assignment problem branch and bound.pptxAssignment problem branch and bound.pptx
Assignment problem branch and bound.pptx
 
Operating Systems - "Chapter 5 Process Synchronization"
Operating Systems - "Chapter 5 Process Synchronization"Operating Systems - "Chapter 5 Process Synchronization"
Operating Systems - "Chapter 5 Process Synchronization"
 
Deadlock
DeadlockDeadlock
Deadlock
 
Critical Section in Operating System
Critical Section in Operating SystemCritical Section in Operating System
Critical Section in Operating System
 
Os case study word
Os case study wordOs case study word
Os case study word
 
Knowledge representation
Knowledge representationKnowledge representation
Knowledge representation
 
Hadoop Distributed File System
Hadoop Distributed File SystemHadoop Distributed File System
Hadoop Distributed File System
 
Deadlock Avoidance - OS
Deadlock Avoidance - OSDeadlock Avoidance - OS
Deadlock Avoidance - OS
 
Dead Lock in operating system
Dead Lock in operating systemDead Lock in operating system
Dead Lock in operating system
 
deadlock handling
deadlock handlingdeadlock handling
deadlock handling
 
Synchronization hardware
Synchronization hardwareSynchronization hardware
Synchronization hardware
 
Birch
BirchBirch
Birch
 
Process synchronization in Operating Systems
Process synchronization in Operating SystemsProcess synchronization in Operating Systems
Process synchronization in Operating Systems
 
Servlet life cycle
Servlet life cycleServlet life cycle
Servlet life cycle
 
Unit II - 2 - Operating System - Threads
Unit II - 2 - Operating System - ThreadsUnit II - 2 - Operating System - Threads
Unit II - 2 - Operating System - Threads
 
Reader/writer problem
Reader/writer problemReader/writer problem
Reader/writer problem
 
System calls
System callsSystem calls
System calls
 

Similar to Circular wait - Operating Systems

3.6 Deadlock-operating system unit 3.pptx
3.6 Deadlock-operating system unit 3.pptx3.6 Deadlock-operating system unit 3.pptx
3.6 Deadlock-operating system unit 3.pptx
svulasal
 
Ch 4 deadlock
Ch 4 deadlockCh 4 deadlock
Ch 4 deadlock
madhuributani
 
Deadlocks
DeadlocksDeadlocks
Deadlocks
Zahid Ali
 
Deadlock in dbms
Deadlock in dbmsDeadlock in dbms
Unit 3 part 1(DEADLOCK)
Unit 3 part 1(DEADLOCK)Unit 3 part 1(DEADLOCK)
Unit 3 part 1(DEADLOCK)
WajeehaBaig
 
Deadlock detection & prevention
Deadlock detection & preventionDeadlock detection & prevention
Deadlock detection & prevention
IkhtiarUddinShaHin
 
Operating system Deadlock
Operating system DeadlockOperating system Deadlock
Deadlock
DeadlockDeadlock
Java concurrency in practice
Java concurrency in practiceJava concurrency in practice
Java concurrency in practice
Deon Huang
 

Similar to Circular wait - Operating Systems (9)

3.6 Deadlock-operating system unit 3.pptx
3.6 Deadlock-operating system unit 3.pptx3.6 Deadlock-operating system unit 3.pptx
3.6 Deadlock-operating system unit 3.pptx
 
Ch 4 deadlock
Ch 4 deadlockCh 4 deadlock
Ch 4 deadlock
 
Deadlocks
DeadlocksDeadlocks
Deadlocks
 
Deadlock in dbms
Deadlock in dbmsDeadlock in dbms
Deadlock in dbms
 
Unit 3 part 1(DEADLOCK)
Unit 3 part 1(DEADLOCK)Unit 3 part 1(DEADLOCK)
Unit 3 part 1(DEADLOCK)
 
Deadlock detection & prevention
Deadlock detection & preventionDeadlock detection & prevention
Deadlock detection & prevention
 
Operating system Deadlock
Operating system DeadlockOperating system Deadlock
Operating system Deadlock
 
Deadlock
DeadlockDeadlock
Deadlock
 
Java concurrency in practice
Java concurrency in practiceJava concurrency in practice
Java concurrency in practice
 

More from Omair Imtiaz Ansari

Matlab GUI
Matlab GUIMatlab GUI
Traversals | Data Structures
Traversals | Data StructuresTraversals | Data Structures
Traversals | Data Structures
Omair Imtiaz Ansari
 
Pointers - DataStructures
Pointers - DataStructuresPointers - DataStructures
Pointers - DataStructures
Omair Imtiaz Ansari
 
Processor simulator - Computer Archetecture
Processor simulator - Computer ArchetectureProcessor simulator - Computer Archetecture
Processor simulator - Computer ArchetectureOmair Imtiaz Ansari
 
Communication Skills
Communication SkillsCommunication Skills
Communication Skills
Omair Imtiaz Ansari
 
Computer Archetecture & Organization
Computer Archetecture & OrganizationComputer Archetecture & Organization
Computer Archetecture & Organization
Omair Imtiaz Ansari
 

More from Omair Imtiaz Ansari (7)

Matlab GUI
Matlab GUIMatlab GUI
Matlab GUI
 
Traversals | Data Structures
Traversals | Data StructuresTraversals | Data Structures
Traversals | Data Structures
 
Sorting algos
Sorting algosSorting algos
Sorting algos
 
Pointers - DataStructures
Pointers - DataStructuresPointers - DataStructures
Pointers - DataStructures
 
Processor simulator - Computer Archetecture
Processor simulator - Computer ArchetectureProcessor simulator - Computer Archetecture
Processor simulator - Computer Archetecture
 
Communication Skills
Communication SkillsCommunication Skills
Communication Skills
 
Computer Archetecture & Organization
Computer Archetecture & OrganizationComputer Archetecture & Organization
Computer Archetecture & Organization
 

Recently uploaded

Web Technology LAB MANUAL for Undergraduate Programs
Web Technology  LAB MANUAL for Undergraduate ProgramsWeb Technology  LAB MANUAL for Undergraduate Programs
Web Technology LAB MANUAL for Undergraduate Programs
Chandrakant Divate
 
Dining Tables and Chairs | Furniture Store in Sarasota, Florida
Dining Tables and Chairs | Furniture Store in Sarasota, FloridaDining Tables and Chairs | Furniture Store in Sarasota, Florida
Dining Tables and Chairs | Furniture Store in Sarasota, Florida
The Sarasota Collection Home Store
 
Best Crypto Marketing Ideas to Lead Your Project to Success
Best Crypto Marketing Ideas to Lead Your Project to SuccessBest Crypto Marketing Ideas to Lead Your Project to Success
Best Crypto Marketing Ideas to Lead Your Project to Success
Intelisync
 
Office Furniture | Furniture Store in Sarasota, Florida | Sarasota Collection
Office Furniture | Furniture Store in Sarasota, Florida | Sarasota CollectionOffice Furniture | Furniture Store in Sarasota, Florida | Sarasota Collection
Office Furniture | Furniture Store in Sarasota, Florida | Sarasota Collection
The Sarasota Collection Home Store
 
Showcase Portfolio- Marian Andrea Tana.pdf
Showcase Portfolio- Marian Andrea Tana.pdfShowcase Portfolio- Marian Andrea Tana.pdf
Showcase Portfolio- Marian Andrea Tana.pdf
MarianAndreaSTana
 
Strategic Analysis of Starbucks Coffee Company - MBA.docx
Strategic Analysis of Starbucks Coffee Company - MBA.docxStrategic Analysis of Starbucks Coffee Company - MBA.docx
Strategic Analysis of Starbucks Coffee Company - MBA.docx
RAJU MAKWANA
 
How To Leak-Proof Your Magazine Business
How To Leak-Proof Your Magazine BusinessHow To Leak-Proof Your Magazine Business
How To Leak-Proof Your Magazine Business
Charlie McDermott
 

Recently uploaded (7)

Web Technology LAB MANUAL for Undergraduate Programs
Web Technology  LAB MANUAL for Undergraduate ProgramsWeb Technology  LAB MANUAL for Undergraduate Programs
Web Technology LAB MANUAL for Undergraduate Programs
 
Dining Tables and Chairs | Furniture Store in Sarasota, Florida
Dining Tables and Chairs | Furniture Store in Sarasota, FloridaDining Tables and Chairs | Furniture Store in Sarasota, Florida
Dining Tables and Chairs | Furniture Store in Sarasota, Florida
 
Best Crypto Marketing Ideas to Lead Your Project to Success
Best Crypto Marketing Ideas to Lead Your Project to SuccessBest Crypto Marketing Ideas to Lead Your Project to Success
Best Crypto Marketing Ideas to Lead Your Project to Success
 
Office Furniture | Furniture Store in Sarasota, Florida | Sarasota Collection
Office Furniture | Furniture Store in Sarasota, Florida | Sarasota CollectionOffice Furniture | Furniture Store in Sarasota, Florida | Sarasota Collection
Office Furniture | Furniture Store in Sarasota, Florida | Sarasota Collection
 
Showcase Portfolio- Marian Andrea Tana.pdf
Showcase Portfolio- Marian Andrea Tana.pdfShowcase Portfolio- Marian Andrea Tana.pdf
Showcase Portfolio- Marian Andrea Tana.pdf
 
Strategic Analysis of Starbucks Coffee Company - MBA.docx
Strategic Analysis of Starbucks Coffee Company - MBA.docxStrategic Analysis of Starbucks Coffee Company - MBA.docx
Strategic Analysis of Starbucks Coffee Company - MBA.docx
 
How To Leak-Proof Your Magazine Business
How To Leak-Proof Your Magazine BusinessHow To Leak-Proof Your Magazine Business
How To Leak-Proof Your Magazine Business
 

Circular wait - Operating Systems

  • 1. Operating Systems by Muhammad Umair Circular Wait Inherited from Deadlock Conditions
  • 2. Deadlock Visual Concept Is it a state where two ore more operations are waiting for each other, say a computing action 'A' is waiting for action 'B' to complete, while action 'B' can only execute when 'A' is completed.
  • 3. Cont.. • A deadlock happens in this case if Thread1 and Thread2 are running simultaneously, and Thread1 acquires lock A and Thread2 acquires lock B. Then, they both need the lock that the other thread has to proceed. No advancement. One way to deal with a case like this would be to make a function which would grab two locks for a thread simultaneously, instead of one at a time.
  • 4. Circular wait It only happens when there is a processes which are waiting for other resources to finish.
  • 5. 4 Reasons of Deadlock 1: Mutual Exclusion 2 : Hold and Wait 3 : No Primitive 4 : Circular wait Circular wait - Each process is waiting to obtain a resource which is held by another process.