wisemonkeys logo
FeedNotificationProfileManage Forms
FeedNotificationSearchSign in
wisemonkeys logo

Blogs

Deadlock and Starvation

profile
Shubham Yadav
Aug 15, 2024
0 Likes
0 Discussions
53 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

Why Moms Are Choosing Customised School Accessories Over Generic Products?

Blog banner

What is OS Fingerprinting?

Blog banner

A Deep Dive

Blog banner

The Chapped Lips and Dry Mouth Trap: The Sneaky Reason Cavities Spike in Winter

Blog banner

EVOLUTION OF MICROPROCESSOR

Blog banner

Network Forensics

Blog banner

Spyware

Blog banner

Sharing is Caring: Practical Ways to Teach Empathy and Cooperation to Toddlers

Blog banner

This Windows 11 encryption bug may cause data damage

Blog banner

Why Does Hierarchy Still matter in Organizations?

Blog banner

Remote Work in 2026

Blog banner

Simple AI Symptom Diagnosis Using LISP – Rule-Based Expert System

Blog banner

Celebrate Raksha Bandhan with Premium Dry Fruit Gift Hampers

Blog banner

Title: Network Sniffing Techniques: Uncovering the Secrets of Data Transfer

Blog banner

Operating Systems

Blog banner

How to tie a Tie

Blog banner

Threads Concurrency: Mutual Exclusion and Synchronization

Blog banner

Getting started with Android Studio

Blog banner

MYNTRA

Blog banner

WORKFRONT SOFTWARE

Blog banner

Reconnaissance

Blog banner

ROLE OF THE COMPUTER FORENSICS TOOLS AND TECHNIQUES

Blog banner

SECURITY VULNERABILITIES COUNTERMEASURES IN A SMART SHIP SYSTEM

Blog banner

PROCESS STATES OF OPERATING SYSTEM

Blog banner

Buffer Overflow

Blog banner

How can denial-of-service(Dos) attacks be prevented?

Blog banner

Data Visualization- Importance and tools (Tableau,Power BI, Matplotlib)

Blog banner

Data Exfiltration

Blog banner

OS PROCESS DESCRIPTION AND CONTROL-SARVAGYA JALAN

Blog banner

Building Confidence in Children Through Daily Routines and Play

Blog banner

Cache memory

Blog banner

Importance of modern technology era

Blog banner

10 Interesting Facts about Death Note

Blog banner

Gamer life

Blog banner

Smartphone Security: Vulnerabilities and Attacks

Blog banner

Deadlock

Blog banner

Expert System In AI

Blog banner

Bit Coins

Blog banner

Rain

Blog banner

Steganography and Steganalysis

Blog banner

Winter-to-Spring Smile Care: How Sydney’s Late-August Winds Impact Your Teeth & Gums

Blog banner

Mouth Ulcers: Why Do They Keep Popping Up and How Can You Actually Get Rid of Them?

Blog banner