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

Fudgy Tahini Date Chocolate Bars

Blog banner

MOBILE DEVICE FORENSIC

Blog banner

THE ROLE OF CYBER FORENSICS IN CRIMINOLOGY

Blog banner

Deadlocks

Blog banner

Data Analytics in Data Science

Blog banner

The Khan mehtab transforming the modular switches

Blog banner

Why Meal Maharaj Prioritises Seasonal Vegetables in Every Meal Box

Blog banner

Scheduling in Operating Systems

Blog banner

Sweet Mango Murabba

Blog banner

How Schools Can Reduce Exam Stress in Students?

Blog banner

Ethical Issues in Data Science and Role of Data Science in Smart Cities

Blog banner

Utilizing Data-Hiding and Retrieval Techniques in Cyber Forensics

Blog banner

How India made the GIS its Own, and its Use in Infrastructural Developments

Blog banner

Digital Marketing Ethics Transparency Trust And Brand Reputation digital

Blog banner

Microsoft powerpoint presentation

Blog banner

Challenges of Digital forensics in cloud computing environment

Blog banner

Virtual Memory

Blog banner

The New Rules of UI/UX Design Every Website Must Follow in 2026

Blog banner

Modern OS

Blog banner

Random Forests

Blog banner

SWEET SHREDDED MANGO CHUNDA (MANGO CHUNDA)

Blog banner

Operating System Objectives and Functions

Blog banner

Understanding Input Based Keylogger Activation Systems: Risks and Mitigation

Blog banner

The Truth Behind Viral DIY Dental Hacks

Blog banner

SQL Injection practice on DVWA

Blog banner

Music is life

Blog banner

Meal Maharaj — 3 CP, 5 CP, 8 CP. Same Love, Different Portions

Blog banner

Social Media.

Blog banner

Demystifying Cryptography: A Beginner's Guide

Blog banner

How to invest in Indian Stock Market ? ~ Tutorial 1

Blog banner

MODERN OPERATING SYSTEMS

Blog banner

Firewall

Blog banner

Types of Hackers.

Blog banner

Characteristics of Etherum

Blog banner

Article on team management software

Blog banner

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

Blog banner

Blockchain technology: security risk and prevention

Blog banner

Scheduling

Blog banner

File Organization and Access

Blog banner

Different memory allocation strategies

Blog banner

Distributed Denial of Service (DDoS) attack

Blog banner

A small world of Sockets

Blog banner