wisemonkeys logo
FeedNotificationProfileManage Forms
FeedNotificationSearchSign in
wisemonkeys logo

Blogs

Deadlock Prevention

profile
Shreya Mantry
Aug 15, 2024
0 Likes
0 Discussions
90 Reads

DEADLOCK PREVENTION


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. Strategies used in computer systems in order to ensure that different processes can run smoothly without getting stuck waiting for each other forever is  Deadlock prevention.


The deadlock has the following characteristics:

  1. Mutual Exclusion
  2. Hold and Wait
  3. No Preemption
  4. Circular Wait


Deadlock can be prevented by ruling out any of the above four conditions:


  • Mutual Exclusion:

Make data read only, so that processes can use the data concurrently. We know that many write procedure cannot take place at same time. Thus allow only exclusive users to writee into the file. And let others have access to read only.


  • Hold and Wait:

The hold-and-wait condition can be prevented by requiring all processes to request for required access at a time. While doing so all other processes will be blocked until all requests are granted. This means that other non running processes will have to wait until their turn.


  • No preemption:

if a process requests for certain resources, it must release its original resources first. And if another process is using that resources it needs to release them


  • Circular wait

Each resource will have a numeric order. All processes must follow that order only while requesting resources. No process will be granted if they request for resources have higher priority than they have currently. 


Thus in these ways deadlock can be prevented.



Comments ()


Sign in

Read Next

Types of OS

Blog banner

Assignment-3

Blog banner

Security in Operating Systems

Blog banner

Animal’s have my heart

Blog banner

Introduction to Virtual Memory - 080

Blog banner

Deadlock

Blog banner

Virtual Memory

Blog banner

Real Time Scheduling

Blog banner

How College Events Build Real-world Skills You Can’t Learn From Textbooks

Blog banner

INTRANET

Blog banner

Technical Challenges and Directions for Digital Forensics

Blog banner

Install Ubuntu Easily

Blog banner

SMARTSHEET

Blog banner

MYNTRA

Blog banner

To travel is to live

Blog banner

Study of Backdoor and Trojan tools

Blog banner

Socket Programming in Java

Blog banner

R Programming

Blog banner

Why Are So Many Adults Getting Diagnosed with ADHD?

Blog banner

Deadlock and Starvation in an Operating System

Blog banner

indian premier league

Blog banner

**THE MUJAWARR: Transforming the Logistics Industry**

Blog banner

WHAT IS SNAPCHAT AND HOW DOES IT WORK?

Blog banner

HR Automation : Need of the hour

Blog banner

What Your Music Taste Reveals About Your Personality

Blog banner

MEMORY HIERARCHY

Blog banner

Constrains in service design

Blog banner

Linker

Blog banner

Functions Of Operating Systems

Blog banner

DEVELOPMENTS LEADING TO MODERN OPERATING SYSTEMS

Blog banner

Virtual Memory

Blog banner

Khau Galli – Vile Parle

Blog banner

Defining youtubr

Blog banner

social media issue

Blog banner

21ST CENTURY PATRIARCHY

Blog banner

SWEET SHREDDED MANGO CHUNDA (MANGO CHUNDA)

Blog banner

Memory hierarchy

Blog banner

Making Money through Instagram

Blog banner

The Features of Blockchain

Blog banner

DEVELOPMENTS LEADING TO MODERN OPERATING SYSTEMS

Blog banner

Modern operating system

Blog banner

Rules and Regulations of Networking: "Standards and Protocols" - Part 2

Blog banner