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

CSI and Organizational Change

Blog banner

My Favorite Country

Blog banner

Street foods

Blog banner

HOW CAN SOCIAL MEDIA MAKE YOU HAPPIER?

Blog banner

Beauty of indian railway

Blog banner

Cloud Technology and its Implications for Entrepreneurship

Blog banner

What is Internet

Blog banner

Article on IT development trends

Blog banner

LIMITED EDITION

Blog banner

Big Data

Blog banner

MYNTRA

Blog banner

Spyware

Blog banner

Security in Cloud Computing Environment using cryptography - Rushabh Modi

Blog banner

computer security

Blog banner

How To Invest In Indian Stock Market @ BSE & NSE ~ Tutorial 3

Blog banner

Memory Management

Blog banner

Wrike

Blog banner

10 Amazing facts about Tokyo Ghoul

Blog banner

PPT methodology

Blog banner

How to setup a professional looking business account on Instagram?

Blog banner

Mumbai

Blog banner

What is Data, Information and Knowledge?

Blog banner

Socket Programming in Java

Blog banner

The Impact of Tolerances and Wall Thickness on Pipeline Integrity

Blog banner

MEMORY MANAGEMENT FILE

Blog banner

INTERNET

Blog banner

MY FIRST BLOG?

Blog banner

Spotify

Blog banner

ahh wait a min

Blog banner

Exploring Human Factors in Cyber Forensics Investigations.

Blog banner

Drawing tips for a beginner

Blog banner

Memory management

Blog banner

Web browser forensics:Tools,Evidence collection and analysis

Blog banner

Memory management

Blog banner

Article on different management system

Blog banner

Android Flashlight Application

Blog banner

ADD A SPICE TO YOUR LIFE.

Blog banner

Virtual Memory

Blog banner

Kafka - A Framework

Blog banner

RACI model in IT services

Blog banner

Blockchain Transactions

Blog banner

Distributed Denial of Service (DDoS) attack

Blog banner