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

10 Reasons Why Guy BestFriends are the Must in Every Girl's Life

Blog banner

DATA BREACH CAUSES CHALLENGES PREVENTION AND FUTURE DIRECTIONS

Blog banner

Predictive Analytics: How Data Science Predicts Trends(Weather ,Stock Market,Sales Forecasting ).

Blog banner

Pink sauce pasta

Blog banner

Linux -V Server Virtual Machine

Blog banner

The Role of Cyber Forensics in Criminology

Blog banner

OS Assignment 3 Deadlock

Blog banner

John Titor: The Time Traveler

Blog banner

The Rise of Evil Twin Attacks: A New Kind Of Spoofing Cyberattack

Blog banner

Virtualisation

Blog banner

What is Brute Force Attack? How to defend against it?

Blog banner

Exploring Arcadia’s Cowboy Culture, Peace River & Hidden Attractions

Blog banner

Cycling

Blog banner

Data Science in Mental Health Prediction

Blog banner

Importance of business process documentation

Blog banner

Web Site

Blog banner

OPERATING SYSTEM OBJECTIVES AND FAULT TOLERENCE.

Blog banner

SMARTSHEET MANAGEMENT SOFTWARE

Blog banner

INSTAGRAM

Blog banner

RAID - LEVELS OF RAID

Blog banner

Drawing tips for a beginner

Blog banner

Operating system

Blog banner

Why You Should Not Use Free VPNs

Blog banner

Dr. Venkadavarahan

Blog banner

How to write a cover letter

Blog banner

"Geographic Information Systems (GIS) and its Applications in Urban Planning"

Blog banner

Video games

Blog banner

Memory input output management

Blog banner

A True Friendship

Blog banner

Protect yourself from System Hacking with these Simple Steps

Blog banner

Deadlock

Blog banner

Emotional Intelligence in Children: Why It Is as Important as Academics

Blog banner

Child labour

Blog banner

THE ACTORS LIFE

Blog banner

The Difference Between Plaque and Tartar Explained Simply

Blog banner

Operating Systems Overview

Blog banner

computer security

Blog banner

Firewall / IDS Evasion Techniques

Blog banner

Blockchain uses and use cases

Blog banner

Service Operation

Blog banner

A Traveller’s Guide to Offbeat Places in Arcadia, Florida

Blog banner

AOL Mail

Blog banner