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

Threads

Blog banner

What is Internet

Blog banner

Fitness

Blog banner

Supervised and Unsupervised Learning

Blog banner

Zomato's Secret Digital Marketing Techniques!

Blog banner

Clarizen

Blog banner

Software

Blog banner

BrainGate Technology

Blog banner

Evolution of the Microprocessor ~ Aditya Pai

Blog banner

EID UL FITR

Blog banner

Ola

Blog banner

Importance of business process documentation

Blog banner

Self defence

Blog banner

Email Privacy

Blog banner

Predictive Analysis - Ek Overview

Blog banner

Smart Shoephone: Is that technology overdose!?

Blog banner

Study of Sniffing Tools

Blog banner

Service Design Principles

Blog banner

Android Flashlight Application

Blog banner

Apache Kafka

Blog banner

Pro-Tips On How To Keep your Foot Healthy

Blog banner

Direct memory access

Blog banner

Technical Challenges and Directions for Digital Forensics

Blog banner

Deadlock in Operating System

Blog banner

The Art of Slow Fashion: Why Patola Defines Sustainable Luxury

Blog banner

Ubiquitous Computing

Blog banner

Raising Emotionally Intelligent Students: The Classroom Beyond Academics

Blog banner

10 Unsolved Mysteries all over the world

Blog banner

Firewall / IDS Evasion Techniques

Blog banner

Smartphone Security: Vulnerabilities and Attacks

Blog banner

Respondo Launches Revolutionary Video Discussion App

Blog banner

FILE SHARING

Blog banner

Why we should do reading

Blog banner

What is a geographic information system (GIS)?

Blog banner

OPERATING SYSTEM

Blog banner

VIRTUAL MACHINES

Blog banner

Mobile Security

Blog banner

Paging

Blog banner

Throttle engine ’Sneak peek into the future’

Blog banner

Virtual Memory

Blog banner

Importance Of Time

Blog banner

Is it important to follow all the trends that come up on social media?

Blog banner