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

Firewall / IDS Evasion Techniques

Blog banner

Virtual Machine

Blog banner

CBSE + International Thinking: How Indian Schools Are Producing World-Ready Students

Blog banner

"Life as a Part-time Student"

Blog banner

DNS Cache

Blog banner

A-B-C of Networking: Part-3 (Topology [Ring, Tree, Mesh])

Blog banner

Risk management in IT

Blog banner

Vulnerabilities in OnePlus Devices

Blog banner

Dental Problems That Start Small But Should Never Be Ignored

Blog banner

Why Extreme Opinions Are Rising: Psychological Insights into Society’s Divides

Blog banner

 " Healing of Yoga "

Blog banner

GIS Bharat Maps

Blog banner

MULTITHREADING:ENHANCEING PERFORMANCE AND EFFICIENCY IN COMPUTING

Blog banner

Working with Sniffers for monitoring network communication

Blog banner

Python as a tool for data analysis

Blog banner

Brain wash of social media

Blog banner

Cyber Bullying - Neeta Vonkamuti

Blog banner

Technical Challenges and Directions for Digital Forensics

Blog banner

Concurrency management in operating systems

Blog banner

INTRANET

Blog banner

Os Virtual Memory

Blog banner

Famous Indian dishes that where misunderstood to be Indian

Blog banner

Depression

Blog banner

(Input/Output) in os

Blog banner

Facebook Shut Down an AI Program!!! Facebook AI bots became Terminators???

Blog banner

Sniffing: A Cyber Security Threat

Blog banner

RAID

Blog banner

Multicore and Multithreading

Blog banner

Tiranga - Abbas Haveliwala

Blog banner

Ghee vs. Coconut Oil vs. Mustard Oil: Which Cooking Fat Wins for Indian Food?

Blog banner

Modern Operating System

Blog banner

Different types of scam Fraud

Blog banner

Rain bow

Blog banner

Tea, Coffee, Red Wine, and Teeth: A Stain Survival Guide

Blog banner

Travelling blog

Blog banner

Deadlock and starvation

Blog banner

My Favorite Country

Blog banner

Search Marketing In 2026: From Keywords To Credibility And User Intent

Blog banner

How to Encrypt and Decrypt Using GNU PGP

Blog banner

How to Plan a Week of Healthy Meals Without Stress

Blog banner

In the world of Technology...

Blog banner

Google classroom

Blog banner