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

Getting into anime My anime suggestions

Blog banner

Basic Security For SOAP Services

Blog banner

Emotional Intelligence in Children: Why It Is as Important as Academics

Blog banner

On-Page SEO

Blog banner

Deadlock and starvation

Blog banner

Simple Ways to Grow Your Brand Online

Blog banner

Operation system

Blog banner

The Five Steps of Data Science

Blog banner

Inventory management software system

Blog banner

A small world of Sockets

Blog banner

Art and Culture of Rajasthan

Blog banner

Critical success factors

Blog banner

Concurrency:Deadlock and Starvation

Blog banner

Ola

Blog banner

Real-Time Operating Systems (RTOS) Deep Explanation

Blog banner

10 Problems you face if you are an Otaku

Blog banner

Evolution of the Microprocessor ~ Aditya Pai

Blog banner

Race Condition in Operating Theatre

Blog banner

John Titor: The Time Traveler

Blog banner

Exploring Virtual Machines and Computer Forensic Validation Tools

Blog banner

Clarizen

Blog banner

It's all about our Brain.- The Brain Metaphor

Blog banner

Sleep Matters: The Science Behind Toddler Naps

Blog banner

What if COVID does not exist!

Blog banner

Cyber Forensics

Blog banner

Data-Driven Prediction of Virtual Item Prices in Online Games

Blog banner

Pink sauce pasta

Blog banner

MAHAKAL LOK UJJAIN

Blog banner

Jio .....A Revolution ?? ??

Blog banner

Smitten Kitchen Keepers

Blog banner

Virtualisation

Blog banner

Computer Security

Blog banner

Threads Concurrency: Mutual Exclusion and Synchronization

Blog banner

Instagram

Blog banner

Google classroom

Blog banner

Secure Hypertext transfer protocol

Blog banner

The Evolution of the Microprocessor ~ Aditya Pai

Blog banner

IP Address

Blog banner

INSTAGRAM

Blog banner

Why Time Management Is the Secret to College Success (and How to Master It)

Blog banner

File management

Blog banner

Steganography and Steganalysis

Blog banner