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

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

Blog banner

Travelling blog

Blog banner

Multiprocessor and scheduling

Blog banner

Linux Memory Management

Blog banner

MODERN OPERATING SYSTEM

Blog banner

Cross site scripting Attack

Blog banner

A small world of Sockets

Blog banner

Are Social Media Paid Campaigns Worth It?

Blog banner

The Peephole

Blog banner

Caching windows

Blog banner

Discover The Top 3 Places To Stay in London

Blog banner

"Audit" In Data Science

Blog banner

The Role of Cyber Forensics in Criminology

Blog banner

Ethical Hacking

Blog banner

Cloud Technology and its Implications for Entrepreneurship

Blog banner

Virtual Machine

Blog banner

Utilizing Data-Hiding and Retrieval Techniques in Cyber Forensics

Blog banner

Game Theory in Blockchain

Blog banner

MEMORY HIERARCHY

Blog banner

Method of Evaluating Information Security Level in an Organization

Blog banner

Computer security techniques

Blog banner

What is a Malware ?

Blog banner

Digital Forensics Challenges and Tools

Blog banner

Operating Systems

Blog banner

Veg Mix Pickle

Blog banner

Processes: Process Description and Control.

Blog banner

Cyber Forensics

Blog banner

virtual machines and virtualization

Blog banner

Volatile Memory & Non-Volatile Memory Explained

Blog banner

File Allocation Methods

Blog banner

PHISHING

Blog banner

Hey Aryan here

Blog banner

Meal Maharaj — 3 CP, 5 CP, 8 CP. Same Love, Different Portions

Blog banner

MEMORY MANAGEMENT REQUIREMENT

Blog banner

Deadlock

Blog banner

Women Empowerment

Blog banner

MENDELEY

Blog banner

Cache Memory(142)

Blog banner

Cyber Forensics in Healthcare: Protecting Patient Data and Preventing Breaches

Blog banner

MODERN OPERATING SYSTEM

Blog banner

Depression

Blog banner

MYNTRA

Blog banner