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

What is Spyware?

Blog banner

Celebrate Diwali the Delicious Way with Meal Maharaj Catering

Blog banner

Craziness of dream 11 and how it impacts on our life

Blog banner

Veg Mix Pickle

Blog banner

Why Data Privacy Is Changing Online Advertising

Blog banner

An Overivew Of Cache Memory

Blog banner

Understanding Input Based Keylogger Activation Systems: Risks and Mitigation

Blog banner

Memory Hierarchy

Blog banner

Paging

Blog banner

Love is in air.....

Blog banner

Buffering

Blog banner

Getting into anime My anime suggestions

Blog banner

Image Steganalysis in Digital Forensics

Blog banner

CONCURRENCY: MUTUAL EXCLUSION AND SYNCHRONIZATION-het karia

Blog banner

Cyber Forensics in Healthcare: Protecting Patient Data and Preventing Breaches

Blog banner

Introduction to Solidity Programming for Blockchain Development

Blog banner

"Life as a Part-time Student"

Blog banner

Digital Forensics Challenges and Tools

Blog banner

Bitcoin sent using radio waves! No internet!

Blog banner

Install Ubuntu Easily

Blog banner

Deadlock

Blog banner

How to lose belly fat

Blog banner

Survey of Which Movies Types people are Prefer to Watch in India.

Blog banner

Top 3 Places To Stay In Vienna

Blog banner

Earth with no trees

Blog banner

Processes: Process Description and Control.

Blog banner

Beatbox

Blog banner

Steganography and Steganalysis

Blog banner

Question

Blog banner

File management

Blog banner

Personalized Movie Recommendations with Data Science

Blog banner

Modern Operating System

Blog banner

Lifestyle of a photographer

Blog banner

Indian Food

Blog banner

american greatines

Blog banner

12 Principles of Animation

Blog banner

IT service level agreement

Blog banner

The Right way of cooking

Blog banner

Top 10 Logos and their meanings

Blog banner

The Five Steps of Data Science

Blog banner

Social Media.

Blog banner

Operating system

Blog banner