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

Blockchain

Blog banner

How to Encrypt and Decrypt Using GNU PGP

Blog banner

Concurrency:Deadlock and Starvation

Blog banner

COMFORT IS ALL ABOUT FASHION

Blog banner

Evolution of operating system

Blog banner

Continual service improvement vs maintenance phase in IT

Blog banner

Importance of business process documentation

Blog banner

american greatines

Blog banner

NETSUITE

Blog banner

Operating System Objectives and Functions

Blog banner

Raid

Blog banner

The Impact of Tolerances and Wall Thickness on Pipeline Integrity

Blog banner

OS Evolution Achievements

Blog banner

Esri India launches Policy Maps.

Blog banner

Semaphores

Blog banner

Odoo

Blog banner

Data Security and Data Privacy in Data Science

Blog banner

I/O Management and Disk Scheduling

Blog banner

Memory Management

Blog banner

Trends that began during the pandemic

Blog banner

Threads

Blog banner

Evolution of Operating Sytems

Blog banner

Cloud Security: Trends and Innovations

Blog banner

File management

Blog banner

Gamer life

Blog banner

Outlook.com

Blog banner

Sensory Play for Toddlers: Boosting Curiosity Through Touch, Sound, and Colour

Blog banner

Virtual machine

Blog banner

Understanding Mobile Device Forensics

Blog banner

What is M-commerce and how it's work

Blog banner

Dove’s Real Beauty Campaign- Case Study

Blog banner

File system implementation

Blog banner

Bulk E-mail software

Blog banner

Deadlock and Starvation

Blog banner

Interrupts in operating system.

Blog banner

Tools to support CSI activities

Blog banner

How return on investment is defined in IT services

Blog banner

WHAT IS SNAPCHAT AND HOW DOES IT WORK?

Blog banner

Traditional UNIX Scheduling

Blog banner

Cloud Computing: Threats and Vulnerabilities

Blog banner

Article on IT development trends

Blog banner

OS Assignment 3

Blog banner