SlideShare a Scribd company logo
1 of 14
Presented by :
Saad Wazir
BS-CS
REG# 1421-212019


                                                PRESTON
                   Thursday , August 09, 2012   University
Deadlock Definition :
   There exists a cycle of processes such that each
    process cannot proceed until the next process
    takes some specific action.

   Result: all processes in the cycle are stuck!


                                P1        R2



                                R1        P2
Deadlock solutions:
- Prevention :
• Design system so that deadlock is impossible
- Avoidance :
• Steer around deadlock with smart scheduling
- Detection & recovery :
• Check for deadlock periodically
• Recover by killing a deadlocked processes and releasing its resources
- Do nothing :
• Prevention, avoidance and detection/recovery are expensive
• Manual intervention (kill processes, reboot) if needed
Deadlock Prevention:

#1: No mutual exclusion
• only one process at a time can use a resource.
#2: no preemption
• previously granted resources cannot forcibly taken away.
#3: No hold and wait
• When waiting for a resource, must not currently hold any resource
#4: circular wait condition
• Must be A circular chain of 2 or more processes
• When Waiting For Resource Must Not Currently Hold Any Resource
Over View OF Deadlock Detection & Recovery :
Deadlock Detection :

Check to see if a deadlock has occurred!

- Special case: Single resource per type
• E.g., mutex locks (value is zero or one)
• Check for cycles in the resource allocation graph
- General case
• E.g., semaphores, memory pages, ...
Dependencies B/W processes:




                               Corresponding
Resource allocation graph
                            process dependency
                                   graph
Deadlock Recovery:
Recovery idea: get rid of the cycles in
the process dependency graph

Options:
• Kill all deadlocked processes.
• Kill one deadlocked process at a time and
release its resources.
• Steal one resource at a time.
• Roll back all or one of the processes to
Safe state.
Deadlock Recovery:


      Only have to                       Have to kill
        kill one                         one more




                 Corresponding Process
                   dependency graph
Deadlock Recovery:

 How should we pick a process to kill?
 We might consider...

 • process priority
 • current computation time and time to completion
 • amount of resources used by the process
 • amount of resources needed by the process to complete
 • is process interactive or batch?
Rollback instead of killing processes:
 Selecting a victim
 • Minimize cost of rollback (e.g., size of process’s memory).

 Rollback
 • Return to some safe state
 • Restart process for that state


 Note: Large, long computations are
 sometimes checkpointed for other reasons (reliability) anyway
Deadlock Summary:
 Deadlock: cycle of processes/threads each waiting for the next
 • Nasty timing-dependent bugs!

 Detection & Recovery
 • Typically very expensive to kill / checkpoint processes

 Avoidance: steer around deadlock
 • Requires knowledge of everything an application will request
 • Expensive to perform on each scheduling event
Hope you enjoy & learn something 



                         Special Thanks to :
Philip Godfrey
CS 241
University of Illinois                Fahad Wazir (Little Brother) , kamran Shah & Mian Abdul


                                                                               PRESTON
                                               Thursday , August 09, 2012      University

More Related Content

What's hot

15. Transactions in DBMS
15. Transactions in DBMS15. Transactions in DBMS
15. Transactions in DBMSkoolkampus
 
2 PHASE COMMIT PROTOCOL
2 PHASE COMMIT PROTOCOL2 PHASE COMMIT PROTOCOL
2 PHASE COMMIT PROTOCOLKABILESH RAMAR
 
Deadlock Detection
Deadlock DetectionDeadlock Detection
Deadlock DetectionStuart Joy
 
Threads (operating System)
Threads (operating System)Threads (operating System)
Threads (operating System)Prakhar Maurya
 
DeadLock in Operating-Systems
DeadLock in Operating-SystemsDeadLock in Operating-Systems
DeadLock in Operating-SystemsVenkata Sreeram
 
Introduction to distributed database
Introduction to distributed databaseIntroduction to distributed database
Introduction to distributed databaseSonia Panesar
 
Distributed file system
Distributed file systemDistributed file system
Distributed file systemAnamika Singh
 
