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

Perfect Moments to Wear a Rich Patola Design Outfit

Blog banner

 " Healing of Yoga "

Blog banner

Memory Management

Blog banner

Smart Eating Habits for Office Professionals to Stay Healthy

Blog banner

Why Time Management Is the Secret to College Success (and How to Master It)

Blog banner

Oracle Corporation

Blog banner

Zomato (Income Sources)

Blog banner

SECURITY TOOLS

Blog banner

UniProcessor Scheduling

Blog banner

This is my first blog.

Blog banner

IT security management

Blog banner

Quality check in IT services

Blog banner

INTERNET SECURITY

Blog banner

ADIDAS

Blog banner

Classification Vs Clustring? What's the diffrence?

Blog banner

Fudgy Tahini Date Chocolate Bars

Blog banner

SMARTSHEET

Blog banner

A Statistical Analysis of Player Performance and their Value in cricket

Blog banner

Memory Management

Blog banner

Hosting basics

Blog banner

File management -disha parekh

Blog banner

Veg/Non-veg/Egg Tiffin Meals That Are Nutritious and Filling

Blog banner

Skills An Ethical Hacker Must Have

Blog banner

GEOLOGY AND GEO-TECTONIC FRAME WORK OF WESTERN BASTAR CRATON

Blog banner

Why we should do reading

Blog banner

A small world of Sockets

Blog banner

GIS Mapping

Blog banner

OS Evolution Achievements

Blog banner

Article on Team Work

Blog banner

Modern Teaching Methods: Why Inquiry-based & Experiential Learning Works Best

Blog banner

Data Science & AI

Blog banner

SECURITY RISKS OF REMOTE WORKING

Blog banner

OPERATING SYSTEM OBJECTIVES AND FAULT TOLERENCE.

Blog banner

Know your Processors!

Blog banner

Linux VServer Architecture

Blog banner

E-BUSINESS RISK MANAGEMENT

Blog banner

5 People who claimed to have Time Traveled

Blog banner

Cache memory

Blog banner

Music

Blog banner

Constrained Management in IT

Blog banner

Fitness regime by Deepesh

Blog banner

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

Blog banner