wisemonkeys logo
FeedNotificationProfileManage Forms
FeedNotificationSearchSign in
wisemonkeys logo

Blogs

Deadlock Prevention

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

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

Blog banner

Deadlock in Operating systems

Blog banner

TOP 5 GAMING GADGETS (2024)

Blog banner

Data Mining

Blog banner

10 Survival Tips that might save your life

Blog banner

File system

Blog banner

Raising mental health burden: A global and Indian perspective

Blog banner

Why Data Privacy Is Changing Online Advertising

Blog banner

This is my first blog.

Blog banner

About myself

Blog banner

Top 3 Places To Stay In Vienna

Blog banner

Deadlock

Blog banner

How to Conquer Depression ?

Blog banner

10 Reasons to date your best friend

Blog banner

differentiate thinking humanly and rationally

Blog banner

DATA SCIENCE IN BUSINESS AND MARKETING

Blog banner

Data-Driven Prediction of Virtual Item Prices in Online Games

Blog banner

INTERRUPTS

Blog banner

Meshoo

Blog banner

Hacking Mobile Platforms

Blog banner

Smart Shoephone: Is that technology overdose!?

Blog banner

Mesh Topology

Blog banner

How Schools Can Reduce Exam Stress in Students?

Blog banner

Types of threads

Blog banner

Data Warehouse Bus Matrix

Blog banner

Dove’s Real Beauty Campaign- Case Study

Blog banner

Why Kanye West (Now Ye) is the GOAT: A Legacy Beyond Music

Blog banner

Linux Threads:

Blog banner

Short-Form Video Marketing: Why It's Dominating the Internet

Blog banner

Design Considerations for Disk Cache Management

Blog banner

Virtual Memory

Blog banner

Top 4 Places To Stay In Copenhagen

Blog banner

My Favorite Country

Blog banner

Denial-of-Service and Distributed Denial-of-Service Attack Techniques

Blog banner

Direct Memory Access

Blog banner

Survey of Which Movies Types people are Prefer to Watch in India.

Blog banner

BharatPe

Blog banner

Game Theory in Blockchain

Blog banner

Note on Process, Process creation and Process termination

Blog banner

OLA

Blog banner

Virtual Memory

Blog banner

Service Strategy In ITSM

Blog banner