×

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

Advantages of UNIX Operating System

What is UNIX OS? UNIX is a family of multitasking, multiuser operating systems that are used on a wide variety of computer platforms. It was developed in the late 1960s and...

4 minutes read.

Semaphore in Operating System

What is Semaphore in Operating System Semaphore is defined as an integer variable which is used to solve the problem of the critical section in process synchronization. In semaphore, we use...

3 minutes read.

What is Demand Paging?

Demand Paging is defined as a process in which the pages are loaded into the memory (when the page fault occurs) or on-demand. It consists of the following steps: If there is...

4 minutes read.

Commercial Mobile Operating Systems

Introduction to Commercial Mobile Operating Systems A computer program's common services are managed by an operating system (OS), which also handles computer hardware and software resources. The user can communicate with...

7 minutes read.

What is Thread and Types of Thread

What is Thread A thread means a lightweight process. Thread is the basic unit of CPU execution, which consists of thread ID, Program counter, set of registers to hold the information of current...

7 minutes read.

Feedback Queue in Operating System

In a computer or a laptop, there is a processor which do all the tasks. The processor cannot do all the tasks at a time. So, the tasks will be...

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.

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.

Multitasking Operating Systems

An operating system is the fundamental piece of software that enables a computer system to function and execute a command as intended. The user interface, hardware, and every other piece...

7 minutes read.

Types of Operating System

There are various types of operating system: Simple Batch Operating SystemMultiprogramming batch Operating SystemTime-sharing Operating SystemMultiprocessor Operating SystemDistributed Operating SystemNetwork Operating SystemReal-time Operating SystemMobile Operating System Simple Batch operating system In the simple batch operating system, there is no direct communication between...

6 minutes read.

Components of Operating System

Components of Operating System: An operating system is a complex and vast system. We can only create the operating system by dividing it into small parts. Each part must be...

5 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.

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.

FCFS (First-Come-First-Serve) Disk Scheduling Algorithm

FCFS Disk Scheduling Algorithm FCFS (First-Come-First-Serve) is the easiest disk scheduling algorithm among all the scheduling algorithms. In the FCFS disk scheduling algorithm, each input/output request is served in the order...

4 minutes read.

Banker’s Algorithm in Operating System

What is Banker’s Algorithm? Bankers algorithm is an algorithm which is used for deadlock avoidance and resource allocation. It was established by Edsger Dijkstra. The reason behind the name ‘banker’s algorithm’...

8 minutes read.

Disk Scheduling Algorithms

Disk Scheduling Algorithms Disk scheduling algorithms are the algorithms that are used for scheduling a disk. Generally, the scheduling refers to a time-table for completing any task or a job. With the help...

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.

Strategies for Handling Deadlock

Strategies for Handling Deadlock The Strategies for handling Deadlock are: Deadlock IgnoranceDeadlock PreventionDeadlock AvoidanceDeadlock Detection and Recovery Deadlock Ignorance Deadlock Ignorance is the most popular deadlock handling strategy. We can use this in the various operating systems for...

2 minutes read.

Paging and Segmentation in OS

What is Paging in OS? Paging is a storage technique used for memory management. In paging, the (OS) Operating System retrieves the processes from the secondary memory into the main memory,...

6 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.