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

Memory heirchy

Blog banner

10 Reasons Why Guy BestFriends are the Must in Every Girl's Life

Blog banner

Blockchain Security Technique

Blog banner

Memory management

Blog banner

Why Data Security Is Important

Blog banner

How to invest in Indian Stock Market ? ~ Tutorial 1

Blog banner

TRELLO

Blog banner

DATA BREACH CAUSES CHALLENGES PREVENTION AND FUTURE DIRECTIONS

Blog banner

Security issues in Sensor Networks and gathering admissible evidence in Network Forensics

Blog banner

Design Considerations for Disk Cache Management

Blog banner

Use case of K-means clustering

Blog banner

Emailing the merger document

Blog banner

Gamer life

Blog banner

Uniprocessor scheduling

Blog banner

LINUX VSERVER VIRTUAL MACHINE ARCHITECTURE

Blog banner

A book review

Blog banner

Memory Management

Blog banner

Decrypting Cryptocurrency: Tracing Transactions in Cyber Investigations

Blog banner

Cache memory

Blog banner

Direct Memory Access

Blog banner

Different types of scam Fraud

Blog banner

The Khan mehtab transforming the modular switches

Blog banner

Eating Well With Meal Maharaj on Busy Workdays Without Cooking

Blog banner

Importance of business process documentation

Blog banner

Corporate Discipline.

Blog banner

A True Friendship

Blog banner

Southern Turkey Earthquake: Causes and Consequences of a Tragic Natural Disaster

Blog banner

Memory Management

Blog banner

Evolution of operating system

Blog banner

Processing Crime and Incident Scenes

Blog banner

Photorec - media recovery tool

Blog banner

Google classroom

Blog banner

Online Games

Blog banner

Instagram

Blog banner

?Why Social and Emotional Skills Matter More Than ABCs in Early Years?

Blog banner

WomenEmpowerment

Blog banner

The evolution of OS

Blog banner

"Geographic Information Systems (GIS) and its Applications in Urban Planning"

Blog banner

OS Assignment 3 Deadlock

Blog banner

This Windows 11 encryption bug may cause data damage

Blog banner

Vulnerability Assessment

Blog banner

Predictive Analytics: How Data Science Predicts Trends(Weather ,Stock Market,Sales Forecasting ).

Blog banner