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 Email? Uses of Emails

Blog banner

Open Source Project By Google

Blog banner

Hosting basics

Blog banner

Concurrency and memory

Blog banner

What is Amazon?

Blog banner

Policies for Service Transition

Blog banner

Explain Multiprocessors

Blog banner

Segmentation and paging concept

Blog banner

How to invest in Indian Stock Market ? ~ Tutorial 1

Blog banner

Wiretapping

Blog banner

Memory Management

Blog banner

10 Alien Encounters and Abduction Stories

Blog banner

FIREWALL

Blog banner

Buffer Overflow

Blog banner

Consumer to consumer Business model

Blog banner

A Journey By Train

Blog banner

Best password managers: Reviews of the top products

Blog banner

SECURITY RISKS OF REMOTE WORKING

Blog banner

Threat from Inside: Educating the Employees Against Cyber Threats

Blog banner

Royal enfield

Blog banner

Starting Android Activity Using Intent

Blog banner

Some facts about Technology

Blog banner

Meshoo

Blog banner

Shoulders

Blog banner

Some web vulnerabilities

Blog banner

The Power of Forensic Watermarking in the Fight Against Content Piracy

Blog banner

Race condition

Blog banner

Sessions In OS.

Blog banner

Multiprocessor and Multicore Organization

Blog banner

Is it important to follow all the trends that come up on social media?

Blog banner

E-learning

Blog banner

Embedding a Youtube video on Wisemonkeys

Blog banner

Virtual memory

Blog banner

Electronic Funds Transfer

Blog banner

MPL and how its effects?

Blog banner

An Approach To Spyware Detection And Removal

Blog banner

Fault Tolerance

Blog banner

Depression

Blog banner

The Role of Cyber Forensics in Addressing Cyber security Challenges in Smart Cities

Blog banner

Understanding Input Based Keylogger Activation Systems: Risks and Mitigation

Blog banner

THE DESIRE OF MANY

Blog banner

Data Science in Healthcare: Predicting Diseases

Blog banner