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

10 Interesting facts you should know!!!

Blog banner

IoT Architecture Based Security

Blog banner

Analysis of Digital Evidence In Identity Theft Investigations

Blog banner

Stephen Hawking : A Remarkable Physicist

Blog banner

Memory heirchy

Blog banner

Travel Geek ‘The last $50k in Switzerland’

Blog banner

Video games

Blog banner

Scheduling

Blog banner

10 Signs That Prove YOU are his FIRST priority.

Blog banner

CYBERPEACEKEEPING: NEW WAYS TO PREVENT AND MANAGE CYBERATTACKS

Blog banner

BUFFER OVERFLOW_142

Blog banner

Deadlock and Starvation

Blog banner

SEIZING DIGITL EVIDENCE AT THE SCENE

Blog banner

Operating system

Blog banner

Is Your Password Complex Enough?

Blog banner

DEVELOPMENTS LEADING TO MODERN OPERATING SYSTEMS

Blog banner

Phishing

Blog banner

OS Assignment 1

Blog banner

Risk factors in service transistion

Blog banner

Social Media.

Blog banner

Reclaim Your Bite and Beauty: All About Dental Restorative Treatments

Blog banner

Dudhasagar waterfall ?

Blog banner

Introduction to Data Science: Life Cycle & Applications

Blog banner

Lemon and Chilli Pickle (Limbu Mirchi Achar)

Blog banner

Zero Trust Security Model: Revolutionizing Cybersecurity in the Digital Age

Blog banner

Cyber Forensics in Healthcare: Protecting Patient Data and Preventing Breaches

Blog banner

SPAM

Blog banner

Zero-Day Attack

Blog banner

Deadlocks in Operating System

Blog banner

Business Engineering

Blog banner

Privacy-Enhancing Computation Techniques

Blog banner

Animal’s have my heart

Blog banner

Best password managers: Reviews of the top products

Blog banner

Virtual Machine

Blog banner

WORKFRONT SOFTWARE

Blog banner

The Art of Slow Fashion: Why Patola Defines Sustainable Luxury

Blog banner

VPN

Blog banner

RACI model in IT services

Blog banner

Explain Multiprocessors

Blog banner

All you need to know about Cassandra

Blog banner

Data Visualization- Importance and tools (Tableau,Power BI, Matplotlib)

Blog banner

Process and Threading

Blog banner