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

Human factor, a critical weak point in the information security of an organization’s IOT

Blog banner

Threads

Blog banner

Starvation

Blog banner

Virtual memory in Operating System

Blog banner

Current Trends in GIS and Remote Sensing(Ocean Applications)

Blog banner

Admissions Open: Why This Is the Right Time to Choose the Best School for Your Child

Blog banner

Sniffing: A Cyber Security Threat

Blog banner

What is a geographic information system (GIS)?

Blog banner

Workplace mental health: A Psychological Perspective on Employee Well-being and Organizational Growth

Blog banner

The role of artificial intelligence in automating digital forensic analysis.

Blog banner

What is thread and alse multithreading

Blog banner

A-B-C of Networking: Part-2 (Components)

Blog banner

Power of words

Blog banner

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

Blog banner

DATA BREACH CAUSES CHALLENGES PREVENTION AND FUTURE DIRECTIONS

Blog banner

Super Garlicky Tomato Soup with Smashed White Beans

Blog banner

VPN

Blog banner

SQL Injection

Blog banner

The Truth Behind Viral DIY Dental Hacks

Blog banner

Binary Search Tree (BST) in Data Structure

Blog banner

Game Theory in Blockchain

Blog banner

Image Steganalysis in Digital Forensics

Blog banner

Memory management and virtual memory

Blog banner

What is online marketing and why do you need to know about it ?

Blog banner

Drawing tips for a beginner

Blog banner

Metasploit

Blog banner

EVOLUTION OF MICROPROCESSOR

Blog banner

Practical Implementation of Client Server model using TCP/IP.

Blog banner

Life of a 2020-2021 student

Blog banner

Data Mapping

Blog banner

Child labour

Blog banner

"The Benefits of Using GIS in Agriculture"

Blog banner

What is Brute Force Attack? How to defend against it?

Blog banner

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

Blog banner

Expert System In AI

Blog banner

Buffering

Blog banner

Article on Fresh Book

Blog banner

Dove’s Real Beauty Campaign- Case Study

Blog banner

A-B-C of Networking: Part-3 (Topology [Bus & Star])

Blog banner

BITCOIN WALLET

Blog banner

Install Ubuntu Easily

Blog banner

Computer Security

Blog banner