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

Data Science in Healthcare: Predicting Diseases

Blog banner

Palliative and End — of — Life Care: A Psychological and Holistic Perspective

Blog banner

Whatsapp Messenger

Blog banner

Service transition principles

Blog banner

Process Description

Blog banner

Is Pursuing a Dance Career in India Worth it?

Blog banner

RAID and It's Levels

Blog banner

Network Forensics

Blog banner

Mumbaicha Dabbawalla

Blog banner

Raid

Blog banner

Scheduling

Blog banner

Embaded operating system

Blog banner

THE ACTORS LIFE

Blog banner

Daycare Centres Help Children Transition into Structured Learning

Blog banner

10 Reasons Why Guy BestFriends are the Must in Every Girl's Life

Blog banner

Constrained Management in IT

Blog banner

Tea, Coffee, Red Wine, and Teeth: A Stain Survival Guide

Blog banner

Hello World

Blog banner

How to Find the Right Therapist For Me?

Blog banner

Digital Marketing Ethics Transparency Trust And Brand Reputation digital

Blog banner

How to feel Happy everyday day

Blog banner

Design Considerations for Disk Cache Management

Blog banner

Direct memory access (DMA)

Blog banner

Multiprocessor and Multicore Organization

Blog banner

The Right way of cooking

Blog banner

PERSONAL STORIES

Blog banner

SQL Injection Techniques

Blog banner

Buffers in Operating Systems

Blog banner

Latest Email Marketing Techniques

Blog banner

Improving defences Proxy Device(defense in depth)

Blog banner

Search Marketing In 2026: From Keywords To Credibility And User Intent

Blog banner

Memory Management

Blog banner

How Cyber Forensics use in AI

Blog banner

Photorec - media recovery tool

Blog banner

Data Security must be your Priority!

Blog banner

OS assignment 3

Blog banner

AI and Cyber Security

Blog banner

The Evolution of the Microprocessor ~ Aditya Pai

Blog banner

File Sharing

Blog banner

The Essential Guide to Dynamic Arrays vs. Linked Lists: Which to Use and When ?

Blog banner

Race condition

Blog banner

Cache Memory in Operating Systems

Blog banner