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

Regression Analysis

Blog banner

"Audit" In Data Science

Blog banner

Threads in OS

Blog banner

DIGITAL TECHNOLOGY

Blog banner

How To Secure Operating Systems ?

Blog banner

Virtual Machine

Blog banner

What is online marketing and why do you need to know about it ?

Blog banner

Office Lunch Problems in Mumbai and How Tiffin Services Solve Them

Blog banner

Beyond the Track: Why the Best Hotel in Arcadia, Florida, Completes Your IMSA Sebring Getaway

Blog banner

Automating OSINT tasks for efficient Cyber Forensics Investigations

Blog banner

Deadlock in operating system

Blog banner

Junk food vs healthy food

Blog banner

Swiggi

Blog banner

Different types of e-commerce platforms or advantages and disadvantages

Blog banner

ROLE OF THE COMPUTER FORENSICS TOOLS AND TECHNIQUES

Blog banner

10 Alien Encounters and Abduction Stories

Blog banner

Operating system and overviews

Blog banner

Personalized Movie Recommendations with Data Science

Blog banner

Decrypting Cryptocurrency: Tracing Transactions in Cyber Investigations

Blog banner

Threads

Blog banner

Why we should do reading

Blog banner

Hacking Mobile Platforms

Blog banner

Fitness regime by Deepesh

Blog banner

Top Career Paths After a B.Com Degree in Mumbai: What’s Next for You?

Blog banner

THE INPACT OF SOCIAL MEDIA!

Blog banner

Security requirements for Safe E-Payments

Blog banner

Memory hierarchy

Blog banner

Drawing tips for a beginner

Blog banner

Street foods

Blog banner

Introduction to Data Science: Life Cycle & Applications

Blog banner

Smartsheet

Blog banner

Proof-of-Stake (PoS)

Blog banner

Geographic Information Systems(By aditi Unnikrishnan)

Blog banner

Affiliate Marketing V/S Influencer Marketing

Blog banner

Device driver

Blog banner

Social Engineering Attacks

Blog banner

Fault tolerance

Blog banner

Save Girl Child

Blog banner

Mariana Trench: The deepest depths

Blog banner

Instagram

Blog banner

Uniprocessor Scheduling

Blog banner

Chicken Dum Biryani

Blog banner