wisemonkeys logo
FeedNotificationProfileManage Forms
FeedNotificationSearchSign in
wisemonkeys logo

Blogs

Deadlock in operating system

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

To-Do List In LISP

Blog banner

Save Girl Child

Blog banner

Multiprocessor and Multicore Organization

Blog banner

Deadlock

Blog banner

How to kiss

Blog banner

Social engineering in cyber security

Blog banner

Electronic data interchange

Blog banner

"Games and the future"

Blog banner

A Review on Data Acquisition in Cyber Forensics

Blog banner

Analysis of Digital Evidence In Identity Theft Investigations

Blog banner

Every body is beautiful

Blog banner

Puri Jagannath temple

Blog banner

A book review

Blog banner

Constrained Management in IT

Blog banner

Network Security Risks

Blog banner

Making Money through Instagram

Blog banner

Modern Operating System

Blog banner

E-learning in today's world

Blog banner

K-means use cases

Blog banner

Capacity management in ITSM

Blog banner

Segmentation and paging concept

Blog banner

Rock, Paper, Scissors Game in Common Lisp

Blog banner

Paging

Blog banner

Decision Tree: A Diagram Model

Blog banner

Bit Coins

Blog banner

Flipkart

Blog banner

Open Source Project By Google

Blog banner

The application udemy

Blog banner

Paginng In OS

Blog banner

Animal’s have my heart

Blog banner

Super Garlicky Tomato Soup with Smashed White Beans

Blog banner

What is metaverse?

Blog banner

Os assignment

Blog banner

Online Games

Blog banner

Types of Threads

Blog banner

Microsoft Word

Blog banner

Different types of scam Fraud

Blog banner

MUTUAL EXCLUSION

Blog banner

What is Packet Filtering?

Blog banner

How to Run your First android App

Blog banner

Memory input output management

Blog banner

Improving the Accuracy of GPS and GNSS

Blog banner