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

10 Signs That Prove YOU are his FIRST priority.

Blog banner

What is Spyware? and examples of them.

Blog banner

Direct Memory Access

Blog banner

Processing Crime and Incident Scenes

Blog banner

Service Transition Process in ITSM

Blog banner

Why Festivals Are the Best Classrooms for Young Minds?

Blog banner

Explain website hacking issues

Blog banner

EID UL FITR

Blog banner

Buffer Overflow

Blog banner

Open Source Project By Google

Blog banner

Virtual memory

Blog banner

MODERN OPERATING SYSTEM

Blog banner

26/11 The Black Day Of Mumbai

Blog banner

'C', 'C++' and 'Java': Head-to-Head

Blog banner

What is time ? The term which has astonished Scientists

Blog banner

Networking 101: How to Build Meaningful Connections in College

Blog banner

Python as a tool for data analysis

Blog banner

" THE ANSWERS THAT LED INDIAN BEAUTIES TO THE MISS UNIVERSE HISTORIC WIN. "

Blog banner

BUSINESS MODELS OF E COMMERCE

Blog banner

A Short History of GIS

Blog banner

Privacy LAWs in IT

Blog banner

Virtual machine and virtualizing

Blog banner

Ubiquitous Computing

Blog banner

BrainGate Technology

Blog banner

Safeguarding Your Data: The Importance of Wireless Encryption

Blog banner

Multiprocessor and Multicore Organization

Blog banner

Sessions In OS.

Blog banner

Phishing

Blog banner

Zomato's Secret Digital Marketing Techniques!

Blog banner

Direct memory access (DMA)

Blog banner

Current Trends in GIS and Remote Sensing(Ocean Applications)

Blog banner

I/O Management and Disk Scheduling

Blog banner

Rain bow

Blog banner

Real time scheduling

Blog banner

Computer Security

Blog banner

Indian Food

Blog banner

Precision-Recall in Data Science

Blog banner

SQL Injection

Blog banner

Amazon

Blog banner

Process, process creation and process termination

Blog banner

10 Survival Tips that might save your life

Blog banner

DATA VAULT

Blog banner