File organization 1
File organization 1File organization 1
File organization 1Rupali Rana
 
Memory Management in OS
Memory Management in OSMemory Management in OS
Memory Management in OSvampugani
 
Distributed DBMS - Unit 8 - Distributed Transaction Management & Concurrency ...
Distributed DBMS - Unit 8 - Distributed Transaction Management & Concurrency ...Distributed DBMS - Unit 8 - Distributed Transaction Management & Concurrency ...
Distributed DBMS - Unit 8 - Distributed Transaction Management & Concurrency ...Gyanmanjari Institute Of Technology
 
Dead Lock In Operating Systems
Dead Lock In Operating SystemsDead Lock In Operating Systems
Dead Lock In Operating Systemstotallooser
 
Page replacement algorithms
Page replacement algorithmsPage replacement algorithms
Page replacement algorithmsPiyush Rochwani
 
FUNCTION DEPENDENCY AND TYPES & EXAMPLE
FUNCTION DEPENDENCY  AND TYPES & EXAMPLEFUNCTION DEPENDENCY  AND TYPES & EXAMPLE
FUNCTION DEPENDENCY AND TYPES & EXAMPLEVraj Patel
 
Memory Management in OS
Memory Management in OSMemory Management in OS
Memory Management in OSKumar Pritam
 
File concept and access method
File concept and access methodFile concept and access method
File concept and access methodrajshreemuthiah
 
management of distributed transactions
management of distributed transactionsmanagement of distributed transactions
management of distributed transactionsNilu Desai
 

What's hot (20)

15. Transactions in DBMS
15. Transactions in DBMS15. Transactions in DBMS
15. Transactions in DBMS
 
2 PHASE COMMIT PROTOCOL
2 PHASE COMMIT PROTOCOL2 PHASE COMMIT PROTOCOL
2 PHASE COMMIT PROTOCOL
 
Deadlock Detection
Deadlock DetectionDeadlock Detection
Deadlock Detection
 
Threads (operating System)
Threads (operating System)Threads (operating System)
Threads (operating System)
 
Virtual memory ppt
Virtual memory pptVirtual memory ppt
Virtual memory ppt
 
2 phase locking protocol DBMS
2 phase locking protocol DBMS2 phase locking protocol DBMS
2 phase locking protocol DBMS
 
DeadLock in Operating-Systems
DeadLock in Operating-SystemsDeadLock in Operating-Systems
DeadLock in Operating-Systems
 
Introduction to distributed database
Introduction to distributed databaseIntroduction to distributed database
Introduction to distributed database
 
Distributed file system
Distributed file systemDistributed file system
Distributed file system
 
File organization 1
File organization 1File organization 1
File organization 1
 
Memory Management in OS
Memory Management in OSMemory Management in OS
Memory Management in OS
 
Distributed DBMS - Unit 8 - Distributed Transaction Management & Concurrency ...
Distributed DBMS - Unit 8 - Distributed Transaction Management & Concurrency ...Distributed DBMS - Unit 8 - Distributed Transaction Management & Concurrency ...
Distributed DBMS - Unit 8 - Distributed Transaction Management & Concurrency ...
 
Dead Lock In Operating Systems
Dead Lock In Operating SystemsDead Lock In Operating Systems
Dead Lock In Operating Systems
 
Page replacement algorithms
Page replacement algorithmsPage replacement algorithms
Page replacement algorithms
 
FUNCTION DEPENDENCY AND TYPES & EXAMPLE
FUNCTION DEPENDENCY  AND TYPES & EXAMPLEFUNCTION DEPENDENCY  AND TYPES & EXAMPLE
FUNCTION DEPENDENCY AND TYPES & EXAMPLE
 
Memory Management in OS
Memory Management in OSMemory Management in OS
Memory Management in OS
 
File concept and access method
File concept and access methodFile concept and access method
File concept and access method
 
Deadlock Avoidance in Operating System
Deadlock Avoidance in Operating SystemDeadlock Avoidance in Operating System
Deadlock Avoidance in Operating System
 
Mutual exclusion and sync
Mutual exclusion and syncMutual exclusion and sync
Mutual exclusion and sync
 
