wisemonkeys logo
FeedNotificationProfileManage Forms
FeedNotificationSearchSign in
wisemonkeys logo

Blogs

Deadlock and Starvation

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

IT RISK

Blog banner

Deadlock

Blog banner

Memory

Blog banner

Operating system and overviews

Blog banner

Linux

Blog banner

Network Forensics Tools and Techniques

Blog banner

How to kiss

Blog banner

Exploring Arcadia’s Cowboy Culture, Peace River & Hidden Attractions

Blog banner

Man In The Middle Attack

Blog banner

Open Source Project By Google

Blog banner

Why Your Daily Meal Routine Matters More Than Occasional Healthy Eating

Blog banner

Cyber Forensics in a Ransomware Attack Recovery

Blog banner

Blockchain

Blog banner

Memory Management

Blog banner

Study of Backdoor and Trojan tools

Blog banner

How to Find the Right Therapist For Me?

Blog banner

Concurrency and memory

Blog banner

Is It Too Late to Straighten My Teeth as an Adult?

Blog banner

Memory Management

Blog banner

Deadlock

Blog banner

THE LEGAL ISSUES OF COMPUTER FORENSICS IN INDIA

Blog banner

Uniprocessor scheduling

Blog banner

The Impact of Tolerances and Wall Thickness on Pipeline Integrity

Blog banner

5 Powerful Mindset Shifts To Make 2026 Your Breakthrough Year

Blog banner

Different memory allocation strategies

Blog banner

The khan mehtab transforming the modular switches company

Blog banner

Platonic Solids

Blog banner

MODERN OPERATING SYSTEM

Blog banner

Fort Myers Day Trip from Arcadia: History, Riverfront Views & Coastal Adventures

Blog banner

PODIO

Blog banner

How to insert contacts in zoho crm using php

Blog banner

Partnership in Learning: How Parent Involvement Shapes a Child’s Early Education

Blog banner

Kernel in Operating System

Blog banner

How Much Protein Do You Really Need Every Day?

Blog banner

Toothache at night? What does this mean, and how to cope with it?

Blog banner

Memory heirchy

Blog banner

Synchronization

Blog banner

OS Assignment-3

Blog banner

The Truth Behind Viral DIY Dental Hacks

Blog banner

Importance of business process documentation

Blog banner

Introduction to Data Science: Life Cycle & Applications

Blog banner

Stephen Hawking : A Remarkable Physicist

Blog banner