wisemonkeys logo
FeedNotificationProfileManage Forms
FeedNotificationSearchSign in
wisemonkeys logo

Blogs

Deadlock in operating system

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

GIS Mapping

Blog banner

File Sharing

Blog banner

Race Condition in Operating Theatre

Blog banner

Dekkers Algorithm : Ensuring Safe Process Synchronization

Blog banner

Place to visit in pune

Blog banner

Cyber Laws In India and Around the World

Blog banner

Supervised and Unsupervised Learning

Blog banner

Dekkers Algorithm

Blog banner

Apache Spark :- Powerful Data Processing Tool

Blog banner

Deadlock

Blog banner

E-BUSINESS RISK MANAGEMENT

Blog banner

Virtualization

Blog banner

INTRODUCTION TO C#

Blog banner

Different types of scam frauds

Blog banner

File management

Blog banner

INTERNET SECURITY

Blog banner

Texting is actually better than talking in person

Blog banner

Cache memory

Blog banner

Firewall

Blog banner

Importance of Website

Blog banner

Memory Management - operating system

Blog banner

Odoo

Blog banner

Types of Hackers.

Blog banner

Zomato (Income Sources)

Blog banner

Multiprocessor and scheduling

Blog banner

Procedure For Corporate High-Tech Investigations

Blog banner

The Importance of Financial Literacy for College Students

Blog banner

BharatPe

Blog banner

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

Blog banner

Why Kanye West (Now Ye) is the GOAT: A Legacy Beyond Music

Blog banner

From Loom to Luxury: How Patola Elevates Modern Wardrobes

Blog banner

Privacy in Social Media and Online Services

Blog banner

Article on IT development trends

Blog banner

MAHAKAL LOK UJJAIN

Blog banner

Uniprocessor Scheduling

Blog banner

Sweet and Sour Mango Pickle (Gol Keri)

Blog banner

Theads

Blog banner

New Ransomware Encrypts Your Android And Then Changes PIN Lock

Blog banner

Health and fitness

Blog banner

Human Error: The weakest link in Cybersecurity

Blog banner

The Rich Heritage Of Patola Sarees: Gujarat’s Timeless Weaving Art

Blog banner

Modern Operating System - Khush bagaria

Blog banner