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

Dekkers Algorithm : Ensuring Safe Process Synchronization

Blog banner

Real-time Scheduling - 53003230061

Blog banner

Super Garlicky Tomato Soup with Smashed White Beans

Blog banner

How I use google in my daily life

Blog banner

Virtual memory

Blog banner

COMPUTER FORENSICS AND GRAPHICS

Blog banner

DURGA POOJA

Blog banner

AI & Data Science in Healthcare – Predicting diseases, medical imaging analysis

Blog banner

Smart Eating Habits for Office Professionals to Stay Healthy

Blog banner

Real-Time Operating Systems (RTOS) Deep Explanation

Blog banner

File Organization and Access

Blog banner

Social Engineering

Blog banner

Regression Analysis

Blog banner

Types of Threads

Blog banner

Guidelines for a Low sodium Diet.

Blog banner

DEVELOPMENTS LEADING TO MODERN OPERATING SYSTEMS

Blog banner

MULTITHREADING:ENHANCEING PERFORMANCE AND EFFICIENCY IN COMPUTING

Blog banner

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

Blog banner

Mumbaicha Dabbawalla

Blog banner

Worms, viruses and Bots

Blog banner

Fault Tolerance

Blog banner

Exploring Human Factors in Cyber Forensics Investigations.

Blog banner

Corporate Discipline.

Blog banner

Importance Of Time

Blog banner

Indian Culture and Tradition

Blog banner

The Procedural Framework for Corporate High-Tech Investigations

Blog banner

Operating system

Blog banner

BUFFER OVERFLOW_142

Blog banner

Data Security must be your Priority!

Blog banner

I/O Management and Disk Scheduling

Blog banner

Binary Search Tree (BST) in Data Structure

Blog banner

Developments in Modern Operating Systems

Blog banner

Functions of operating system

Blog banner

Raising mental health burden: A global and Indian perspective

Blog banner

THREADS (assignment 1)

Blog banner

Deadlock

Blog banner

File management

Blog banner

K-means use cases

Blog banner

The Everyday Parenting Dilemma: Safety Vs Independence

Blog banner

Why we fail after giving 100% ?

Blog banner

Security in Cloud Computing

Blog banner

Bharat Maps

Blog banner