wisemonkeys logo
FeedNotificationProfileManage Forms
FeedNotificationSearchSign in
wisemonkeys logo

Blogs

Deadlock and Starvation

profile
Shubham Yadav
Aug 15, 2024
0 Likes
0 Discussions
50 Reads

1. Deadlock


Deadlock in an operating system occurs when a set of processes become stuck because each process is waiting for a resource that another process holds, and none of the processes can proceed. This situation usually arises in multi-process systems where processes share resources such as files, memory, or devices. The four necessary conditions for deadlock, often referred to as Coffman’s conditions, are mutual exclusion, hold and wait, no preemption, and circular wait. If all these conditions hold simultaneously, the system can enter a deadlock state. Deadlocks can be addressed through prevention, avoidance, or detection and recovery methods. Prevention involves designing the system to negate one or more of the Coffman conditions, while avoidance uses algorithms like Banker’s Algorithm to ensure the system never enters an unsafe state. Detection and recovery involve allowing the deadlock to occur but having mechanisms to identify and resolve it by terminating processes or rolling them back.


2.Starvation


Starvation occurs in an operating system when a process waits indefinitely to gain access to a resource it needs, even though the resource is available at times. This typically happens in scheduling algorithms that favor certain processes over others, like when a low-priority process is continually preempted by higher-priority processes. Starvation is a significant problem because it can lead to reduced system performance and inefficiency. Solutions to starvation include using aging, a technique where the priority of a waiting process is gradually increased, ensuring that every process eventually gets a chance to execute. By incorporating aging into scheduling algorithms, the operating system can prevent starvation by ensuring that processes waiting for resources for a long time are eventually given access, thus maintaining system fairness.


Comments ()


Sign in

Read Next

MODERN OPERATING SYSTEM

Blog banner

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

Blog banner

DATA WRANGLING

Blog banner

Lucidchart

Blog banner

Interrupts in operating system.

Blog banner

A Review on Data Acquisition in Cyber Forensics

Blog banner

MEMORY HIERARCHY

Blog banner

Functions Of Operating Systems

Blog banner

Vulnerability Assessment

Blog banner

Denial-of-Service and Distributed Denial-of-Service Attack Techniques

Blog banner

Big Data Architecture

Blog banner

Modern operating systems (OS)

Blog banner

Cyber Bullying - Neeta Vonkamuti

Blog banner

ARTICAL ON MANAGEMENT SYSTEM

Blog banner

Starvation and Deadlock.

Blog banner

Decision Tree: A Diagram Model

Blog banner

DEVELOPMENTS LEADING TO MODERN OPERATING SYSTEMS

Blog banner

How To Setup DVWA Using XAMPP on Windows

Blog banner

How to Find the Right Therapist For Me?

Blog banner

Microsoft powerpoint presentation

Blog banner

Amazon

Blog banner

Online Education

Blog banner

Why Are So Many Adults Getting Diagnosed with ADHD?

Blog banner

Fitness

Blog banner

The Golden Temple , Amritsar

Blog banner

The Right way of cooking

Blog banner

Points to consider if you're planning to visit Florida in 2026

Blog banner

Understanding the 'Ambiverts'

Blog banner

Cross site scripting Attack

Blog banner

Facebook marketing

Blog banner

NIKE

Blog banner

File and File System Structure

Blog banner

Lemon and Chilli Pickle (Limbu Mirchi Achar)

Blog banner

Modern Operating System

Blog banner

RAID

Blog banner

Instagram

Blog banner

The Evolution of Operating Systems

Blog banner

How Does SSO Works

Blog banner

CONCURRENCY

Blog banner

Virtual Memory

Blog banner

I/O Management and Disk Scheduling

Blog banner

Dove’s Real Beauty Campaign- Case Study

Blog banner