wisemonkeys logo
FeedNotificationProfileManage Forms
FeedNotificationSearchSign in
wisemonkeys logo

Blogs

Deadlock and Starvation

profile
Supriya Nagraj
Aug 14, 2024
0 Likes
0 Discussions
64 Reads

-Deadlock


Deadlock is a situation in computing where two or more processes are unable to proceed because each one is waiting for a resource that the other has locked. 


In technical terms, deadlock occurs when the following four conditions are met simultaneously:


1. Mutual Exclusion: At least one resource must be held in a non-shareable mode. Only one process can use the resource at a time.

2. Hold and Wait : A process is holding at least one resource and is waiting to acquire additional resources that are currently being held by other processes.

3. No Preemption : A resource cannot be forcibly taken away from a process. The process must release the resource voluntarily.

4. Circular Wait: There exists a set of processes where each process is waiting for a resource that is held by the next process in the chain, forming a circular chain of dependencies.


In a deadlock, none of the processes can proceed, and they remain stuck indefinitely unless an external action is taken to break the deadlock, such as terminating a process or forcibly taking resources.


-Starvation


Starvation is a condition where a process is perpetually denied the resources it needs to proceed because other processes are continuously being prioritized over it.


Starvation can occur in situations where:


  1. Resource Allocation Policies: If the system's resource allocation policy unfairly favors some processes over others, a low-priority process may be consistently delayed or ignored.

2. Priority Scheduling: In systems that use priority scheduling, a high-priority process may keep interrupting a lower-priority one, causing the latter to wait indefinitely.

3. Resource Contention: If a resource is constantly being used by other processes, the starved process might never get access to it.


Starvation is different from deadlock because, in a deadlock, the processes involved are permanently stuck, whereas in starvation, a process may eventually get the resources it needs if the circumstances change. However, in extreme cases, starvation can lead to a situation where a process never gets the resources it needs, effectively being "starved" indefinitely.


Comments ()


Sign in

Read Next

Culture Of Ladakh

Blog banner

What is a geographic information system (GIS)?

Blog banner

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

Blog banner

Memory Management

Blog banner

Art and Culture of Rajasthan

Blog banner

Gis in agriculture and farming

Blog banner

ARTICLE ON WRIKE CORPORATION

Blog banner

I/O Management and Disk Scheduling

Blog banner

Security issues

Blog banner

PROCESS STATES OF OPERATING SYSTEM

Blog banner

I/O Buffering

Blog banner

OPERATING SYSTEM

Blog banner

Mumbai Metro 3

Blog banner

File management

Blog banner

Article on different management system

Blog banner

E-Cash (Electronic Cash)

Blog banner

Supervised and Unsupervised Learning

Blog banner

How Cyber Forensics use in AI

Blog banner

Navigation With Indian Constellation(NavIC) by ISRO in Geographic Information Systems

Blog banner

Landslide Hazard

Blog banner

Swiggi

Blog banner

Importance of modern technology era

Blog banner

Save Environment

Blog banner

Making Money through Instagram

Blog banner

Network Forensics Tools and Techniques

Blog banner

Soak knowledge and level up your intellectual potential!!!

Blog banner

Zero Trust Security Model: Revolutionizing Cybersecurity in the Digital Age

Blog banner

Zomato's Secret Digital Marketing Techniques!

Blog banner

Memory Management in Operating System

Blog banner

Memory Management Techniques

Blog banner

Booting Process In Operating System

Blog banner

Different Types of Data

Blog banner

Memory management

Blog banner

Time Series Analysis

Blog banner

File System

Blog banner

SMARTSHEET MANAGEMENT SYSTEM

Blog banner

memory managment

Blog banner

Different types of e-commerce platforms or advantages and disadvantages

Blog banner

WHAT IS SNAPCHAT AND HOW DOES IT WORK?

Blog banner

Dr. Venkadavarahan

Blog banner

Why Inconel 625 and Monel 400 Remain Unbeatable in Refinery Applications?

Blog banner

Dekkers Algorithm

Blog banner