×

Strategies for Handling Deadlock

Strategies for Handling Deadlock

The Strategies for handling Deadlock are:

  1. Deadlock Ignorance
  2. Deadlock Prevention
  3. Deadlock Avoidance
  4. Deadlock Detection and Recovery

Deadlock Ignorance

Deadlock Ignorance is the most popular deadlock handling strategy. We can use this in the various operating systems for end-users uses. In the deadlock ignorance mechanism, the OS assumes that Deadlock will not happen and ignores the Deadlock.

Deadlock ignorance is one of the suitable mechanisms for a single end-user system in which the user uses the resources for browsing and some ordinary stuff.

Always there is a tradeoff between performance and correctness. The Linux and Windows operating systems are more focused on the performance. Although, if all the time we use the deadlock handling mechanism, then due to this, the system performance decreases. When Deadlock occurs 1 out of 100 times, then the use of the deadlock handling mechanism is irrelevant.

In this, the user only needs to restart the computer in the situation of Deadlock, and mostly we use this approach in Linux and Windows operating system.

Deadlock Prevention

Every time Deadlock occurs at the time when the four conditions happen concurrently, and the four conditions are Mutual Exclusion, Hold and Wait, No Preemption, and Circular Wait. If there is a possibility of interrupting one of the conditions among the four conditions, then we can stop the occurrence of Deadlock in the system.

There is a simple reason behind this mechanism. That is, we only have to fail in any one of the conditions.

Deadlock Avoidance

Another approach used for handling a deadlock is deadlock avoidance. In this approach, the OS verifies or examines the system state means it checks that system is in a safe state or unsafe state at each step. And this process continues until the system is in the safe system. If the system comes into an unsafe state, then, in this case, the operating system will backtrack one step.

In other words, the operating system verifies every allocation so that the Deadlock may not occur in the system.

Deadlock Detection and Recovery

In Deadlock Detection and Recovery, we regularly check that Deadlock has occurred or not in the system. And if there is a deadlock in the system, then we apply some methods to remove Deadlock in the system.


Related Topics

FCFS Scheduling in OS

FCFS: First Come First Serve Scheduling in OS FCFS is a non-preemptive and preemptive scheduling algorithm that is easy to understand and use. In this, the process which reaches first is...

3 minutes read.

Multiprogramming Operating System

You will discover more about the multiprogramming operating system in this post, including how it functions and its benefits and drawbacks. Each process needs several types of system time, including CPU...

4 minutes read.

Bit Vector in Operating System

What is Bit vector? Bit vector is one of the most important methods used in the free space management of operating system. Free space management which is used by the operating...

3 minutes read.

Deadlock Detection and Recovery

Deadlock Detection and Recovery In deadlock detection and recovery, to avoid or prevent a deadlock, the operating system uses various methods. For checking deadlock, an operating system continuously monitors the system. Then also,...

2 minutes read.

MS-DOS Operating System

It is also referred to occasionally as "DOS", an abbreviation for disc operating systems. Operating systems with a graphical user interface (GUI) in different iterations of the graphical Microsoft Windows...

5 minutes read.

Booting Process in Operating System

What is Booting? Booting is defined as the term which says that the process of loading the operating system into the memory. The process of booting begins when we switch on...

4 minutes read.

File Allocation Methods in Operating System

A file allocation method is a way that an operating system stores and retrieves files on a storage device, such as a hard drive or SSD. The file allocation method...

4 minutes read.

5 Goals of Operating System

An Operating System (OS) is system software that acts as an interface or bridge between the hardware of a computer and the end user. Operating System reduces the communication barrier between the...

4 minutes read.

Multi-user Operating Systems

Introduction Since only one user may interact with the computer at any given time, the operating system we use on our personal computers, laptops, tablets, and phones is sometimes referred to...

8 minutes read.

Process Schedulers and Process Queue in OS

Process Schedulers There are various types of Process Schedulers: Long Term SchedulerShort Term SchedulerMedium Term Scheduler                                            Long Term Scheduler: - Long term scheduler is also referred to as Job Scheduler. The task of the Long-term...

3 minutes read.

N-Step-SCAN Disk Scheduling

Before you study about N-Step-SCAN Disk Scheduling, it requires prerequisite of what is Disk Scheduling Algorithms: Operating systems use disc scheduling to schedule I/O requests that arrive at the disc....

4 minutes read.

Evolution of Operating System

Evolution of Operating System The evolution of various types of operating systems can be briefly described as follows: Serial Processing Since 1950, the operating system started to be in use. Before 1950, there...

5 minutes read.

Non-Contiguous Memory Allocation in Operating System

Memory is nothing but a storage space where various data are stored. We can store data in temporary and permanent memory as per our future requirements for data. We can...

9 minutes read.

Difference between Rotational Latency and Disk Assess Time in Disk Scheduling

Disk scheduling is used by operating systems to arrange the arrival of I/O requests to the disc. Disk scheduling is necessary because several I/O requests may occur from various processes,...

4 minutes read.

Ubuntu Operating System

Ubuntu Operating System Ubuntu is an open-source and a Linux based operating system. Ubuntu is developed for the Network Servers, Computers, and Smartphones. The Ubuntu operating system was developed by Canonical...

3 minutes read.

Priority Scheduling in OS

Priority Scheduling is a type of CPU Scheduling algorithm which is used for process scheduling. In Priority Scheduling, we assign some priorities to each process. The process which has higher priority among all...

5 minutes read.

Segmentation in Operating System

The term segmentation in operating system refers to the division of computer memory into segments. Segmentation is a technique used by many modern operating systems to provide better memory management....

4 minutes read.

Functions of Operating System

The functions of Operating System are: Process Management Memory Management File Management Device Management Secondary storage Management Security Coordination between other software and users Networking Job Accounting Error detecting aids 1. Process Management Process Management support operating system to create and delete...

3 minutes read.

Can a Computer Run Without the Operating System

Computers may function right out of the box, mostly due to operating systems. Nowadays, there are probably already some pre-installed apps in a new computer when you buy one. Have...

9 minutes read.

What is Context Switching

Context Switching is the switching of CPU from one process to another process. Context switching means storing the process state so that we can reload the process when needed, and the execution...

3 minutes read.