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

Meal Maharaj — 3 CP, 5 CP, 8 CP. Same Love, Different Portions

Blog banner

Types of Big Data

Blog banner

COMMUNICATION

Blog banner

Severe landslides continue to cause concern in Joshimath, Uttarakhand

Blog banner

Advanced Persistent Threats (APTs)

Blog banner

SMARTSHEET

Blog banner

A-B-C of Networking: Part-2 (Components)

Blog banner

BENIFITS OF YOGA

Blog banner

memory cache

Blog banner

Pandas Matrix Applications

Blog banner

Privacy LAWs in IT

Blog banner

Data Science & AI

Blog banner

"Mahakali cave"

Blog banner

THE ACTORS LIFE

Blog banner

Major achievement

Blog banner

Introduction to Data Science: Life Cycle & Applications

Blog banner

FREE VERSION OF G-MAIL

Blog banner

Understanding the 'Ambiverts'

Blog banner

Deadlock in Operating System

Blog banner

OS PROCESS DESCRIPTION AND CONTROL-SARVAGYA JALAN

Blog banner

gis substation

Blog banner

HR Automation : Need of the hour

Blog banner

The Five Steps of Data Science

Blog banner

Deadlock and Starvation in an Operating System

Blog banner

Network Forensics

Blog banner

Loneliness

Blog banner

Multithreading in Operating System

Blog banner

child Labour

Blog banner

Article on Zoho Corporation

Blog banner

How to Encrypt and Decrypt Using GNU PGP

Blog banner

Metasploit

Blog banner

From Procrastinator to Performer: How to Beat the Last-Minute Rush

Blog banner

Hash password! Is it really secured?

Blog banner

LISP - Library Management System

Blog banner

Types of email

Blog banner

Multiprocessor and scheduling

Blog banner

Layers Of Blockchain

Blog banner

Senseless Teeths

Blog banner

RAID and It's Levels

Blog banner

Deadlock in Operating System

Blog banner

CoWIN

Blog banner

Memory Management

Blog banner