wisemonkeys logo
FeedNotificationProfileManage Forms
FeedNotificationSearchSign in
wisemonkeys logo

Blogs

Deadlock

profile
Vansh Dedhia
Aug 13, 2024
0 Likes
0 Discussions
106 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

Education: Key to your Prosperity

Blog banner

VIRTUAL MACHINES

Blog banner

Defining youtubr

Blog banner

Threads and concurrency

Blog banner

Rock, Paper, Scissors Game in Common Lisp

Blog banner

Inventory management software system

Blog banner

Never give up

Blog banner

INTRODUCTION TO C#

Blog banner

The Impact of Cyber Forensics on Corporate Governance and Compliance

Blog banner

File Sharing

Blog banner

Steps to create an Ubuntu EC2 Instance with GUI in AWS

Blog banner

Types Of Interrupt

Blog banner

Memory management

Blog banner

Volatile Memory & Non-Volatile Memory Explained

Blog banner

Computer Security

Blog banner

TECHNOLOGY : BOON OR CURSE ?

Blog banner

The Evolution of the Microprocessor ~ Aditya Pai

Blog banner

RAID

Blog banner

" THE ANSWERS THAT LED INDIAN BEAUTIES TO THE MISS UNIVERSE HISTORIC WIN. "

Blog banner

Deadlock

Blog banner

NETWORK SECURITY RISKS

Blog banner

How to Run your First android App

Blog banner

Synchronization

Blog banner

Direct Memory Access

Blog banner

Business-to-Business

Blog banner

The Dark Web: A Breeding Ground for Cybercriminals – How to Guard Against Threats

Blog banner

FRIENDSHIP

Blog banner

E-commerce

Blog banner

APACHE KAFKA

Blog banner

First-Order Logic (FOL): The Foundation of Modern Logic

Blog banner

Deadlock and starvation

Blog banner

Os assignment

Blog banner

Deadlock and Starvation

Blog banner

Game Theory in Blockchain

Blog banner

Constrains in service design

Blog banner

Cache memory

Blog banner

Coping with Diagnosis Shock

Blog banner

Types of OS

Blog banner

Cache Memory

Blog banner

Impact of social media on the human life

Blog banner

File Systems in OS.

Blog banner

RAID - LEVELS OF RAID

Blog banner