wisemonkeys logo
FeedNotificationProfileManage Forms
FeedNotificationSearchSign in
wisemonkeys logo

Blogs

Deadlock in operating system

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

Classification Algorithms (Decision trees, SVM, Logistic regreession)

Blog banner

Product Discount Calculator

Blog banner

Elegant fashion style

Blog banner

MoSCoW METHOD IN DATA SCIENCE

Blog banner

Data Exfiltration

Blog banner

Policies for Service Transition

Blog banner

VIRTUAL MACHINES

Blog banner

Threat management

Blog banner

Why Businesses Are Investing More in Automation than Advertising?

Blog banner

Tableau

Blog banner

Importance of business process documentation

Blog banner

IT security management

Blog banner

The Benefits of Mixed Learning Activities for Preschoolers

Blog banner

15 Websites that will make your life easier ...!!!

Blog banner

Business Engineering

Blog banner

How to Compare Schools Before an Admission Decision

Blog banner

Security and E-mail

Blog banner

Indian Food

Blog banner

Race Condition in Operating Theatre

Blog banner

Stories Woven in Silk: The Meaning Behind Patola Motifs

Blog banner

Fashion marketing in india

Blog banner

The Role of Cyber Forensics in Criminology

Blog banner

GIS Topography

Blog banner

Power of words

Blog banner

ITIL Version 3 and 4 differenciation?

Blog banner

Crypto tax evasion

Blog banner

Types of Threads

Blog banner

What Your Music Taste Reveals About Your Personality

Blog banner

Multiprocessor and Multicore Organization

Blog banner

What is Network Security?

Blog banner

Virtual memory

Blog banner

Hey Aryan here

Blog banner

The application udemy

Blog banner

The Golden Temple , Amritsar

Blog banner

Top Career Paths After a B.Com Degree in Mumbai: What’s Next for You?

Blog banner

Operation system

Blog banner

Carrot Pickle With Raisins (lagan Nu Achar)

Blog banner

Bulk E-mail software

Blog banner

Rock, Paper, Scissors Game in Common Lisp

Blog banner

Memory Management

Blog banner

Smart Eating Habits for Office Professionals to Stay Healthy

Blog banner

Principal of concurrency

Blog banner