wisemonkeys logo
FeedNotificationProfileManage Forms
FeedNotificationSearchSign in
wisemonkeys logo

Blogs

Deadlock and Starvation

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

CyberSecurity Color Wheel

Blog banner

Digital Life And Mental Health: A Psychological Perspective in the Modern World

Blog banner

Service Operations Principles

Blog banner

USPS mail

Blog banner

Threat management

Blog banner

GIS Applications: How Different Industries are Leveraging Geospatial Data

Blog banner

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

Blog banner

Hey Aryan here

Blog banner

EID UL FITR

Blog banner

How can denial-of-service(Dos) attacks be prevented?

Blog banner

Understanding Gen Z: A Generation Facing Crisis and Potential

Blog banner

Emotional Intelligence in Children: Why It Is as Important as Academics

Blog banner

ART AND CULTURE OF VRINDAVAN

Blog banner

Street foods

Blog banner

Modern operating system

Blog banner

Scheduling

Blog banner

Know your Processors!

Blog banner

Explain the concept of ( MIS) Management information systems

Blog banner

5 Common Faults In Construction Tenders

Blog banner

From Classic to Flavoured: Exploring Different Types of Khari

Blog banner

E-Governance

Blog banner

Social media

Blog banner

Sweet Mango Murabba

Blog banner

Digital Balance: Keeping Children Mindful in the Screen Age

Blog banner

What is Data, Information and Knowledge?

Blog banner

Game via listing method

Blog banner

How HRMS, Task Management, and Team Chats Can Improve Workplace Productivity

Blog banner

Deadlock in Operating System

Blog banner

Art and Culture of Rajasthan

Blog banner

The Rise of Evil Twin Attacks: A New Kind Of Spoofing Cyberattack

Blog banner

How Cyber Forensics use in AI

Blog banner

Beautiful and stunning natural phenomena worth to see

Blog banner

Security Issues and Countermeasures

Blog banner

Ethical Hacking

Blog banner

GUIDE TO GIS

Blog banner

File management

Blog banner

File management

Blog banner

BEAUTY IS IN THE EYE OF THE BEHOLDER

Blog banner

Throttle engine ’Sneak peek into the future’

Blog banner

THE INPACT OF SOCIAL MEDIA!

Blog banner

Fault Tolerance

Blog banner

TEAMWORK

Blog banner