wisemonkeys logo
FeedNotificationProfileManage Forms
FeedNotificationSearchSign in
wisemonkeys logo

Blogs

Deadlock in operating system

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

Photorec - media recovery tool

Blog banner

RACI model in IT services

Blog banner

File system

Blog banner

SECURITY TOOLS

Blog banner

Data Science in Everyday Life (like a phone, shopping cart, or social media icons)

Blog banner

Biometric Authentication Vulnerabilities

Blog banner

Diwali

Blog banner

Direct memory access (DMA)

Blog banner

Microsoft Windows Overview

Blog banner

Is Your Password Complex Enough?

Blog banner

Digital Footprints An Emerging Dimension of Digital Inequality

Blog banner

Multicore CPUs

Blog banner

Race Conditions

Blog banner

?What Your Dentist Notices The Moment You Sit In The Chair

Blog banner

LEMON PICKLE SWEET AND MILD HOT

Blog banner

Memory hierarchy

Blog banner

Sessions In OS.

Blog banner

Efficiency of SQL Injection Method in Preventing E-Mail Hacking

Blog banner

Cloud Security: Trends and Innovations

Blog banner

Virtual Memory

Blog banner

Defining youtubr

Blog banner

Types of OS

Blog banner

Online Education

Blog banner

MORDERN UNIX SYSTEM

Blog banner

Cache Memory(142)

Blog banner

Linux -V Server Virtual Machine

Blog banner

File management

Blog banner

File System

Blog banner

E-commerce

Blog banner

Denial-of-Service and Distributed Denial-of-Service Attack Techniques

Blog banner

Memory Management

Blog banner

PHISHING

Blog banner

Dove’s Real Beauty Campaign- Case Study

Blog banner

Fitness regime by Deepesh

Blog banner

Distributed Denial of Service (DDoS) attack

Blog banner

Zomato (Income Sources)

Blog banner

Tableau

Blog banner

GIS in Disaster Management

Blog banner

Uniprocessor Scheduling

Blog banner

Photography

Blog banner

SQL Injection

Blog banner

Corporate Discipline.

Blog banner