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

Recipe of Paneer Butter Masala

Blog banner

Clustering Techniques

Blog banner

Virtual Machine

Blog banner

Memory

Blog banner

Lifestyle of a photographer

Blog banner

Exploring Arcadia’s Cowboy Culture, Peace River & Hidden Attractions

Blog banner

Compromising Mobile Platforms

Blog banner

Some web vulnerabilities

Blog banner

6 Digital Marketing Trends You Must Watch Out For In 2022

Blog banner

Virtual Memory - Explaination, Working, Steps

Blog banner

Memory Management

Blog banner

12 Principles of Animation

Blog banner

Monday. com App

Blog banner

Biometric Authentication Vulnerabilities

Blog banner

Memory management

Blog banner

CYBERBULLYING: Negative comments!

Blog banner

I/O Management and Disk Scheduling

Blog banner

Stories Woven in Silk: The Meaning Behind Patola Motifs

Blog banner

Cache Memory

Blog banner

Digital Balance: Keeping Children Mindful in the Screen Age

Blog banner

"Games and the future"

Blog banner

Data Analytics in Data Science

Blog banner

MOVEMBER

Blog banner

Why Personalized Return Gifts Are the Perfect Choice for Every Kid’s Birthday Party?

Blog banner

Memory Management Techniques

Blog banner

Precision-Recall in Data Science

Blog banner

Zero-Click Searches: How To Stay Visible In Google’s New Era

Blog banner

Starting Android Activity Using Intent

Blog banner

How To Secure Operating Systems ?

Blog banner

ZOHO

Blog banner

Earth with no trees

Blog banner

MailChimp

Blog banner

File management

Blog banner

Microsoft Windows Overview

Blog banner

Introduction my self

Blog banner

Supervised and unsupervised learning

Blog banner

AI and Data Science: Revolutionizing Industries

Blog banner

1.1 basic elements

Blog banner

“Shot on iPhone” : A campaign by Apple that turned into a prodigy

Blog banner

Cyber Crime Investigation In The Era Of Big Data

Blog banner

MEMORY FORENSIC ACQUISITION AND ANALYSISOF MEMORY AND ITS TOOLS COMPARISON

Blog banner

Juveniles, Internet and Computer Crime

Blog banner