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

Data Structures

Blog banner

Article on IT development trends

Blog banner

Simple AI Symptom Diagnosis Using LISP – Rule-Based Expert System

Blog banner

Have You Explored India Yet?

Blog banner

IOT- Internet Of Things

Blog banner

File Management system

Blog banner

How To Invest In Indian Stock Market @ BSE & NSE ~ Tutorial 3

Blog banner

The Power of Teamwork: Learning Collaboration Through Everyday Activities

Blog banner

Blockchain uses and use cases

Blog banner

Risk mitigation and management

Blog banner

Virtual Memory

Blog banner

MODERN OPERATING SYSTEM

Blog banner

Game via listing method

Blog banner

How to lose belly fat

Blog banner

Difference Between Classification And Clustering

Blog banner

Types of Viruses

Blog banner

How Puppet Shows and Role Play Teach Empathy to Preschoolers

Blog banner

Process Creation

Blog banner

Simple Ways of Avoiding Basic Mistakes in Smart Phone Security

Blog banner

Cache Memory in Operating Systems

Blog banner

Memory Management

Blog banner

Threads in OS

Blog banner

Building Confidence in Children Through Daily Routines and Play

Blog banner

Data Visualization

Blog banner

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

Blog banner

Network Footprinting in Cybersecurity

Blog banner

Working with Sniffers for monitoring network communication

Blog banner

Cloud Computing

Blog banner

Dal Bafla Recipe

Blog banner

Why Oak Tree Hotel Is Arcadia’s Hidden Gem?

Blog banner

Optimization of operating system design

Blog banner

Domain Name System

Blog banner

Why Friendship at Work is Important

Blog banner

Modern operating system

Blog banner

Raid

Blog banner

Tableau

Blog banner

Simple STEM Activities for Toddlers That Spark Curiosity

Blog banner

Kernel in Operating System

Blog banner

OPERATING SYSTEM OBJECTIVES AND FUNCTIONS

Blog banner

Review on Recovering Deleted Files

Blog banner

Buffer overflow

Blog banner

Riddhi Miyani 53003220140

Blog banner