wisemonkeys logo
FeedNotificationProfileManage Forms
FeedNotificationSearchSign in
wisemonkeys logo

Blogs

Deadlock and Starvation

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

Why Soft Skills Matter as Much as Grades?

Blog banner

File Management system

Blog banner

Love is in air.....

Blog banner

Animal’s have my heart

Blog banner

LISP - Library Management System

Blog banner

computer security

Blog banner

The khan mehtab transforming the modular switches company

Blog banner

What is Network Security?

Blog banner

Different Types of Data

Blog banner

Zero-Day Attack

Blog banner

EVOLUTION OF THE MIRCOPROCESSOR

Blog banner

Bharat Maps

Blog banner

**THE MUJAWARR: Transforming the Logistics Industry**

Blog banner

10 Unsolved Mysteries all over the world

Blog banner

Virtual memory

Blog banner

The Dark Web: A Breeding Ground for Cybercriminals – How to Guard Against Threats

Blog banner

Layers Of Blockchain

Blog banner

File sharing

Blog banner

Introduction to GIS

Blog banner

Palm Vein Biometric Technology; Contactless vein authentication

Blog banner

Deadlock and Starvation

Blog banner

Cloud Computing: Threats and Vulnerabilities

Blog banner

Rain bow

Blog banner

AN EVENT-BASED DIGITAL FORENSIC INVESTIGATION

Blog banner

E-learning in today's world

Blog banner

New Ransomware Encrypts Your Android And Then Changes PIN Lock

Blog banner

Sweet Mango Murabba

Blog banner

virtual machines and virtualization

Blog banner

Android Application Components and Activity Lifecycle

Blog banner

Studying Denial of service attack using DOSHTTP tool

Blog banner

Memory heirachy (Operating system)

Blog banner

Disk Management

Blog banner

"The Benefits of Using GIS in Agriculture"

Blog banner

Data Lake

Blog banner

Senseless Teeths

Blog banner

IT Service as as Value Creation

Blog banner

Development Of Modern Operating System

Blog banner

Tools to support CSI activities

Blog banner

Business-to-Business

Blog banner

Article on Team Work

Blog banner

TOP 5 GAMING GADGETS (2024)

Blog banner

Man VS Nature

Blog banner