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

The Procedural Framework for Corporate High-Tech Investigations

Blog banner

WHAT IS TWITTER AND HOW DOES IT WORK

Blog banner

Sessions In OS.

Blog banner

Importance Of Education.

Blog banner

GIS Mapping

Blog banner

A Review on Data Acquisition in Cyber Forensics

Blog banner

Hot Mango Pickle (Methiyu)

Blog banner

STUDY OF SYSTEM HACKING TOOLS

Blog banner

Deming’s Process

Blog banner

What is a geographic information system (GIS)?

Blog banner

What is Packet Filtering?

Blog banner

Real time scheduling

Blog banner

VIDEO INTERVIEWS : A NEW ECOSYSTEM TO GET DREAM JOBS

Blog banner

What is Brute Force Attack? How to defend against it?

Blog banner

Concurrency and memory

Blog banner

Music helps reduce stress

Blog banner

Satellite Based Positioning

Blog banner

Process Creation

Blog banner

Memory management

Blog banner

Payment Card Industry - Data Security Standard PCI-DSS compliance for online banking applications

Blog banner

MAILFENCE

Blog banner

New Ransomware Encrypts Your Android And Then Changes PIN Lock

Blog banner

Solitary Play Activities for Preschoolers: Types and Benefits

Blog banner

Electronic Funds Transfer

Blog banner

Operating Systems Overview

Blog banner

Pooja Silver

Blog banner

Cryptanalysis tool

Blog banner

Know your Processors!

Blog banner

Importance Of Blockchain

Blog banner

Real Time Scheduling

Blog banner

Cache memory

Blog banner

10 Rare Historic Pictures that are Ever Captured

Blog banner

Human factor, a critical weak point in the information security of an organization’s IOT

Blog banner

(Input/Output) in os

Blog banner

Multiprocessor

Blog banner

File management

Blog banner

Navigating the Digital Battlefield: Security Breaches and Effective Countermeasures

Blog banner

Principles of Concurrency

Blog banner

ADIDAS

Blog banner

Disk Management

Blog banner

What is Influencer Marketing and its Trends

Blog banner

Deadlocks in Operating System

Blog banner