wisemonkeys logo
FeedNotificationProfileManage Forms
FeedNotificationSearchSign in
wisemonkeys logo

Blogs

Deadlock Prevention

profile
Shreya Mantry
Aug 15, 2024
0 Likes
0 Discussions
92 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

Man is free by the birth .

Blog banner

Human Error: The weakest link in Cybersecurity

Blog banner

Disk Scheduling

Blog banner

Firewall / IDS Evasion Techniques

Blog banner

Recipe of Paneer Butter Masala

Blog banner

Love is in air.....

Blog banner

Facebook marketing

Blog banner

objectives and function of operating system

Blog banner

Life of a 2020-2021 student

Blog banner

Diwali

Blog banner

MAILFENCE

Blog banner

Natural Language Processing(NLP)

Blog banner

Spotify

Blog banner

Modern Teaching Methods: Why Inquiry-based & Experiential Learning Works Best

Blog banner

PYTHON

Blog banner

Email Privacy

Blog banner

Social Engineering Attacks

Blog banner

Python as a tool for data analysis

Blog banner

The Future of Web Development in 2026: Trends Every Business Must Know

Blog banner

Veg Mix Pickle

Blog banner

My Favorite Country

Blog banner

BUSINESS MODELS OF E COMMERCE

Blog banner

MEMORY FORENSIC ACQUISITION AND ANALYSISOF MEMORY AND ITS TOOLS COMPARISON

Blog banner

Instagram

Blog banner

Zomato (Income Sources)

Blog banner

Tableau

Blog banner

computer security

Blog banner

Memory management

Blog banner

Amazon

Blog banner

Save Girl Child

Blog banner

Deadlock

Blog banner

Teenagers of Today

Blog banner

RAID

Blog banner

How the mobile IP is used in GSM architecture.

Blog banner

Veg/Non-veg/Egg Tiffin Meals That Are Nutritious and Filling

Blog banner

Security Issues and Countermeasures

Blog banner

Top 5 Tech Innovations of 2018

Blog banner

Assignment-3

Blog banner

Caching windows

Blog banner

From Airboat Tours to Fossil Hunting: The Ultimate Arcadia Travel Experience

Blog banner

Binary Search Tree (BST) in Data Structure

Blog banner

Deadlock and Starvation

Blog banner