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

Multiprocessor and Multicore Organization

Blog banner

Uniprocessor and Types

Blog banner

Importance of education

Blog banner

Instagram

Blog banner

Types of Hackers

Blog banner

Service Design Model

Blog banner

Exploring Virtual Machines and Computer Forensic Validation Tools

Blog banner

Music is life

Blog banner

10 Interesting facts you should know!!!

Blog banner

6 Digital Marketing Trends You Must Watch Out For In 2022

Blog banner

Smitten Kitchen Keepers

Blog banner

SWEET SHREDDED MANGO CHUNDA (MANGO CHUNDA)

Blog banner

Affiliate Marketing V/S Influencer Marketing

Blog banner

TEAMWORK

Blog banner

Education?

Blog banner

MODERN OPERATING SYSTEM

Blog banner

Importance of Website

Blog banner

Multiple-Processor Scheduling in Operating System

Blog banner

Know your Processors!

Blog banner

Process in OS

Blog banner

Rock, Paper, Scissors Game in Common Lisp

Blog banner

semaphores

Blog banner

MEMORY MANAGEMENT

Blog banner

Introduction my self

Blog banner

Who decides your overthinking, anyway?

Blog banner

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

Blog banner

In the world of Technology...

Blog banner

Dos (Denial of service) Attack

Blog banner

 " Healing of Yoga "

Blog banner

How GIS in Agriculture Eliminates Guesswork

Blog banner

DISK SCHEDULING

Blog banner

Different types of scam frauds

Blog banner

Modern Operating System - Khush bagaria

Blog banner

AutoML: The Future of Automated Data Science

Blog banner

Difference Between Classification And Clustering

Blog banner

Nature’s Brush on Silk: The Secret Behind Patola Colours

Blog banner

Evolution of the Microprocesor

Blog banner

Virtual Memory

Blog banner

Odoo

Blog banner

child Labour

Blog banner

Way to make your meal healthier.

Blog banner

Mail merge

Blog banner