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

What is metaverse?

Blog banner

This too shall pass

Blog banner

Evolution of Operating system

Blog banner

Deadlock and Starvation in an Operating System

Blog banner

LIFEHACKER

Blog banner

OS Assignment 3

Blog banner

Data Science in Everyday Life (like a phone, shopping cart, or social media icons)

Blog banner

Theads

Blog banner

PROCESS STATES OF OPERATING SYSTEM

Blog banner

Virtual Machine

Blog banner

10 Unknown facts about India's Independence

Blog banner

FREE VERSION OF G-MAIL

Blog banner

Vulnerabilities in OnePlus Devices

Blog banner

How To Invest in Indian Stock Market For Beginners. ~ Tutorial 2 (NSDL And CSDL) Continued...

Blog banner

HTML vs HTML5

Blog banner

Virtual memory in windows

Blog banner

RAID and It's Levels

Blog banner

SEIZING DIGITL EVIDENCE AT THE SCENE

Blog banner

Data carving - using hex editor

Blog banner

SWEET SHREDDED MANGO CHUNDA (MANGO CHUNDA)

Blog banner

SQL Injection Techniques

Blog banner

What is Email? Uses of Emails

Blog banner

Linux Virtual Machine Process Scheduling

Blog banner

RAID

Blog banner

Web browser forensics:Tools,Evidence collection and analysis

Blog banner

Simple AI Symptom Diagnosis Using LISP – Rule-Based Expert System

Blog banner

You'll get to know about Pankaj Negi

Blog banner

Boxing

Blog banner

Subnet Masking

Blog banner

Worms, viruses and Bots

Blog banner

File management -disha parekh

Blog banner

Virtual Machine

Blog banner

IoT Evolution

Blog banner

Why Soft Skills Matter as Much as Grades?

Blog banner

CYBER SECURITY CHALLENGES

Blog banner

Getting started with Android Studio

Blog banner

Tea, Coffee, Red Wine, and Teeth: A Stain Survival Guide

Blog banner

The Art of Slow Fashion: Why Patola Defines Sustainable Luxury

Blog banner

Network Footprinting in Cybersecurity

Blog banner

Business-to-Business

Blog banner

Evolution of the Microprocessor ~ Aditya Pai

Blog banner

VIRTUAL MEMORY

Blog banner