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

What is a Dumpster Diving Attack?

Blog banner

Process in OS

Blog banner

Diwali

Blog banner

Virtual Memory

Blog banner

Cyber Security in Data Breaching

Blog banner

QUANTUM COMPUTING IN SECURITY:A GAME CHANGER IN DIGITAL WORLD

Blog banner

Facebook marketing

Blog banner

Fashion design

Blog banner

Data Lake

Blog banner

Process Description

Blog banner

Raid and levels of raid.

Blog banner

Yoga in INDIA and ABROAD

Blog banner

Information of meesho company

Blog banner

SWEET SHREDDED MANGO CHUNDA (MANGO CHUNDA)

Blog banner

Linux Memory Management

Blog banner

Different types of scam frauds

Blog banner

Who decides your overthinking, anyway?

Blog banner

Sweet Mango Murabba

Blog banner

Random Forests

Blog banner

Modern Operating System

Blog banner

Use case of K-means clustering

Blog banner

objectives and functions of operating system

Blog banner

EdTech (Education Technology)

Blog banner

What your Favorite colour says about You?

Blog banner

How India made the GIS its Own, and its Use in Infrastructural Developments

Blog banner

Khau Galli – Vile Parle

Blog banner

LEMON PICKLE (NIMBU KA ACHAR)

Blog banner

Development Of Modern Operating System

Blog banner

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

Blog banner

I/O Management and Disk Scheduling

Blog banner

Dal Bafla Recipe

Blog banner

Raid

Blog banner

Kernel Memory Allocation In Linux.

Blog banner

Stories Woven in Silk: The Meaning Behind Patola Motifs

Blog banner

Developments in Modern Operating Systems

Blog banner

Big Data Architecture

Blog banner

LIFEHACKER

Blog banner

The Real Reason Patola Outfits Come at a Premium Cost

Blog banner

MAILFENCE

Blog banner

PPT methodology

Blog banner

Social engineering in cyber security

Blog banner

Security and E-mail

Blog banner