wisemonkeys logo
FeedNotificationProfileManage Forms
FeedNotificationSearchSign in
wisemonkeys logo

Blogs

Deadlock and Starvation

profile
Shubham Yadav
Aug 15, 2024
0 Likes
0 Discussions
51 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

How Does Preschool Help Children Become Better Decision Makers?

Blog banner

Europe Through My Lens

Blog banner

De-Coding Love

Blog banner

Policies for Service Transition

Blog banner

Busted : Common Web Security Myths

Blog banner

GUIDE TO GIS

Blog banner

Google

Blog banner

Challenges of Digital forensics in cloud computing environment

Blog banner

Memory input output management

Blog banner

Deadlock and Starvation

Blog banner

Next time you click on "Remind me later", think twice!

Blog banner

What Your Child Learns During Free Play (That You Might Not Notice)

Blog banner

Modern Operating System

Blog banner

HACKING MOBILE PLATFORM

Blog banner

THE ACTORS LIFE

Blog banner

Data Analytics in Data Science

Blog banner

What is Amazon?

Blog banner

Memory Management

Blog banner

Every body is beautiful

Blog banner

A BLOG ON MYSQL

Blog banner

India Digital Personal Data Protection Act, 2023

Blog banner

What is thread and alse multithreading

Blog banner

Deadlock in Operating System

Blog banner

Security in Cloud Computing Environment using cryptography - Rushabh Modi

Blog banner

POSITIVE ATTITUDE IN LIFE

Blog banner

Deadlock and starvation

Blog banner

Understanding Mobile Device Forensics

Blog banner

Mariana Trench: The deepest depths

Blog banner

Phishing

Blog banner

objectives and function of operating system

Blog banner

MYNTRA

Blog banner

Meal Maharaj — 3 CP, 5 CP, 8 CP. Same Love, Different Portions

Blog banner

Docker Framework

Blog banner

JUSTICE FOR EVERY “BEZUBAAN ANIMAL”

Blog banner

I/O Buffering

Blog banner

Process Description

Blog banner

How covid-19 impacted Social media ad spend forecast globally

Blog banner

Memory management

Blog banner

(Input/Output) in os

Blog banner

Memory Management

Blog banner

Assignment-3

Blog banner

The Future of Patola Weaving in a Sustainable Fashion World

Blog banner