wisemonkeys logo
FeedNotificationProfileManage Forms
FeedNotificationSearchSign in
wisemonkeys logo

Blogs

Deadlock and Starvation

profile
Supriya Nagraj
Aug 14, 2024
0 Likes
0 Discussions
56 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

IOT- Internet Of Things

Blog banner

SmartData Collective: Data Science aur Analytics ki Duniya

Blog banner

Health is Wealth

Blog banner

VIRUS

Blog banner

Cherish the Craft — Essential Tips to Maintain Your Patola Collection

Blog banner

LinkedIn: Watch out for these 7 upcoming updates in 2023

Blog banner

Blockchain Security Technique

Blog banner

Education: Key to your Prosperity

Blog banner

Deadlock

Blog banner

(Input/Output) in os

Blog banner

security requirements for safe e-payment

Blog banner

Memory Management

Blog banner

Steganography and Steganalysis

Blog banner

Virtual Machine

Blog banner

A Review on Data Acquisition in Cyber Forensics

Blog banner

Rapido

Blog banner

Paralysis/Paralysis Stroke

Blog banner

Components of GIS

Blog banner

ahh wait a min

Blog banner

Linux 94

Blog banner

Memory Management

Blog banner

Art and Culture of Rajasthan

Blog banner

IT Service Continuity Management

Blog banner

Importance of education

Blog banner

AI and Data Science: Revolutionizing Industries

Blog banner

Practical Implementation of Client Server model using TCP/IP.

Blog banner

**THE MUJAWARR: Transforming the Logistics Industry**

Blog banner

KPMG (Klynveld Peat Marwick Goerdeler)

Blog banner

TRAIN TRAVELING

Blog banner

The Khan mehtab transforming the modular switches

Blog banner

Teenagers of Today

Blog banner

Life of a 2020-2021 student

Blog banner

I/O Buffering

Blog banner

Deadlock and Starvation

Blog banner

File management

Blog banner

Travel Geek ‘The last $50k in Switzerland’

Blog banner

Concurrency:Deadlock and Starvation

Blog banner

ADIDAS

Blog banner

Blog name

Blog banner

VIRTUAL MACHINE

Blog banner

Kernel Memory Allocation In Linux.

Blog banner

Electronic Funds Transfer

Blog banner