wisemonkeys logo
FeedNotificationProfileManage Forms
FeedNotificationSearchSign in
wisemonkeys logo

Blogs

Deadlock and Starvation

profile
Khush Bagaria
Aug 15, 2024
0 Likes
0 Discussions
120 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

Deadlock in Operating systems

Blog banner

Working with Sniffers for monitoring network communication

Blog banner

Memory Management in Operating System

Blog banner

10 Reasons to Date a South Indian Girl

Blog banner

Starvation

Blog banner

Benefits of Yoga

Blog banner

Spotify

Blog banner

How Preschool Annual Day Shapes Confidence, Emotions, and Growth

Blog banner

Interrupts in OS

Blog banner

Service stratergy principles

Blog banner

Dove’s Real Beauty Campaign- Case Study

Blog banner

Cross site scripting Attack

Blog banner

Data Exfiltration

Blog banner

Process, process creation and process termination

Blog banner

Cyber Forensics in Healthcare: Protecting Patient Data and Preventing Breaches

Blog banner

Asana

Blog banner

Electronic Funds Transfer

Blog banner

PERSONAL STORIES

Blog banner

How Laughing Gas Makes Your Dental Visit So Much Easier

Blog banner

Hello World

Blog banner

Concept and definition of m-commerce

Blog banner

Anomaly Detection in Behavioral Data Using Machine Learning

Blog banner

Linux Threads:

Blog banner

Threads

Blog banner

Mumbai

Blog banner

Socket Programming in Java

Blog banner

Introduction my self

Blog banner

Os Virtual Memory

Blog banner

Autonomy Vehicles: Future Ki Gadiya

Blog banner

Service Operation

Blog banner

Mail merge

Blog banner

Understanding the 'Ambiverts'

Blog banner

Why is ITSM important in IT organization?

Blog banner

Health and fitness in technology

Blog banner

Cache memory

Blog banner

Decoding Confusion Matrix

Blog banner

Dos (Denial of service) Attack

Blog banner

POSITIVE ATTITUDE IN LIFE

Blog banner

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

Blog banner

Data Science in Everyday Life (like a phone, shopping cart, or social media icons)

Blog banner

Getting into Anime

Blog banner

BENIFITS OF YOGA

Blog banner