wisemonkeys logo
FeedNotificationProfileManage Forms
FeedNotificationSearchSign in
wisemonkeys logo

Blogs

Deadlock in operating system

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

virtual machines and virtualization

Blog banner

GIS Topography

Blog banner

Os(Computer security threats)

Blog banner

Pilgrimage at LOC: A privilege and a paradox

Blog banner

Service transistion under difficult conditions

Blog banner

Zero-Click Searches: How To Stay Visible In Google’s New Era

Blog banner

Explain Kernel in OS

Blog banner

How to Run your First android App

Blog banner

Video games

Blog banner

The seven-step improvement process

Blog banner

Processing Crime and Incident Scenes

Blog banner

Understanding Mobile Device Forensics

Blog banner

Introduction to Data Science: Life Cycle & Applications

Blog banner

File Management system

Blog banner

memory management

Blog banner

Asana

Blog banner

The Difference Between Plaque and Tartar Explained Simply

Blog banner

Kernel in Operating System

Blog banner

SWEET SHREDDED MANGO CHUNDA (MANGO CHUNDA)

Blog banner

USES OF WHATSAPP

Blog banner

The Power of Cyber Forensic in Solving Crimes

Blog banner

Deadlocks

Blog banner

Windows Operating System

Blog banner

OS Assignment 3 Deadlock

Blog banner

Stephen Hawking : A Remarkable Physicist

Blog banner

What is OS and its overview

Blog banner

IT service level agreement

Blog banner

Define Instagram.

Blog banner

Evolution of the Microprocessor ~ Aditya Pai

Blog banner

Interrupts in OS

Blog banner

A Short History of GIS

Blog banner

Different memory allocation strategies

Blog banner

Short note on Microsoft office

Blog banner

5 People who claimed to have Time Traveled

Blog banner

MODERN OPERATING SYSTEM

Blog banner

Short note on expert system

Blog banner

How to invest in Indian Stock Market ? ~ Tutorial 1

Blog banner

File Allocation Methods

Blog banner

ODOO

Blog banner

Why Consistency in Eating Habits Matters and How Meal Maharaj Makes It Easy

Blog banner

Subnet Masking

Blog banner

Having passion in life

Blog banner