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

THREADS (assignment 1)

Blog banner

SESSION HIJACKING

Blog banner

A Survey of Anti-Forensic Techniques: Methods, Challenges, and Countermeasures

Blog banner

RSA (Rivest-Shamir-Adelman) Algorithm

Blog banner

Save Girl Child

Blog banner

Chicken Dum Biryani

Blog banner

LIMITED EDITION

Blog banner

LiquidPlanner

Blog banner

Eating Well With Meal Maharaj on Busy Workdays Without Cooking

Blog banner

EFT

Blog banner

Memory Management in an Operating System

Blog banner

?What Children Learn Between Activities: The Hidden Learning Moments in a Preschool Day

Blog banner

AN EVENT-BASED DIGITAL FORENSIC INVESTIGATION

Blog banner

Linux Virtual Machine Process Scheduling

Blog banner

Zero Trust Security Model: Revolutionizing Cybersecurity in the Digital Age

Blog banner

All you need to know about “Off-page SEO”

Blog banner

Cycling

Blog banner

Virtualization

Blog banner

Instagram Features in 2023 That Will Leave You Stunned!

Blog banner

ZOHO

Blog banner

Depression

Blog banner

What are the different types of E-mail crime and process of email forensic?

Blog banner

Marvel Cinematic Universe

Blog banner

Quality check in IT services

Blog banner

Hacking Mobile Platforms

Blog banner

The IT Service Lifecycle

Blog banner

This Windows 11 encryption bug may cause data damage

Blog banner

Honeypot in cyber security

Blog banner

How can denial-of-service(Dos) attacks be prevented?

Blog banner

Why Skipping Afternoon Meals Affects More Than Just Your Hunger?

Blog banner

The art of being alone

Blog banner

Traditional UNIX Scheduling

Blog banner

Proof-of-Stake (PoS)

Blog banner

Esri India launches Policy Maps.

Blog banner

Threads and concurrency

Blog banner

Ghee vs. Coconut Oil vs. Mustard Oil: Which Cooking Fat Wins for Indian Food?

Blog banner

Deadlock and Starvation

Blog banner

Why Inconel 625 and Monel 400 Remain Unbeatable in Refinery Applications?

Blog banner

Layers Of Blockchain

Blog banner

5 Things I As A Dentist Would Never Do (And What You Can Learn From It)

Blog banner

WINDOWS I/ O

Blog banner

Types of email

Blog banner