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

Should you be using a mouthwash? Know from the experts

Blog banner

Wedding photographer

Blog banner

Session Vulnerabilities

Blog banner

Modern Operating system

Blog banner

Fitness

Blog banner

RAID

Blog banner

Why Festivals Are the Best Classrooms for Young Minds?

Blog banner

Functions Of Operating Systems

Blog banner

Understanding the 'Ambiverts'

Blog banner

UniProcessor Scheduling

Blog banner

The Right way of cooking

Blog banner

AI and Cyber Security

Blog banner

Starvation

Blog banner

Firewall

Blog banner

Carrot Pickle With Raisins (lagan Nu Achar)

Blog banner

Google

Blog banner

MEMORY FORENSIC ACQUISITION AND ANALYSISOF MEMORY AND ITS TOOLS COMPARISON

Blog banner

Instagram

Blog banner

Message Passing in OS

Blog banner

Race Condition

Blog banner

Why is it hard to design an Operating Systems ?

Blog banner

Evolution of Operating system.

Blog banner

Guidelines for a Low sodium Diet.

Blog banner

Operating system

Blog banner

THE ROLE OF CYBER FORENSICS IN CRIMINOLOGY

Blog banner

Tableau

Blog banner

Apache Spark :- Powerful Data Processing Tool

Blog banner

Electronic data interchange

Blog banner

Oracle Corporation

Blog banner

IoT Evolution

Blog banner

Outlook mail

Blog banner

City of Mumbai (Bombay):

Blog banner

How can parents support a child’s mental health?

Blog banner

From Websites To Super Apps For Digital User Experience

Blog banner

Toothache at night? What does this mean, and how to cope with it?

Blog banner

Instagram

Blog banner

Is Social Media Marketing The Next Wave Of Digital Marketing?

Blog banner

Old age lifestyle

Blog banner

Why You Should Not Use Free VPNs

Blog banner

What are Virtual Machines

Blog banner

How I use google in my daily life

Blog banner

Python as a tool for Data science task & project

Blog banner