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

The Art of Slow Fashion: Why Patola Defines Sustainable Luxury

Blog banner

How Cyber Forensics use in AI

Blog banner

Flipkart

Blog banner

SmartData Collective: Data Science aur Analytics ki Duniya

Blog banner

“Shot on iPhone” : A campaign by Apple that turned into a prodigy

Blog banner

Evolution of OS

Blog banner

Virtual memory

Blog banner

Metasploit

Blog banner

Emotional Suppression: The Hidden Costs Of Unfelt Feelings

Blog banner

Objectives and Functions of Operating System

Blog banner

The Difference Between Plaque and Tartar Explained Simply

Blog banner

Getting into anime My anime suggestions

Blog banner

Concept and definition of m-commerce

Blog banner

Pink sauce pasta

Blog banner

Deadlocks

Blog banner

How Sleep Impacts Learning and Behaviour for Toddlers?

Blog banner

What are Tenders its various types

Blog banner

INTERNET SECURITY

Blog banner

What are NFT s?

Blog banner

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

Blog banner

Twisted world

Blog banner

Service Design Model

Blog banner

Linux Virtual Machine Process Scheduling

Blog banner

Fitness regime by Deepesh

Blog banner

Importance of Website

Blog banner

Risk management in IT

Blog banner

Operating system and overviews

Blog banner

Latest Email Marketing Techniques

Blog banner

Game via listing method

Blog banner

Memory Management

Blog banner

ASANA- A Management System.

Blog banner

Ghee vs. Coconut Oil vs. Mustard Oil: Which Cooking Fat Wins for Indian Food?

Blog banner

FREE VERSION OF G-MAIL

Blog banner

Computer Security

Blog banner

Why Does Hierarchy Still matter in Organizations?

Blog banner

Deadlock in operating system

Blog banner

Simple STEM Activities for Toddlers That Spark Curiosity

Blog banner

Why Friendship at Work is Important

Blog banner

Cloud Computing

Blog banner

Security in Cloud Computing

Blog banner

GIS in Mapping and landslide alert in Bangladesh

Blog banner

Network Forensics

Blog banner