wisemonkeys logo
FeedNotificationProfileManage Forms
FeedNotificationSearchSign in
wisemonkeys logo

Blogs

Deadlock and Starvation

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

The Laws of Karma

Blog banner

Virtual memory

Blog banner

Malware Detection Techniques for Mobile Devices

Blog banner

Benefits of yoga and meditation

Blog banner

My First Trek - Sondai, Karjat - Shoaib Malik

Blog banner

Buffer overflow

Blog banner

What is Vishing?

Blog banner

Virus

Blog banner

The Importance of Financial Literacy for College Students

Blog banner

Operating Systems

Blog banner

Art and Culture of Rajasthan

Blog banner

Survey of Which Movies Types people are Prefer to Watch in India.

Blog banner

Study on cyber and network forensic in computer security management

Blog banner

FAMILY WHERE LIFE BEGINS....

Blog banner

Artificial Intelligence and I

Blog banner

10 Interesting Facts about Attack on Titan

Blog banner

How to grow followers on Instagram business account?

Blog banner

Biometric Authentication and Privacy: Balancing Ethical Concerns

Blog banner

MEMORY MANAGEMENT

Blog banner

Data Science in Predictive Analytics: Transforming Business Decision-Making

Blog banner

Cyber Laws In India and Around the World

Blog banner

The Role of cryptography in cyber security

Blog banner

Photography

Blog banner

Health and fitness

Blog banner

Understanding Regression Analysis

Blog banner

Computer Security

Blog banner

De-Coding Love

Blog banner

Memory Management in an Operating System

Blog banner

Modern operating system

Blog banner

Direct Memory Access

Blog banner

internet email and it's applications

Blog banner

Capacity management in ITSM

Blog banner

Social media

Blog banner

Efficiency of SQL Injection Method in Preventing E-Mail Hacking

Blog banner

Memory Management of Operating System(OS)

Blog banner

Interrupts

Blog banner

Concurrency and Deadlocks

Blog banner

Blog on health and fitness

Blog banner

Why Kanye West (Now Ye) is the GOAT: A Legacy Beyond Music

Blog banner

The application udemy

Blog banner

LiquidPlanner

Blog banner

Improving the Accuracy of GPS and GNSS

Blog banner