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

Busted : Common Web Security Myths

Blog banner

Travel Geek ‘The last $50k in Switzerland’

Blog banner

Functions Of Operating Systems

Blog banner

City of Mumbai (Bombay):

Blog banner

Security Issues

Blog banner

Autonomy Vehicles: Future Ki Gadiya

Blog banner

Health and fitness

Blog banner

objectives and functions of operating system

Blog banner

?Why Does My Breath Still Smell After Brushing?

Blog banner

Understanding Endometriosis and Its Psychological Impact on Quality of Life

Blog banner

virtual machine

Blog banner

Mariana Trench: The deepest depths

Blog banner

Data-Driven Prediction of Virtual Item Prices in Online Games

Blog banner

differentiate thinking humanly and rationally

Blog banner

DMZ: Your Secret Weapon for Data Security

Blog banner

PYTHON

Blog banner

OPERATING SYSTEM

Blog banner

The Secure Software Development Life Cycle (SDLC)

Blog banner

Importance of business process documentation

Blog banner

Working with Sniffers for monitoring network communication

Blog banner

What do you mean by online marketing and why do you need to know about it

Blog banner

Wedding photographer

Blog banner

Capacity management in ITSM

Blog banner

MODERN OPERATING SYSTEM

Blog banner

Multiprocessor

Blog banner

About myself

Blog banner

What are the different types of E-mail crime and process of email forensic?

Blog banner

10 Types of Friends in every friend group

Blog banner

Junk food vs healthy food

Blog banner

Esri India launches Policy Maps.

Blog banner

Deadlock

Blog banner

Why is online marketing is important in current scenario

Blog banner

Operation system

Blog banner

Tomato Butter Sauce with Bucatini

Blog banner

Operating Systems Overview

Blog banner

21ST CENTURY PATRIARCHY

Blog banner

Emailing the merger document

Blog banner

Discover The Top 3 Places To Stay in London

Blog banner

Virtual Memory

Blog banner

Objectives and functions of Operating System...

Blog banner

Define Instagram.

Blog banner

Synchronization

Blog banner