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

Memory Management

Blog banner

Does School Infrastructure Really Matter For Learning?

Blog banner

Cyber Forensic in the Banking sector

Blog banner

Knowledge Management in Continual Service improvement (CSI)

Blog banner

PYTHON

Blog banner

TOGETHER WE CAN CONQUER #team

Blog banner

Goa Trip With Friends

Blog banner

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

Blog banner

Multicore CPUs

Blog banner

Senseless Teeths

Blog banner

Penetration Testing

Blog banner

Session Hijacking

Blog banner

MODERN OPERATING SYSTEM

Blog banner

Chicken Dum Biryani

Blog banner

'C', 'C++' and 'Java': Head-to-Head

Blog banner

The Difference Between Plaque and Tartar Explained Simply

Blog banner

Process in OS

Blog banner

Social engineering in cyber security

Blog banner

The New Classic: Indo Western Patola Outfits for Today’s Woman

Blog banner

BLOCKCHAIN MACHANISM

Blog banner

Synchronization

Blog banner

Privacy-Enhancing Computation Techniques

Blog banner

Direct Memory Access

Blog banner

Asana

Blog banner

CONCURRENCY: MUTUAL EXCLUSION AND SYNCHRONIZATION-het karia

Blog banner

DATA SCIENCE IN BUSINESS AND MARKETING

Blog banner

Landslide Hazard

Blog banner

Real-Time Operating Systems (RTOS) Deep Explanation

Blog banner

Indian Culture and Tradition

Blog banner

Threads

Blog banner

A-B-C of Networking: Part-1 (Basics)

Blog banner

Risk mitigation and management

Blog banner

VIRTUAL MACHINES

Blog banner

Constrained Management in IT

Blog banner

Gamer life

Blog banner

Service Catalogue Management

Blog banner

Memory heirachy (Operating system)

Blog banner

Disk scheduling

Blog banner

Socket Programming in Java

Blog banner

How Cyber Forensics help prevent Crimes

Blog banner

Security issues in Sensor Networks and gathering admissible evidence in Network Forensics

Blog banner

File Sharing

Blog banner