management of distributed transactions
management of distributed transactionsmanagement of distributed transactions
management of distributed transactions
 

Viewers also liked

Deadlock Detection
Deadlock DetectionDeadlock Detection
Deadlock DetectionPOOJA MEHTA
 
Deadlock detection in distributed systems
Deadlock detection in distributed systemsDeadlock detection in distributed systems
Deadlock detection in distributed systemsReza Ramezani
 
Deadlock detection
Deadlock detectionDeadlock detection
Deadlock detectionNadia Nahar
 
deadlock detection using Goldman's algorithm by ANIKET CHOUDHURY
deadlock detection using Goldman's algorithm by ANIKET CHOUDHURYdeadlock detection using Goldman's algorithm by ANIKET CHOUDHURY
deadlock detection using Goldman's algorithm by ANIKET CHOUDHURYअनिकेत चौधरी
 
Deadlock in distribute system by saeed siddik
Deadlock in distribute system by saeed siddikDeadlock in distribute system by saeed siddik
Deadlock in distribute system by saeed siddikSaeed Siddik
 
Chapter 03
Chapter 03Chapter 03
Chapter 03 Google
 
Google Fusion Tables - Silicon Valley CodeCamp 2010
Google Fusion Tables - Silicon Valley CodeCamp 2010Google Fusion Tables - Silicon Valley CodeCamp 2010
Google Fusion Tables - Silicon Valley CodeCamp 2010Kathryn Brisbin
 
protocols of concurrency control
protocols of concurrency controlprotocols of concurrency control
protocols of concurrency controlMOHIT DADU
 
Storage Management - Lecture 8 - Introduction to Databases (1007156ANR)
Storage Management - Lecture 8 - Introduction to Databases (1007156ANR)Storage Management - Lecture 8 - Introduction to Databases (1007156ANR)
Storage Management - Lecture 8 - Introduction to Databases (1007156ANR)Beat Signer
 
OS scheduling and The anatomy of a context switch
OS scheduling and The anatomy of a context switchOS scheduling and The anatomy of a context switch
OS scheduling and The anatomy of a context switchDaniel Ben-Zvi
 
Lecture 19.1a- Acid/Base Properties
Lecture 19.1a- Acid/Base PropertiesLecture 19.1a- Acid/Base Properties
Lecture 19.1a- Acid/Base PropertiesMary Beth Smith
 
Transaction states and properties
Transaction states and propertiesTransaction states and properties
Transaction states and propertiesChetan Mahawar
 
Concurrency (Distributed computing)
Concurrency (Distributed computing)Concurrency (Distributed computing)
Concurrency (Distributed computing)Sri Prasanna
 

Viewers also liked (20)

Deadlock Detection
Deadlock DetectionDeadlock Detection
Deadlock Detection
 
Deadlock detection in distributed systems
Deadlock detection in distributed systemsDeadlock detection in distributed systems
Deadlock detection in distributed systems
 
Deadlock detection
Deadlock detectionDeadlock detection
Deadlock detection
 
Distributed deadlock
Distributed deadlockDistributed deadlock
Distributed deadlock
 
deadlock detection using Goldman's algorithm by ANIKET CHOUDHURY
deadlock detection using Goldman's algorithm by ANIKET CHOUDHURYdeadlock detection using Goldman's algorithm by ANIKET CHOUDHURY
deadlock detection using Goldman's algorithm by ANIKET CHOUDHURY
 
Deadlock in distribute system by saeed siddik
Deadlock in distribute system by saeed siddikDeadlock in distribute system by saeed siddik
Deadlock in distribute system by saeed siddik
 
Chapter 7 - Deadlocks
Chapter 7 - DeadlocksChapter 7 - Deadlocks
Chapter 7 - Deadlocks
 
Chapter 03
Chapter 03Chapter 03
Chapter 03
 
Google Fusion Tables - Silicon Valley CodeCamp 2010
Google Fusion Tables - Silicon Valley CodeCamp 2010Google Fusion Tables - Silicon Valley CodeCamp 2010
Google Fusion Tables - Silicon Valley CodeCamp 2010
 
