wisemonkeys logo
FeedNotificationProfileManage Forms
FeedNotificationSearchSign in
wisemonkeys logo

Blogs

Deadlock in operating system

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

Street foods

Blog banner

MEMORY HIERARCHY

Blog banner

?How long does wisdom tooth pain last?

Blog banner

How to Manage Business Invoices and Payments Easily?

Blog banner

Palm Vein Biometric Technology; Contactless vein authentication

Blog banner

Cycling

Blog banner

Chicken Dum Biryani

Blog banner

Skills An Ethical Hacker Must Have

Blog banner

How Seasons affect online sales and how to overcome them

Blog banner

Modern operating system

Blog banner

Multiple processor scheduling

Blog banner

ONLINE NEWSROOMS

Blog banner

Real-Time Operating Systems (RTOS) Deep Explanation

Blog banner

Why am I never satisfied with my Life?

Blog banner

Cloud Forensic Tools And Storage :A Review Paper

Blog banner

Evolution of the Microprocessor ~ Aditya Pai

Blog banner

Different memory allocation strategies

Blog banner

What's Better : Supervised or Unsupervised Learning

Blog banner

Modern Operating System

Blog banner

Soak knowledge and level up your intellectual potential!!!

Blog banner

Classification Algorithms (Decision trees, SVM, Logistic regreession)

Blog banner

Super Garlicky Tomato Soup with Smashed White Beans

Blog banner

Understanding Univariate, Bivariate, and Multivariate Analysis in Data Science

Blog banner

File Sharing

Blog banner

Instagram

Blog banner

WHAT IS TWITTER AND HOW DOES IT WORK

Blog banner

Health and fitness in technology

Blog banner

Service Design Model

Blog banner

Operating system evolution

Blog banner

The Power of Forensic Watermarking in the Fight Against Content Piracy

Blog banner

BharatPe

Blog banner

26/11 The Black Day Of Mumbai

Blog banner

Precision-Recall in Data Science

Blog banner

The New Dr. Frankenstein who will perform first full head transplant

Blog banner

Malware Detection Techniques for Mobile Devices

Blog banner

How to lose belly fat

Blog banner

File management

Blog banner

How Puppet Shows and Role Play Teach Empathy to Preschoolers

Blog banner

Financial Stress and Mental Health

Blog banner

Clarizen

Blog banner

Sage

Blog banner

Memory Management

Blog banner