wisemonkeys logo
FeedNotificationProfileManage Forms
FeedNotificationSearchSign in
wisemonkeys logo

Blogs

Deadlock and Starvation

profile
Supriya Nagraj
Aug 14, 2024
0 Likes
0 Discussions
60 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 New Rules of UI/UX Design Every Website Must Follow in 2026

Blog banner

Incorporating Automation into Digital Forensics.

Blog banner

MAILFENCE

Blog banner

How Reading Books Shape a Child’s Imagination and Thinking?

Blog banner

File management

Blog banner

Concurrency:Deadlock and Starvation

Blog banner

Deadlock in operating system

Blog banner

EdTech (Education Technology)

Blog banner

Synchronization

Blog banner

Race Condition

Blog banner

Memory management

Blog banner

The Evolution of the Microprocessor ~ Aditya Pai

Blog banner

Data Visualization- Importance and tools (Tableau,Power BI, Matplotlib)

Blog banner

Yoga in INDIA and ABROAD

Blog banner

Direct Memory Access

Blog banner

“CONSISTENCY” in Social Media Marketing

Blog banner

Phishing

Blog banner

Multiprocessor and scheduling

Blog banner

SQL Injection practice on DVWA

Blog banner

Student Grade Calculator in LISP

Blog banner

RAID

Blog banner

How Traditional Indian Foods Can Support a Modern Lifestyle

Blog banner

Amazon

Blog banner

Buffers in Operating Systems

Blog banner

Craziness of dream 11 and how it impacts on our life

Blog banner

Vaping vs. Chewing Gum: The Hidden ‘Stress Fix’ Destroying Sydney’s Teeth

Blog banner

Number Guessing game --lisp

Blog banner

RAID - LEVELS OF RAID

Blog banner

How can denial-of-service(Dos) attacks be prevented?

Blog banner

Why Users Leave Your Website in 5 Seconds (And How UI/UX Fixes It)

Blog banner

LEMON PICKLE (NIMBU KA ACHAR)

Blog banner

Which Smartphone Company Has the Largest Market Share in India?

Blog banner

geographic information system (GIS)

Blog banner

Landslide Hazard

Blog banner

Threads and concurrency

Blog banner

How to Run your First android App

Blog banner

Key to success in Sports

Blog banner

(Input/Output) in os

Blog banner

Remote Work in 2026

Blog banner

FAMILY WHERE LIFE BEGINS....

Blog banner

Geographic Information Systems(By aditi Unnikrishnan)

Blog banner

Disk Management

Blog banner