wisemonkeys logo
FeedNotificationProfileManage Forms
FeedNotificationSearchSign in
wisemonkeys logo

Blogs

Deadlock and Starvation

profile
Niraj Parulekar
Aug 13, 2024
0 Likes
0 Discussions
95 Reads

1] Deadlock :
                       Deadlock is a situation where a set of processes becomes stuck, each waiting for a resource that the other  processes in the set are holding. This results in a cycle of dependencies where no process can proceed, leading to a complete halt in the system. Deadlock typically occurs under four conditions, known as        Coffman’s conditions:

1. Mutual Exclusion: At least one resource must be held in a non-shareable mode, meaning that only one                                               process can use the resource at a time.

2. Hold and Wait: A process holding at least one resource is waiting to acquire additional resources that are                                         currently being held by other processes.

3. No Preemption: A resource can be released only voluntarily by the process holding it after that process has                                      completed its task.

4. Circular Wait: There must be a circular chain of processes, where each process holds at least one resource                                 that the next process in the chain needs.

--Deadlock prevention, avoidance, detection, and recovery are the primary strategies used to handle deadlocks.

  Prevention involves breaking one of Coffman’s conditions, whereas avoidance uses algorithms like the Banker’s    Algorithm to ensure that the system remains in a safe state. Detection algorithms can identify deadlock when it      occurs, and recovery techniques involve terminating or rolling back processes to break the deadlock.

2] Starvation :
                    Starvation, on the other hand, occurs when a process is perpetually denied the resources it needs to proceed. Unlike deadlock, where processes are waiting on each other in a cycle, starvation involves one or more processes being overlooked in favor of others. This often happens in scheduling algorithms that prioritize certain processes, causing lower-priority processes to wait indefinitely.

For example, in a priority-based scheduling system, a low-priority process might never get CPU time if higher-priority processes continuously arrive. Starvation is particularly problematic in systems where fairness and equitable resource allocation are critical.

To mitigate starvation, algorithms such as aging are used, where the priority of a process increases the longer it waits, eventually ensuring that it will receive the necessary resources.


Comments ()


Sign in

Read Next

GUIDE TO GIS

Blog banner

Understanding Univariate, Bivariate, and Multivariate Analysis in Data Science

Blog banner

The application udemy

Blog banner

Delhi city

Blog banner

How to Plan a Week of Healthy Meals Without Stress

Blog banner

Cloud Computing: Threats and Vulnerabilities

Blog banner

Smartsheet

Blog banner

Microsoft powerpoint presentation

Blog banner

Facebook marketing

Blog banner

Odoo

Blog banner

HR Automation : Need of the hour

Blog banner

Why Your Child Cries at Drop-Off and How Preschools Handle It Gently

Blog banner

RAID

Blog banner

Spitting Pink in the Sink: Why Your Gums Randomly Bleed

Blog banner

The Features of Blockchain

Blog banner

Hash password! Is it really secured?

Blog banner

MY MOST THRILLED TREK ..... BHAIRAVGAD

Blog banner

How to Manage Employees and Tasks in One System (Without Excel)

Blog banner

The Art Of Getting What You Want In Life....

Blog banner

A Heartfelt Act of Kindness

Blog banner

Volatile Memory & Non-Volatile Memory Explained

Blog banner

Evolution of operating systems

Blog banner

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

Blog banner

INSTAGRAM

Blog banner

Next time you click on "Remind me later", think twice!

Blog banner

“Shot on iPhone” : A campaign by Apple that turned into a prodigy

Blog banner

Components of GIS

Blog banner

File Organization and Access

Blog banner

MOBILE DEVICE FORENSIC

Blog banner

Knowledge Management in Continual Service improvement (CSI)

Blog banner

Ethical Hacking

Blog banner

AOL Mail

Blog banner

26/11 The Black Day Of Mumbai

Blog banner

File sharing

Blog banner

Corporate Discipline.

Blog banner

Define Instagram.

Blog banner

Remote Work in 2026

Blog banner

SQL Injection

Blog banner

Theads

Blog banner

MQTT (MQ Telemetry Transport) in Data Science

Blog banner

Classification Algorithms (Decision trees, SVM, Logistic regreession)

Blog banner

SPAM

Blog banner