wisemonkeys logo
FeedNotificationProfileManage Forms
FeedNotificationSearchSign in
wisemonkeys logo

Blogs

Deadlock and Starvation

profile
Shubham Yadav
Aug 15, 2024
0 Likes
0 Discussions
52 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

How to lose belly fat

Blog banner

Dove’s Real Beauty Campaign- Case Study

Blog banner

The Importance of Data Quality Management in Data Science

Blog banner

Instagram Features in 2023 That Will Leave You Stunned!

Blog banner

Steps to create an Ubuntu EC2 Instance with GUI in AWS

Blog banner

Personalized Movie Recommendations with Data Science

Blog banner

Why Moms Are Choosing Customised School Accessories Over Generic Products

Blog banner

6 Digital Marketing Trends You Must Watch Out For In 2022

Blog banner

Go Daddy

Blog banner

How to grow followers on Instagram business account?

Blog banner

The New Rules of UI/UX Design Every Website Must Follow in 2026

Blog banner

Why do you need a personalised bag tag for your kids' school bags?

Blog banner

Severe landslides continue to cause concern in Joshimath, Uttarakhand

Blog banner

What is Email? Uses of Emails

Blog banner

File System

Blog banner

Direct Memory Access

Blog banner

Safe Learning Spaces: Why Preschool Environment Matters More Than Ever Today

Blog banner

MD5 Collisions and the impact on computer forensics

Blog banner

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

Blog banner

Zomato (Income Sources)

Blog banner

Memory Management

Blog banner

Mutual exclusion

Blog banner

Why Businesses Are Investing More in Automation than Advertising?

Blog banner

TOP 5 GAMING GADGETS (2024)

Blog banner

Evolution of Operating system

Blog banner

Why You Should Not Use Free VPNs

Blog banner

Outlook.com

Blog banner

A-B-C of Networking: Part-1 (Basics)

Blog banner

Modern operating system

Blog banner

Caching windows

Blog banner

Stop Racism

Blog banner

15 Websites that will make your life easier ...!!!

Blog banner

Top 5 Post-Wedding Skin Care Tips

Blog banner

1 Dentist in Maroubra, Sydney and her 10 obsessions

Blog banner

Amazon

Blog banner

The Power of Cyber Forensic in Solving Crimes

Blog banner

How Reading Books Shape a Child’s Imagination and Thinking?

Blog banner

UniProcessor Scheduling

Blog banner

Malware Detection Techniques for Mobile Devices

Blog banner

Artificial Intelligence (AI)

Blog banner

K-means use cases

Blog banner

OLA

Blog banner