wisemonkeys logo
FeedNotificationProfileManage Forms
FeedNotificationSearchSign in
wisemonkeys logo

Blogs

Deadlock and Starvation

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

Introduction my self

Blog banner

Yoga in INDIA and ABROAD

Blog banner

IT GOVERNANCE

Blog banner

Service transistion under difficult conditions

Blog banner

Cyber Forensics on IOT Devices

Blog banner

Simple Ways of Avoiding Basic Mistakes in Smart Phone Security

Blog banner

New Ransomware Encrypts Your Android And Then Changes PIN Lock

Blog banner

Multiprocessor scheduling

Blog banner

What is Email? Uses of Emails

Blog banner

Why Soft Skills Matter as Much as Grades?

Blog banner

VIRTUAL MACHINES

Blog banner

Modern operating system

Blog banner

Meshoo

Blog banner

NIKE

Blog banner

Honeypot in cyber security

Blog banner

Microsoft Windows Overview

Blog banner

Virtual memory

Blog banner

Deadlock Prevention

Blog banner

Challenges of Digital forensics in cloud computing environment

Blog banner

Men’s Mental Health: Breaking the Silence and Building Emotional Well-being

Blog banner

Photorec - media recovery tool

Blog banner

Twisted world

Blog banner

File Sharing

Blog banner

memory cache

Blog banner

Facebook marketing

Blog banner

Network Forensics

Blog banner

Proof-of-Stake (PoS)

Blog banner

Threat management

Blog banner

TECHNOLOGY : BOON OR CURSE ?

Blog banner

?Your Guide to Great Flossing, by the best affordable dentist in Maroubra

Blog banner

Music

Blog banner

Why Time Management Is the Secret to College Success (and How to Master It)

Blog banner

The New Role of Social Media Managers: Beyond Posting Content

Blog banner

Virtual Memory

Blog banner

Understanding Loneliness: Why We Feel Disconnected in a Connected World (Part -1)

Blog banner

Data Visualization

Blog banner

Survey of Which Movies Types people are Prefer to Watch in India.

Blog banner

MoSCoW METHOD IN DATA SCIENCE

Blog banner

Direct Memory Access

Blog banner

The Everyday Parenting Dilemma: Safety Vs Independence

Blog banner

?What Children Learn Between Activities: The Hidden Learning Moments in a Preschool Day

Blog banner

Juveniles, Internet and Computer Crime

Blog banner