wisemonkeys logo
FeedNotificationProfileManage Forms
FeedNotificationSearchSign in
wisemonkeys logo

Blogs

Deadlock in operating system

profile
Khushi Balgi
Aug 14, 2024
0 Likes
0 Discussions
146 Reads

What is Deadlock?

Deadlock is a situation in computing where two or more processes are unable to proceed because each is waiting for the other to release resources. Key concepts include mutual exclusion, resource holding, circular wait, and no preemption.


Consider an example when two trains are coming toward each other on the same track and there is only one track, none of the trains can move once they are in front of each other. This is a practical example of deadlock.


How Does Deadlock occur in the Operating System?

Before going into detail about how deadlock occurs in the Operating System, let’s first discuss how the Operating System uses the resources present. A process in an operating system uses resources in the following way.


Requests a resource

Use the resource

Releases the resource


A situation occurs in operating systems when there are two or more processes that hold some resources and wait for resources held by others. For example,Process 1 is holding Resource 1 and waiting for resource 2 which is acquired by process 2, and process 2 is waiting for resource 1.


Necessary Conditions for Deadlock in OS

Deadlock can arise if the following four conditions hold simultaneously (Necessary Conditions)


1.Mutual Exclusion: Two or more resources are non-shareable (Only one process can use at a time).

2.Hold and Wait: A process is holding at least one resource and waiting for resources.

3.No Preemption: A resource cannot be taken from a process unless the process releases the resource.

4.Circular Wait: A set of processes waiting for each other in circular form.


What is Deadlock Detection?

Deadlock detection is a process in computing where the system checks if there are any sets of processes that are stuck waiting for each other indefinitely, preventing them from moving forward. In simple words, deadlock detection is the process of finding out whether any process are stuck in loop or not.



Comments ()


Sign in

Read Next

Segmentation and paging concept

Blog banner

E-Cash (Electronic Cash)

Blog banner

Race Conditions

Blog banner

MUTUAL EXCLUSION

Blog banner

Things You Should Leave Behind In 2025, Whilst In 2026

Blog banner

Buffer overflow

Blog banner

Importance Of Education.

Blog banner

WomenEmpowerment

Blog banner

Yoga in INDIA and ABROAD

Blog banner

Therapy Myths That Need to End in 2025

Blog banner

Top 5 Places To Stay And Visit In Berlin, Germany

Blog banner

Types of threads

Blog banner

Virtual Memory - Explaination, Working, Steps

Blog banner

Super Garlicky Tomato Soup with Smashed White Beans

Blog banner

Deadlock Prevention

Blog banner

Deadlock in Operating System

Blog banner

Lifestyle of a photographer

Blog banner

E-commerce

Blog banner

Process Creation

Blog banner

Virtual Machine

Blog banner

Study of Sniffing Tools

Blog banner

Concurrency:Deadlock and Starvation

Blog banner

The most common internet security threats

Blog banner

The Art of Slow Fashion: Why Patola Defines Sustainable Luxury

Blog banner

WHAT IS TWITTER AND HOW DOES IT WORK

Blog banner

Types of Malware in Cyber Security

Blog banner

Improving defences Proxy Device(defense in depth)

Blog banner

Predictive Analysis - Ek Overview

Blog banner

How to use open SSL for web server - browser communication

Blog banner

GIS Mapping

Blog banner

Firewall in Computer Network

Blog banner

Web Site

Blog banner

How Laughing Gas Makes Your Dental Visit So Much Easier

Blog banner

Mobile Survey

Blog banner

Security Issues and Countermeasures

Blog banner

Data Exfiltration

Blog banner

Procedure For Corporate High-Tech Investigations

Blog banner

10 Reasons to Date a South Indian Girl

Blog banner

Session Hijacking

Blog banner

Linker

Blog banner

Delhi city

Blog banner

Health and fitness

Blog banner