wisemonkeys logo
FeedNotificationProfileManage Forms
FeedNotificationSearchSign in
wisemonkeys logo

Blogs

Deadlock

profile
Vansh Dedhia
Aug 13, 2024
0 Likes
0 Discussions
108 Reads

A deadlock in an operating system occurs when a set of processes become stuck in a state where each process is waiting for a resource that another process in the set is holding. As a result, none of the processes can proceed, and they all remain in a state of perpetual waiting.

 

Deadlock Recovery:

When a deadlock occurs, the system must recover from it to ensure that the processes can eventually complete. There are several methods for deadlock recovery:

 

1. Process Termination:

   - Abort All Deadlocked Processes: The simplest solution is to terminate all the processes involved in the deadlock. This guarantees recovery but can result in significant work being lost.

   - Abort One Process at a Time: A more refined approach is to abort processes one by one until the deadlock is resolved. The choice of which process to terminate can be based on factors such as the process's priority, the amount of work it has done, or the resources it holds.

 

2. Resource Preemption:

   - Preempt Resources: Temporarily take resources away from some processes and give them to others. This can break the circular wait condition.

   - Rollback: Roll back one or more processes to an earlier safe state and restart them, allowing the system to avoid deadlock. This method requires the system to maintain sufficient information about the states of processes.

 

3. Process Migration:

   - Move Processes to Different Systems: In distributed systems, processes can be moved to other systems where the required resources are available. This approach can help avoid deadlock but requires advanced system capabilities.

 

4. Combination Methods:

   - Sometimes, a combination of process termination and resource preemption might be used to resolve deadlocks more effectively.

 

The choice of deadlock recovery method depends on the specific system and the criticality of the processes involved.


Comments ()


Sign in

Read Next

MORDERN UNIX SYSTEM

Blog banner

Cryptanalysis tool

Blog banner

Power of words

Blog banner

THE INPACT OF SOCIAL MEDIA!

Blog banner

Earth with no trees

Blog banner

Drawing tips for a beginner

Blog banner

John Titor: The Time Traveler

Blog banner

SNAPCHAT

Blog banner

How to use GIT & GITHUB

Blog banner

A-B-C of Networking: Part-3 (Topology [Ring, Tree, Mesh])

Blog banner

Be you

Blog banner

OPERATING SYSTEM OBJECTIVES AND FUNCTIONS

Blog banner

Flipkart

Blog banner

Atlantis - The Lost Island.........

Blog banner

Distributed Denial of Service (DDoS) attack

Blog banner

Cross site scripting Attack

Blog banner

1.1 basic elements

Blog banner

Deadlock and Starvation

Blog banner

Functions of Operating System

Blog banner

Scheduling

Blog banner

Lemon and Chilli Pickle (Limbu Mirchi Achar)

Blog banner

Women’s Mental Health (After Marriage)

Blog banner

Clustering Techniques

Blog banner

What are Tenders its various types

Blog banner

Street foods

Blog banner

A BLOG ON MYSQL

Blog banner

PERT Overview

Blog banner

Beatbox

Blog banner

IP ADDRESS

Blog banner

This is my first blog.

Blog banner

Marvel Cinematic Universe

Blog banner

Dekkers Algorithm

Blog banner

What is thread and alse multithreading

Blog banner

Real-Time Operating Systems (RTOS) Deep Explanation

Blog banner

Modern Operating System

Blog banner

?Why Social and Emotional Skills Matter More Than ABCs in Early Years?

Blog banner

SMARTSHEET MANAGEMENT SOFTWARE

Blog banner

Which Smartphone Company Has the Largest Market Share in India?

Blog banner

Building a Better You: Fitness Tips and Inspiration.

Blog banner

The Laws of Karma

Blog banner

Improving the Accuracy of GPS and GNSS

Blog banner

Unlocking the Secrets: Basic Operations of Computer Forensic Laboratories

Blog banner