wisemonkeys logo
FeedNotificationProfileManage Forms
FeedNotificationSearchSign in
wisemonkeys logo

Blogs

Deadlock and Starvation

profile
Khush Bagaria
Aug 15, 2024
0 Likes
0 Discussions
122 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

Navigation With Indian Constellation(NavIC) by ISRO in Geographic Information Systems

Blog banner

Types of Big Data

Blog banner

Travel Geek ‘The last $50k in Switzerland’

Blog banner

Cyber Security Standards

Blog banner

MEMORY FORENSIC ACQUISITION AND ANALYSISOF MEMORY AND ITS TOOLS COMPARISON

Blog banner

Modern Operating Systems.

Blog banner

Thumb Sucking: When It’s Normal and When It Becomes a Dental Problem

Blog banner

MY MOST THRILLED TREK ..... BHAIRAVGAD

Blog banner

How Music Helps Children Develop Memory, Rhythm, and Language

Blog banner

The War With Cold On Earth

Blog banner

How Laughing Gas Makes Your Dental Visit So Much Easier

Blog banner

Deadlock and Starvation

Blog banner

Monday. com App

Blog banner

The functions of operating system

Blog banner

Smartsheet

Blog banner

The Truth Behind Viral DIY Dental Hacks

Blog banner

SPAM

Blog banner

The Impact of Tolerances and Wall Thickness on Pipeline Integrity

Blog banner

Consumer to consumer business mode

Blog banner

BUSINESS MODELS OF E COMMERCE

Blog banner

Pipedrive

Blog banner

IoT Evolution

Blog banner

Electronic Evidence in Cyber Forensics

Blog banner

Virtual memory

Blog banner

John Titor: The Time Traveler

Blog banner

Data Security must be your Priority!

Blog banner

Artificial Intelligence (AI)

Blog banner

MOVEMBER

Blog banner

Deadlock and Starvation

Blog banner

Security issues

Blog banner

OPERATING SYSTEM

Blog banner

File management In Operating System

Blog banner

The khan mehtab transforming the modular switches company

Blog banner

The Procedural Framework for Corporate High-Tech Investigations

Blog banner

Never give up

Blog banner

BUFFER OVERFLOW_142

Blog banner

I/O buffer and its techniques

Blog banner

Data Visualization

Blog banner

Nature’s Brush on Silk: The Secret Behind Patola Colours

Blog banner

AI & Data Science in Healthcare – Predicting diseases, medical imaging analysis

Blog banner

Why Travellers from Miami & Orlando Are Visiting Arcadia for Weekend Getaways?

Blog banner

Windows Operating System

Blog banner