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

Risk management in IT

Blog banner

Virtual Memory

Blog banner

Smitten Kitchen Keepers

Blog banner

Importance Of Education.

Blog banner

Session Vulnerabilities

Blog banner

A Happier Workplace Starts with Healthy Lunches by Meal Maharaj

Blog banner

Firewall in Computer Network

Blog banner

Lemon and Chilli Pickle (Limbu Mirchi Achar)

Blog banner

Cryptanalysis tool

Blog banner

A Statistical Analysis of Player Performance and their Value in cricket

Blog banner

10 Reasons to Date a South Indian Girl

Blog banner

Is Social Media Marketing The Next Wave Of Digital Marketing?

Blog banner

Computer Forensics and its Impact in Business Environment

Blog banner

Threads

Blog banner

Deadlock

Blog banner

Marvel Cinematic Universe

Blog banner

Microsoft Windows Overview

Blog banner

How to invest in Indian Stock Market ? ~ Tutorial 1

Blog banner

Social Media.

Blog banner

MQTT (MQ Telemetry Transport) in Data Science

Blog banner

5 ways to save money on catering services in Mumbai

Blog banner

WomenEmpowerment

Blog banner

I Personally

Blog banner

Natural Language Processing(NLP)

Blog banner

Data Science in Everyday Life (like a phone, shopping cart, or social media icons)

Blog banner

Some web vulnerabilities

Blog banner

Multicore and multithreading 171

Blog banner

Interesting fact about kangaroo.

Blog banner

What is E-commerce

Blog banner

Memory Management

Blog banner

INTRODUCTION

Blog banner

Have You Explored India Yet?

Blog banner

Pooja Silver

Blog banner

Types Of scheduling

Blog banner

SMARTSHEET MANAGEMENT SYSTEM

Blog banner

Stephen Hawking : A Remarkable Physicist

Blog banner

SEIZING DIGITL EVIDENCE AT THE SCENE

Blog banner

VIRUS

Blog banner

Data Lake

Blog banner

10 Unsolved Mysteries all over the world

Blog banner

The War With Cold On Earth

Blog banner

RAID

Blog banner