wisemonkeys logo
FeedNotificationProfileManage Forms
FeedNotificationSearchSign in
wisemonkeys logo

Blogs

Deadlock in operating system

profile
Khushi Balgi
Aug 14, 2024
0 Likes
0 Discussions
149 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

FILE SHARING

Blog banner

Evolution of Operating system

Blog banner

MySQL

Blog banner

Hacking of web server and application

Blog banner

What is Packet Filtering?

Blog banner

BIRYANI ! The history you never knew about

Blog banner

Soak knowledge and level up your intellectual potential!!!

Blog banner

Modern operating system

Blog banner

The Rise of Evil Twin Attacks: A New Kind Of Spoofing Cyberattack

Blog banner

How to tie a Tie

Blog banner

Traveling

Blog banner

In the world of Technology...

Blog banner

Binary Search Tree (BST) in Data Structure

Blog banner

Data Exfiltration

Blog banner

Open Source Project By Google

Blog banner

Virtual memory

Blog banner

The Golden Temple , Amritsar

Blog banner

Google classroom

Blog banner

Vulnerability Assessment

Blog banner

INSTAGRAM

Blog banner

IT Service as as Value Creation

Blog banner

Traditional Unix System

Blog banner

Random Forests

Blog banner

Procedure For Corporate High-Tech Investigations

Blog banner

Process State

Blog banner

Exploring the Power of Encase Forensic Tools: Unraveling Digital Mysteries

Blog banner

Google classroom

Blog banner

AI and cyber Security

Blog banner

How to Compare Schools Before an Admission Decision

Blog banner

SMARTSHEET

Blog banner

Music

Blog banner

Life of an army person

Blog banner

K-means use cases

Blog banner

EdTech (Education Technology)

Blog banner

indian premier league

Blog banner

Spotify

Blog banner

The Role of Fibre in Everyday Nutrition and Digestive Health

Blog banner

Explain DBMS in Brief

Blog banner

Street foods

Blog banner

10 Reasons why Monica and Chandler are the best couple ever.!!!

Blog banner

Types of Malware in Cyber Security

Blog banner

How Social Media Algorithms Will Work in 2026?

Blog banner