wisemonkeys logo
FeedNotificationProfileManage Forms
FeedNotificationSearchSign in
wisemonkeys logo

Blogs

Deadlock Prevention

profile
Shreya Mantry
Aug 15, 2024
0 Likes
0 Discussions
93 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

ONLINE NEWSROOMS

Blog banner

38_Exploring The Honeynet Project

Blog banner

Yahoo! mail

Blog banner

Threat from Inside: Educating the Employees Against Cyber Threats

Blog banner

Worms, viruses and Bots

Blog banner

Understanding Loneliness: Why We Feel Disconnected in a Connected World (Part -1)

Blog banner

A small world of Sockets

Blog banner

Microsoft Windows Overview

Blog banner

INTERNET SECURITY

Blog banner

KPMG (Klynveld Peat Marwick Goerdeler)

Blog banner

The Peephole

Blog banner

Password Generator - Lisp

Blog banner

The application udemy

Blog banner

Multithreading in Operating System

Blog banner

What Are Electro-Forged Gratings? Benefits, Applications, and Why Industries Prefer Them

Blog banner

AutoML: The Future of Automated Data Science

Blog banner

indian premier league

Blog banner

Online Games

Blog banner

10 Interesting Facts about Death Note

Blog banner

Importance of Education

Blog banner

INTRODUCTION TO C#

Blog banner

What is 'Multi-core and Multi-threading' ?

Blog banner

What Makes a School Safe, Supportive, and Student-Friendly

Blog banner

Deadlock

Blog banner

Blockchain

Blog banner

Modern Teaching Methods: Why Inquiry-based & Experiential Learning Works Best

Blog banner

Constrains in service design

Blog banner

What makes Nugget RC Racing Florida’s Most Exciting Racing Events?

Blog banner

GEOLOGY AND GEO-TECTONIC FRAME WORK OF WESTERN BASTAR CRATON

Blog banner

Koinex is shutting down and here is how you can withdraw...

Blog banner

Article on Team Work

Blog banner

Analysis of Digital Evidence In Identity Theft Investigations

Blog banner

6 Digital Marketing Trends You Must Watch Out For In 2022

Blog banner

Cyber Laws In India and Around the World

Blog banner

The Features of Blockchain

Blog banner

Device driver

Blog banner

Challenges of Digital forensics in cloud computing environment

Blog banner

Direct Memory Access

Blog banner

Tracking Emails & Email Crimes

Blog banner

10 Alien Encounters and Abduction Stories

Blog banner

Why Time Management Is the Secret to College Success (and How to Master It)

Blog banner

Pooja Silver

Blog banner