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

Virtual Memory

Blog banner

DATA BREACH CAUSES CHALLENGES PREVENTION AND FUTURE DIRECTIONS

Blog banner

How Reading Books Shape a Child’s Imagination and Thinking?

Blog banner

UniProcessor Scheduling

Blog banner

Types Of Interrupt

Blog banner

SECURITY VULNERABILITIES COUNTERMEASURES IN A SMART SHIP SYSTEM

Blog banner

DIGITAL ECONOMY

Blog banner

social media issue

Blog banner

Memory Management

Blog banner

All you need to know about Cassandra

Blog banner

Introduction to Solidity Programming for Blockchain Development

Blog banner

File Management

Blog banner

Threads in OS

Blog banner

The Procedural Framework for Corporate High-Tech Investigations

Blog banner

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

Blog banner

Security issues

Blog banner

CoWIN

Blog banner

Boxing

Blog banner

Odoo

Blog banner

Paging

Blog banner

JUSTICE FOR EVERY “BEZUBAAN ANIMAL”

Blog banner

child Labour

Blog banner

Virtual Memory

Blog banner

Evolution of Operating system

Blog banner

A buffer overflow

Blog banner

How social media affect

Blog banner

How to Conquer Depression ?

Blog banner

Elements and Principles of Photography

Blog banner

Digital Footprints An Emerging Dimension of Digital Inequality

Blog banner

INTRODUCTION TO C#

Blog banner

Real-Time Operating Systems (RTOS) Deep Explanation

Blog banner

WAKE UP ITS FOOD o'CLOCK...!!!!!

Blog banner

Internet: The Vast Ocean Of Knowledge.

Blog banner

Bulk E-mail software

Blog banner

Race Condition in Operating Theatre

Blog banner

Zero Trust Security Model: Revolutionizing Cybersecurity in the Digital Age

Blog banner

How To Invest In Indian Stock Market @ BSE & NSE ~ Tutorial 3

Blog banner

Fitness regime by Deepesh

Blog banner

10 Interesting facts you should know!!!

Blog banner

What Function Does SEO Serve in Digital Marketing?

Blog banner

Current Trends in GIS and Remote Sensing(Ocean Applications)

Blog banner

Virtual Machine

Blog banner