wisemonkeys logo
FeedNotificationProfileManage Forms
FeedNotificationSearchSign in
wisemonkeys logo

Blogs

Deadlock and Starvation

profile
Supriya Nagraj
Aug 14, 2024
0 Likes
0 Discussions
66 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

Severe landslides continue to cause concern in Joshimath, Uttarakhand

Blog banner

Strengthening Active Directory Security

Blog banner

Virus

Blog banner

Emerging threats in cyber Forensics

Blog banner

Real-Time Operating Systems (RTOS) Deep Explanation

Blog banner

Outlook.com

Blog banner

Types of email

Blog banner

Artificial Intelligence and I

Blog banner

Have You Explored India Yet?

Blog banner

american greatines

Blog banner

Process State

Blog banner

LISP - Library Management System

Blog banner

Annual Day Preparation for Toddlers: What Helps and What to Avoid

Blog banner

Question

Blog banner

Multiple-Processor Scheduling in Operating System

Blog banner

Vulnerability Assessment

Blog banner

E-learning in today's world

Blog banner

How to Encrypt and Decrypt Using GNU PGP

Blog banner

Cyber Forensic in the Banking sector

Blog banner

Networking 101: How to Build Meaningful Connections in College

Blog banner

The IT Service Lifecycle

Blog banner

Uniprocessor Scheduling

Blog banner

Software

Blog banner

RAID

Blog banner

Difference Between Classification And Clustering

Blog banner

Direct Memory Access

Blog banner

“CONSISTENCY” in Social Media Marketing

Blog banner

Predictive Analysis - Ek Overview

Blog banner

Supervised and unsupervised learning

Blog banner

Unlocking Success: Mastering Google Ads Strategies

Blog banner

E-learning

Blog banner

How to invest in Indian Stock Market ? ~ Tutorial 1

Blog banner

Concurrency and Deadlocks

Blog banner

Hacking Mobile Platforms

Blog banner

Types of E-Commerce

Blog banner

Functions of operating system

Blog banner

Memory Management

Blog banner

Memory Management

Blog banner

Understanding Mobile Device Forensics

Blog banner

VIRTUAL MACHINE

Blog banner

Google classroom

Blog banner

Deadlocks in Operating Systems

Blog banner