protocols of concurrency control
protocols of concurrency controlprotocols of concurrency control
protocols of concurrency control
 
Storage Management - Lecture 8 - Introduction to Databases (1007156ANR)
Storage Management - Lecture 8 - Introduction to Databases (1007156ANR)Storage Management - Lecture 8 - Introduction to Databases (1007156ANR)
Storage Management - Lecture 8 - Introduction to Databases (1007156ANR)
 
INTERNRESUME
INTERNRESUMEINTERNRESUME
INTERNRESUME
 
OS scheduling and The anatomy of a context switch
OS scheduling and The anatomy of a context switchOS scheduling and The anatomy of a context switch
OS scheduling and The anatomy of a context switch
 
GIS Mapping Webinar Part 3
GIS Mapping Webinar Part 3  GIS Mapping Webinar Part 3
GIS Mapping Webinar Part 3
 
Lecture 19.1a- Acid/Base Properties
Lecture 19.1a- Acid/Base PropertiesLecture 19.1a- Acid/Base Properties
Lecture 19.1a- Acid/Base Properties
 
Deadlock
DeadlockDeadlock
Deadlock
 
Transaction states and properties
Transaction states and propertiesTransaction states and properties
Transaction states and properties
 
Concurrency (Distributed computing)
Concurrency (Distributed computing)Concurrency (Distributed computing)
Concurrency (Distributed computing)
 
OSCh10
OSCh10OSCh10
OSCh10
 
Distributed Transaction
Distributed TransactionDistributed Transaction
Distributed Transaction
 

Similar to Deadlock detection and recovery by saad symbian

Dmitriy Desyatkov "Secure SDLC or Security Culture to be or not to be"
Dmitriy Desyatkov "Secure SDLC or Security Culture to be or not to be"Dmitriy Desyatkov "Secure SDLC or Security Culture to be or not to be"
Dmitriy Desyatkov "Secure SDLC or Security Culture to be or not to be"WrikeTechClub
 
deadlock and starvation resources allocation.pptx
deadlock and starvation resources allocation.pptxdeadlock and starvation resources allocation.pptx
deadlock and starvation resources allocation.pptxSaba651353
 
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.pptxsvulasal
 
24 to 25 deadlockprevention
24 to 25 deadlockprevention24 to 25 deadlockprevention
24 to 25 deadlockpreventionmyrajendra
 
Deadlock in Operating System
Deadlock in Operating SystemDeadlock in Operating System
Deadlock in Operating SystemAUST
 
3 (1) [Autosaved].ppt
3 (1) [Autosaved].ppt3 (1) [Autosaved].ppt
3 (1) [Autosaved].pptamadayshwan
 
The Functions of the Operating System
The Functions of the Operating SystemThe Functions of the Operating System
The Functions of the Operating Systemandyr91
 

Similar to Deadlock detection and recovery by saad symbian (20)

Deadlock in Operating Systems
Deadlock in Operating SystemsDeadlock in Operating Systems
Deadlock in Operating Systems
 
Dmitriy Desyatkov "Secure SDLC or Security Culture to be or not to be"
Dmitriy Desyatkov "Secure SDLC or Security Culture to be or not to be"Dmitriy Desyatkov "Secure SDLC or Security Culture to be or not to be"
Dmitriy Desyatkov "Secure SDLC or Security Culture to be or not to be"
 
06-Deadlocks.ppt
06-Deadlocks.ppt06-Deadlocks.ppt
06-Deadlocks.ppt
 
chapter06-new.pptx
chapter06-new.pptxchapter06-new.pptx
chapter06-new.pptx
 
deadlock and starvation resources allocation.pptx
deadlock and starvation resources allocation.pptxdeadlock and starvation resources allocation.pptx
deadlock and starvation resources allocation.pptx
 
Chapter06.ppt
Chapter06.pptChapter06.ppt
Chapter06.ppt
 
Ch 4 deadlock
Ch 4 deadlockCh 4 deadlock
Ch 4 deadlock
 
Chapter06
Chapter06Chapter06
Chapter06
 
