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

Electronic Funds Transfer

Blog banner

Technological Advancement

Blog banner

ART AND CULTURE OF VRINDAVAN

Blog banner

Multicore and Multithreading

Blog banner

An Approach To Spyware Detection And Removal

Blog banner

Virus

Blog banner

The Role of Data Provenance and Lineage in Modern Data Science

Blog banner

IoT Evolution

Blog banner

Types of Threads

Blog banner

Buffer Overflow

Blog banner

Instagram

Blog banner

Why Inconel 625 and Monel 400 Remain Unbeatable in Refinery Applications?

Blog banner

Challenges of Digital forensics in cloud computing environment

Blog banner

What is a Malware ?

Blog banner

BIRYANI ! The history you never knew about

Blog banner

Data Lakes: A Key to Modern Data Management

Blog banner

Types of Hackers.

Blog banner

Importance Of Time

Blog banner

Benefits of Yoga

Blog banner

Sessions In OS.

Blog banner

Direct Memory Access

Blog banner

The Right way of cooking

Blog banner

How to write a cover letter

Blog banner

10 Alien Encounters and Abduction Stories

Blog banner

Privacy LAWs in IT

Blog banner

Process State

Blog banner

Is Your Password Complex Enough?

Blog banner

ARTICLE ON WRIKE CORPORATION

Blog banner

Deadlock and Starvation

Blog banner

File Allocation Methods

Blog banner

Evolution of Operating system

Blog banner

A-B-C of Networking: Part-3 (Topology [Bus & Star])

Blog banner

american greatines

Blog banner

BUSINESS MODELS OF E COMMERCE

Blog banner

GOOGLE

Blog banner

Cache memory

Blog banner

Mariana Trench: The deepest depths

Blog banner

Service Strategy principles

Blog banner

note taker app

Blog banner

Memory Management

Blog banner

Multiple processor scheduling

Blog banner

Security Issues

Blog banner