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

Bots and Cyber Security

Blog banner

Major achievement

Blog banner

Memory Management

Blog banner

Objectives and functions of Operating System...

Blog banner

Cache Memory

Blog banner

How To Implement Search Engine Marketing (Sem) Strategy Effectively

Blog banner

Predictive Analytics: How Data Science Predicts Trends(Weather ,Stock Market,Sales Forecasting ).

Blog banner

Incident management in ITSM

Blog banner

Utilizing Data-Hiding and Retrieval Techniques in Cyber Forensics

Blog banner

Paging

Blog banner

On-Page SEO

Blog banner

Human Error: The weakest link in Cybersecurity

Blog banner

Blockchain technology: security risk and prevention

Blog banner

Types of Threads

Blog banner

The IT Service Lifecycle

Blog banner

File management

Blog banner

Modern Operating System - Khush Bagaria

Blog banner

What is Internet

Blog banner

Education?

Blog banner

You Get Everyone, But No One Gets You: The Lonely Side of High Emotional Intelligence

Blog banner

How to Grow Your Brand on YouTube Without a Big Budget

Blog banner

Real Time Scheduling

Blog banner

Love is in air.....

Blog banner

Creating Digitally Signed Document

Blog banner

Dental Problems That Start Small But Should Never Be Ignored

Blog banner

Concurrency:Deadlock and Starvation

Blog banner

MailChimp

Blog banner

Top 5 Post-Wedding Skin Care Tips

Blog banner

Hot Mango Pickle (Methiyu)

Blog banner

Topic: Sessions in Operating system

Blog banner

A-B-C of Networking: Part-2 (Components)

Blog banner

OPERATING SYSTEM OBJECTIVES AND FAULT TOLERENCE.

Blog banner

Why Festivals Are the Best Classrooms for Young Minds?

Blog banner

Computer Forensics and its Impact in Business Environment

Blog banner

Volatile Memory & Non-Volatile Memory Explained

Blog banner

Modern operating system

Blog banner

Record Blocking

Blog banner

Security issues in Sensor Networks and gathering admissible evidence in Network Forensics

Blog banner

Health and fitness

Blog banner

Why Extreme Opinions Are Rising: Psychological Insights into Society’s Divides

Blog banner

**THE MUJAWARR: Transforming the Logistics Industry**

Blog banner

How to Run your First android App

Blog banner