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

Developments in Modern Operating Systems

Blog banner

Advanced Persistent Threats (APTs)

Blog banner

WINDOWS I/ O

Blog banner

Veg/Non-veg/Egg Tiffin Meals That Are Nutritious and Filling

Blog banner

Building Confidence in Children Through Daily Routines and Play

Blog banner

OS Assignment-3

Blog banner

Process Creation

Blog banner

COMFORT IS ALL ABOUT FASHION

Blog banner

Linux Virtual Machine Process Scheduling

Blog banner

THE LEGAL ISSUES OF COMPUTER FORENSICS IN INDIA

Blog banner

Virtualization

Blog banner

STARVATION

Blog banner

LINUX

Blog banner

Instagram

Blog banner

Record Blocking

Blog banner

Ubiquitous Computing

Blog banner

Mobile Survey

Blog banner

1.1 basic elements

Blog banner

Uniprocessor Scheduling

Blog banner

Proton mail

Blog banner

Types of OS

Blog banner

Synchronization

Blog banner

Memory Management

Blog banner

Memory Management in an Operating System

Blog banner

Patola Outfits for the Modern Wardrobe: Reviving Indian Handloom in Style

Blog banner

Modern Teaching Methods: Why Inquiry-based & Experiential Learning Works Best

Blog banner

Embracing the power of Modern Machine UNIX

Blog banner

ACHIEVEMENTS IN OPERATING SYSTEMS

Blog banner

Steps to create an Ubuntu EC2 Instance with GUI in AWS

Blog banner

SMARTSHEET

Blog banner

Linux Memory Management

Blog banner

Data Mapping

Blog banner

Uniprocessor Scheduling

Blog banner

Big O Notation

Blog banner

COMMUNICATION

Blog banner

Celebrate Diwali the Delicious Way with Meal Maharaj Catering

Blog banner

India Digital Personal Data Protection Act, 2023

Blog banner

On-Page SEO

Blog banner

Evolution of Operating system

Blog banner

Security issues in Sensor Networks and gathering admissible evidence in Network Forensics

Blog banner

Personalized Movie Recommendations with Data Science

Blog banner

Pandas Matrix Applications

Blog banner