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

GUIDE TO GIS

Blog banner

Multiprocessor and scheduling

Blog banner

Stories Woven in Silk: The Meaning Behind Patola Motifs

Blog banner

Memory Management

Blog banner

SWEET SHREDDED MANGO CHUNDA (MANGO CHUNDA)

Blog banner

Best password managers: Reviews of the top products

Blog banner

Types of email

Blog banner

A buffer overflow

Blog banner

Supervised and unsupervised learning

Blog banner

Procedure For Corporate High-Tech Investigations

Blog banner

File Organization and Access

Blog banner

KASHMIR TRIPS

Blog banner

Modern OS

Blog banner

I Personally

Blog banner

A little bit of salt is all the hash needs!

Blog banner

Yahoo! mail

Blog banner

Cloud Computing

Blog banner

Webmail

Blog banner

Security requirements for Safe E-Payments

Blog banner

Why is online marketing is important in current scenario

Blog banner

How to tie a Tie

Blog banner

Memory Management

Blog banner

38_Network Sniffing Techniques_SBC

Blog banner

What is HTML?

Blog banner

The Role of Frontline Managers in Driving Workplace Performance and Customer Satisfaction

Blog banner

Service Operation

Blog banner

Personalized Movie Recommendations with Data Science

Blog banner

Different types of scam Fraud

Blog banner

Digital Balance: Keeping Children Mindful in the Screen Age

Blog banner

Artificial Intelligence (AI)

Blog banner

Dekkers Algorithm : Ensuring Safe Process Synchronization

Blog banner

VIRTUAL MEMORY

Blog banner

Service Design Model

Blog banner

From Canoeing to Camping: The Perfect Nature Escape Near Arcadia

Blog banner

Self-love: Being the reason of your own smile

Blog banner

Kernel Modes: User Mode vs. Kernel Mode - 80

Blog banner

Flipkart

Blog banner

Street foods

Blog banner

Virtual memory in Operating System

Blog banner

Charcoal, Lemon, and DIY Kits: Which “Viral” Dental Trends Are Actually Dangerous?

Blog banner

Evolution of Operating Systems

Blog banner

NodeJs

Blog banner