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

SECURITY VULNERABILITIES COUNTERMEASURES IN A SMART SHIP SYSTEM

Blog banner

Data Science in Healthcare: Predicting Diseases

Blog banner

Workplace mental health: A Psychological Perspective on Employee Well-being and Organizational Growth

Blog banner

Yoga in INDIA and ABROAD

Blog banner

Os Virtual Memory

Blog banner

Virtual machine.

Blog banner

Device driver

Blog banner

Blog name

Blog banner

Mumbai Metro 3

Blog banner

Major achievement

Blog banner

Cache memory

Blog banner

Understanding Endometriosis and Its Psychological Impact on Quality of Life

Blog banner

ACHIEVEMENTS IN OPERATING SYSTEMS

Blog banner

Types of threads

Blog banner

Remote Work in 2026

Blog banner

Virtual memory

Blog banner

1.1 basic elements

Blog banner

Types Of scheduling

Blog banner

What your Favorite colour says about You?

Blog banner

MAHAKAL LOK UJJAIN

Blog banner

Technical SEO : Total Guide

Blog banner

Knowledge Management in Continual Service improvement (CSI)

Blog banner

Mumbaicha Dabbawalla

Blog banner

Memory management

Blog banner

ROLE OF THE COMPUTER FORENSICS TOOLS AND TECHNIQUES

Blog banner

Dos (Denial of service) Attack

Blog banner

THE ACTORS LIFE

Blog banner

Threads

Blog banner

Virtual memory

Blog banner

Everything You Need for a Perfect Stay in Arcadia, Florida, USA.

Blog banner

Deadlock and starvation

Blog banner

Network Footprinting in Cybersecurity

Blog banner

POSITIVE ATTITUDE IN LIFE

Blog banner

Some web vulnerabilities

Blog banner

Corporate Discipline.

Blog banner

Kafka - A Framework

Blog banner

This is my first blog.

Blog banner

Virtual Machine

Blog banner

Modern operating system

Blog banner

BIRYANI ! The history you never knew about

Blog banner

Life of a 2020-2021 student

Blog banner

Satellite Based Positioning

Blog banner