wisemonkeys logo
FeedNotificationProfileManage Forms
FeedNotificationSearchSign in
wisemonkeys logo

Blogs

Deadlock and Starvation

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

PODIO

Blog banner

RACI model in IT services

Blog banner

OPERATING SYSTEM

Blog banner

MD5 Collisions and the impact on computer forensics

Blog banner

How to Prepare Your Child for Their First Day of School?

Blog banner

Confidence Building Activities for the New School Year

Blog banner

Routers

Blog banner

PERT Overview

Blog banner

?Why Social and Emotional Skills Matter More Than ABCs in Early Years?

Blog banner

Paralysis/Paralysis Stroke

Blog banner

Install Ubuntu in Vmware

Blog banner

A BLOG ON MYSQL

Blog banner

How Men and Women Process Pain Differently

Blog banner

Introduction my self

Blog banner

Constrains in service design

Blog banner

Memory management

Blog banner

Diwali

Blog banner

Deadlock in Operating System

Blog banner

OPERATING SYSTEM

Blog banner

What is Spyware? and examples of them.

Blog banner

Embracing the power of Modern Machine UNIX

Blog banner

Uniprocessor Scheduling

Blog banner

Hello World

Blog banner

Python as a tool for data analysis

Blog banner

Deadlock and Starvation

Blog banner

Evolution of Operating system

Blog banner

Basic Security For SOAP Services

Blog banner

Types Of Interrupt

Blog banner

Why Khari and toast is the ideal Tea Break snack?

Blog banner

JIRA SOFTWARE

Blog banner

Importance of education

Blog banner

Raising mental health burden: A global and Indian perspective

Blog banner

Service transistion under difficult conditions

Blog banner

Operating Systems Overview

Blog banner

Tracking Emails & Email Crimes

Blog banner

Virtual memory

Blog banner

From Canoeing to Camping: The Perfect Nature Escape Near Arcadia

Blog banner

FRIENDSHIP

Blog banner

The khan mehtab transforming the modular switches company

Blog banner

The Rise of Polo Tourism in the USA: How Travellers Are Blending Luxury Stays with Elite Sports

Blog banner

GIS in Mapping and landslide alert in Bangladesh

Blog banner

15 Websites that will make your life easier ...!!!

Blog banner