wisemonkeys logo
FeedNotificationProfileManage Forms
FeedNotificationSearchSign in
wisemonkeys logo

Blogs

Deadlock in operating system

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

How to feel Happy everyday day

Blog banner

Disk Management

Blog banner

Deadlocks in Operating Systems

Blog banner

Types of Threads

Blog banner

Deadlocks

Blog banner

When Is the Right Time to Enrol My Toddler Into Preschool? NEP

Blog banner

The evolution of OS

Blog banner

Does School Infrastructure Really Matter For Learning?

Blog banner

CSI and Organizational Change

Blog banner

Revolutionary AI Tool: ChatGPT

Blog banner

Breaking the Cycle of Loneliness : Protecting your Mental Health Through meaningful Connection ( Part — 2)

Blog banner

Personalised Name Labels vs. Handwritten Stickers: Which Is Better for Your Child’s School Essentials?

Blog banner

Risk mitigation and management

Blog banner

Cache Memory in Operating Systems

Blog banner

What do you mean by online marketing and why do you need to know about it

Blog banner

The Joy of Giving: How Festivals Teach Children Empathy and Gratitude

Blog banner

A Day in the Life at Elzee: What Your Child Does Between Drop-Off and Pick-Up

Blog banner

Cross site scripting Attack

Blog banner

Virtual machine

Blog banner

Virtual Machine

Blog banner

Studying Denial of service attack using DOSHTTP tool

Blog banner

How Harshad Valia International School is nurturing India’s Young Minds?

Blog banner

Is Brushing After Eating Damaging Your Teeth? (Fact or Myth)

Blog banner

How Schools Can Reduce Exam Stress in Students?

Blog banner

Security Issues

Blog banner

The Impact of Cyber Forensics on Corporate Governance and Compliance

Blog banner

Concurrency management in operating systems

Blog banner

RAID

Blog banner

SMARTSHEET MANAGEMENT SOFTWARE

Blog banner

MULTITHREADING:ENHANCEING PERFORMANCE AND EFFICIENCY IN COMPUTING

Blog banner

MODERN OPERATING SYSTEM

Blog banner

Memory management

Blog banner

Elegant fashion style

Blog banner

Challenges and risks in service operations

Blog banner

GIS info about Bermuda Triangle

Blog banner

Computer Security

Blog banner

Why Peace River Is Florida’s Most Underrated Outdoor Adventure Destination?

Blog banner

Memory managment

Blog banner

The Role of Cyber Forensics in Criminology

Blog banner

Threading

Blog banner

DEVELOPMENTS LEADING TO MODERN OPERATING SYSTEMS

Blog banner

LEMON PICKLE SWEET AND MILD HOT

Blog banner