wisemonkeys logo
FeedNotificationProfileManage Forms
FeedNotificationSearchSign in
wisemonkeys logo

Blogs

Deadlock and Starvation

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

DNS Cache

Blog banner

Multicore and Multithreading

Blog banner

Ola

Blog banner

Steps to create an Ubuntu EC2 Instance with GUI in AWS

Blog banner

A Weekend at Oak Tree Hotel: The Best Hotel Experience in Arcadia, Florida

Blog banner

Supervised and unsupervised learning

Blog banner

Making Money through Instagram

Blog banner

Session Vulnerabilities

Blog banner

10 Reasons why Monica and Chandler are the best couple ever.!!!

Blog banner

Information of meesho company

Blog banner

Session Hijacking Techniques

Blog banner

Stay Close To Adventure In Arcadia, Florida At Oak Tree Hotel

Blog banner

How Cyber Forensics use in AI

Blog banner

Pilgrimage at LOC: A privilege and a paradox

Blog banner

THE DESIRE OF MANY

Blog banner

Sniffing: A Cyber Security Threat

Blog banner

Outlook mail

Blog banner

EFT

Blog banner

Deadlock Prevention

Blog banner

CYBERBULLYING: Negative comments!

Blog banner

Buffer overflow

Blog banner

Deadlock and Starvation in an Operating System

Blog banner

Autonomy Vehicles: Future Ki Gadiya

Blog banner

?Why Does My Breath Still Smell After Brushing?

Blog banner

Virtual Machine

Blog banner

UniProcessor Scheduling

Blog banner

Importance of Education

Blog banner

Title: Modern Operating Systems: Powering the Digital Era

Blog banner

OS Assignment 1

Blog banner

Life lesson

Blog banner

Spyware

Blog banner

Android Application Components and Activity Lifecycle

Blog banner

social media issue

Blog banner

FILE SHARING

Blog banner

Yoga in INDIA and ABROAD

Blog banner

Device driver

Blog banner

Art and Culture of Rajasthan

Blog banner

Famous Indian dishes that where misunderstood to be Indian

Blog banner

Blog on Smartsheet.

Blog banner

virtual machine

Blog banner

MODERN OPERATING SYSTEM

Blog banner

Junk food vs healthy food

Blog banner