Deadlocks1
Deadlocks1Deadlocks1
Deadlocks1
 
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
 
24 to 25 deadlockprevention
24 to 25 deadlockprevention24 to 25 deadlockprevention
24 to 25 deadlockprevention
 
Deadlock Slides
Deadlock SlidesDeadlock Slides
Deadlock Slides
 
Deadlocks
DeadlocksDeadlocks
Deadlocks
 
3 (2).ppt
3 (2).ppt3 (2).ppt
3 (2).ppt
 
Deadlock in Operating System
Deadlock in Operating SystemDeadlock in Operating System
Deadlock in Operating System
 
Deadlocks2
Deadlocks2Deadlocks2
Deadlocks2
 
Deadlocks
DeadlocksDeadlocks
Deadlocks
 
3 (1) [Autosaved].ppt
3 (1) [Autosaved].ppt3 (1) [Autosaved].ppt
3 (1) [Autosaved].ppt
 
Deadlocks
DeadlocksDeadlocks
Deadlocks
 
The Functions of the Operating System
The Functions of the Operating SystemThe Functions of the Operating System
The Functions of the Operating System
 

Recently uploaded

Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelDeepika Singh
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...apidays
 

Recently uploaded (20)

Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 

Deadlock detection and recovery by saad symbian

  • 1. Presented by : Saad Wazir BS-CS REG# 1421-212019 PRESTON Thursday , August 09, 2012 University
  • 2. Deadlock Definition :  There exists a cycle of processes such that each process cannot proceed until the next process takes some specific action.  Result: all processes in the cycle are stuck! P1 R2 R1 P2
  • 3. Deadlock solutions: - Prevention : • Design system so that deadlock is impossible - Avoidance : • Steer around deadlock with smart scheduling - Detection & recovery : • Check for deadlock periodically • Recover by killing a deadlocked processes and releasing its resources - Do nothing : • Prevention, avoidance and detection/recovery are expensive • Manual intervention (kill processes, reboot) if needed
  • 4. Deadlock Prevention: #1: No mutual exclusion • only one process at a time can use a resource. #2: no preemption • previously granted resources cannot forcibly taken away. #3: No hold and wait • When waiting for a resource, must not currently hold any resource #4: circular wait condition • Must be A circular chain of 2 or more processes • When Waiting For Resource Must Not Currently Hold Any Resource
  • 5.
  • 6. Over View OF Deadlock Detection & Recovery :
  • 7. Deadlock Detection : Check to see if a deadlock has occurred! - Special case: Single resource per type • E.g., mutex locks (value is zero or one) • Check for cycles in the resource allocation graph - General case • E.g., semaphores, memory pages, ...
  • 8. Dependencies B/W processes: Corresponding Resource allocation graph process dependency graph
  • 9. Deadlock Recovery: Recovery idea: get rid of the cycles in the process dependency graph Options: • Kill all deadlocked processes. • Kill one deadlocked process at a time and release its resources. • Steal one resource at a time. • Roll back all or one of the processes to Safe state.
  • 10. Deadlock Recovery: Only have to Have to kill kill one one more Corresponding Process dependency graph
  • 11. Deadlock Recovery: How should we pick a process to kill? We might consider... • process priority • current computation time and time to completion • amount of resources used by the process • amount of resources needed by the process to complete • is process interactive or batch?
  • 12. Rollback instead of killing processes: Selecting a victim • Minimize cost of rollback (e.g., size of process’s memory). Rollback • Return to some safe state • Restart process for that state Note: Large, long computations are sometimes checkpointed for other reasons (reliability) anyway
  • 13. Deadlock Summary: Deadlock: cycle of processes/threads each waiting for the next • Nasty timing-dependent bugs! Detection & Recovery • Typically very expensive to kill / checkpoint processes Avoidance: steer around deadlock • Requires knowledge of everything an application will request • Expensive to perform on each scheduling event
  • 14. Hope you enjoy & learn something  Special Thanks to : Philip Godfrey CS 241 University of Illinois Fahad Wazir (Little Brother) , kamran Shah & Mian Abdul PRESTON Thursday , August 09, 2012 University