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

Women empowerment

Blog banner

Service Operations in ITSM

Blog banner

Simple STEM Activities for Toddlers That Spark Curiosity

Blog banner

BUSINESS MODELS OF E COMMERCE

Blog banner

Disk Scheduling

Blog banner

Why Should You Schedule Tweets on Twitter?

Blog banner

CONCURRENCY

Blog banner

Lifestyle of a photographer

Blog banner

MAJOR ACHIEVEMENTS OF OS

Blog banner

Uniprocessor scheduling

Blog banner

THE INPACT OF SOCIAL MEDIA!

Blog banner

I/O Buffering

Blog banner

Process Description

Blog banner

Improving the Accuracy of GPS and GNSS

Blog banner

Theads

Blog banner

INTRANET

Blog banner

Education: Key to your Prosperity

Blog banner

Cache Memory

Blog banner

Threads Concurrency: Mutual Exclusion and Synchronization

Blog banner

A-B-C of Networking: Part-3 (Topology [Bus & Star])

Blog banner

The functions of operating system

Blog banner

Big Data Architecture

Blog banner

A MODERN OPERATING SYSTEM

Blog banner

Socket Programming in Java

Blog banner

Mumbai Metro 3

Blog banner

Data Science in Predictive Analytics: Transforming Business Decision-Making

Blog banner

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

Blog banner

Note on Process, Process creation and Process termination

Blog banner

Security and E-mail

Blog banner

Cloud Technology and its Implications for Entrepreneurship

Blog banner

TOGETHER WE CAN CONQUER #team

Blog banner

Android Application Components and Activity Lifecycle

Blog banner

Mango Raisin Chutney (sweet mango raisin spread)

Blog banner

A Short History of GIS

Blog banner

Consumer to consumer Business model

Blog banner

Child labour

Blog banner

The War With Cold On Earth

Blog banner

Why is ITSM important in IT organization?

Blog banner

Data Lakes: A Key to Modern Data Management

Blog banner

Deadlock and Starvation

Blog banner

10 Unknown facts about India's Independence

Blog banner

Email Privacy

Blog banner