wisemonkeys logo
FeedNotificationProfileManage Forms
FeedNotificationSearchSign in
wisemonkeys logo

Blogs

Deadlock and Starvation

profile
Niraj Parulekar
Aug 13, 2024
0 Likes
0 Discussions
94 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

Threads

Blog banner

I/O Management and Disk Scheduling

Blog banner

Senseless Teeths

Blog banner

SECURITY VULNERABILITIES COUNTERMEASURES IN A SMART SHIP SYSTEM

Blog banner

Understanding - Proof of Work!

Blog banner

Memory management

Blog banner

Diwali

Blog banner

Types of Hackers

Blog banner

Deadlock and Starvation

Blog banner

Deadlock and Starvation

Blog banner

Types of Threads

Blog banner

MODERN OPERATING SYSTEM

Blog banner

The Sunny Side of Instagram

Blog banner

Social media

Blog banner

Explain Kernel in OS

Blog banner

Importance of Website

Blog banner

Microsoft Word

Blog banner

VIRTUAL MACHINE

Blog banner

All you need to know about “On-page SEO”

Blog banner

Vulnerability Assessment

Blog banner

Data Acquisition in Cyber Forensics

Blog banner

Beyond the Track: Why the Best Hotel in Arcadia, Florida, Completes Your IMSA Sebring Getaway

Blog banner

To travel is to live

Blog banner

How to make Pancakes

Blog banner

10 Types of Friends in every friend group

Blog banner

Exploring Virtual Machines and Computer Forensic Validation Tools

Blog banner

Risk management in IT

Blog banner

GIS Applications: How Different Industries are Leveraging Geospatial Data

Blog banner

BITCOIN WALLET

Blog banner

Chicken Dum Biryani

Blog banner

"Audit" In Data Science

Blog banner

Art and Culture of Rajasthan

Blog banner

The Future of Cybersecurity: Trends, Challenges, and Strategies

Blog banner

Wrike

Blog banner

Women Empowerment

Blog banner

Evolution of Operating system.

Blog banner

Modern Teaching Methods: Why Inquiry-based & Experiential Learning Works Best

Blog banner

Mobile Security

Blog banner

HUBSPOT

Blog banner

AutoML: The Future of Automated Data Science

Blog banner

WAKE UP ITS FOOD o'CLOCK...!!!!!

Blog banner

A Tourist’s Guide To Florida’s Rodeo Culture: What To Expect At The Arcadia Championship Rodeo

Blog banner