wisemonkeys logo
FeedNotificationProfileManage Forms
FeedNotificationSearchSign in
wisemonkeys logo

Blogs

Deadlock and Starvation

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

Women’s Mental Health (After Marriage)

Blog banner

VIRTUAL MACHINES

Blog banner

I/O buffer and its techniques

Blog banner

Interrupts

Blog banner

VPN

Blog banner

Paginng In OS

Blog banner

What is Virtual Memory

Blog banner

Rain bow

Blog banner

Uniprocessor and Types

Blog banner

security controls

Blog banner

Constrained Management in IT

Blog banner

A Complete Guide to Satvik Indian Powder Masalas and Their Everyday Uses

Blog banner

Cloud Forensic Tools And Storage :A Review Paper

Blog banner

Simple Ways of Avoiding Basic Mistakes in Smart Phone Security

Blog banner

Mango Raisin Chutney (sweet mango raisin spread)

Blog banner

Im Photographer

Blog banner

This School Year, Let Their Belongings Come Back Home Too with Our Ultimate Labelling Kit

Blog banner

Data Structures

Blog banner

IT service level agreement

Blog banner

Virtual memory

Blog banner

Method of Evaluating Information Security Level in an Organization

Blog banner

Distributed Denial of Service (DDoS) attack

Blog banner

GEOLOGY AND GEO-TECTONIC FRAME WORK OF WESTERN BASTAR CRATON

Blog banner

Carrot Pickle With Raisins (lagan Nu Achar)

Blog banner

Understanding the 4 Types of Learning Methods in Early Childhood

Blog banner

Revolutionary AI Tool: ChatGPT

Blog banner

Deadlock in operating system

Blog banner

Understanding Portion Control: How Much Food Do You Really Need?

Blog banner

Use case of K-means clustering

Blog banner

IOT- Internet Of Things

Blog banner

How to Grow Your Brand on YouTube Without a Big Budget

Blog banner

Operating system evolution

Blog banner

My Favorite Country

Blog banner

IO Buffers

Blog banner

Process in OS

Blog banner

The Golden Temple , Amritsar

Blog banner

Classification Vs Clustring? What's the diffrence?

Blog banner

Multiprocessor and scheduling

Blog banner

Race Conditions

Blog banner

Processes : Process description and control

Blog banner

How Social Media Algorithms Will Work in 2026?

Blog banner

Question

Blog banner