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

Remote Work in 2026

Blog banner

Data Mapping

Blog banner

Have You Explored India Yet?

Blog banner

DISK SCHEDULING

Blog banner

Operating system

Blog banner

Importance of self defence for girls

Blog banner

Different Types of Data

Blog banner

Virtual memory in Operating System

Blog banner

38_Exploring The Honeynet Project

Blog banner

IT Service Continuity Management

Blog banner

Why is online marketing is important in current scenario

Blog banner

The Right way of cooking

Blog banner

Artical on FreshBooks

Blog banner

A buffer overflow

Blog banner

HR Automation : Need of the hour

Blog banner

Working with Sniffers for monitoring network communication

Blog banner

RAID_142

Blog banner

Perfect Moments to Wear a Rich Patola Design Outfit

Blog banner

Yahoo! mail

Blog banner

Message Passing in OS

Blog banner

Interesting fact about kangaroo.

Blog banner

Biometric Authentication and Privacy: Balancing Ethical Concerns

Blog banner

Web Site

Blog banner

Operating system

Blog banner

File Management In OS

Blog banner

How To Secure Operating Systems ?

Blog banner

Starvation

Blog banner

Rapido

Blog banner

Security issues

Blog banner

Indian Food

Blog banner

Operating System

Blog banner

5 Powerful Mindset Shifts To Make 2026 Your Breakthrough Year

Blog banner

ART AND CULTURE OF VRINDAVAN

Blog banner

Vulnerability Assessment (Vulnerability Analysis)

Blog banner

Self-love: Being the reason of your own smile

Blog banner

Starvation

Blog banner

10 Signs your Computer has Virus

Blog banner

Understanding Regression Analysis

Blog banner

Direct memory access (DMA)

Blog banner

Linux Virtual Machine Process Scheduling

Blog banner

Student Grade Calculator in LISP

Blog banner

Friendship

Blog banner