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

Virtualization

Blog banner

How Much Protein Do You Really Need Every Day?

Blog banner

CONCURRENCY

Blog banner

Memory management

Blog banner

Data Exfiltration

Blog banner

Confidence Building Activities for the New School Year

Blog banner

Nature’s Brush on Silk: The Secret Behind Patola Colours

Blog banner

Types of threads

Blog banner

Evolution of Operating system.

Blog banner

MULTITHREADING:ENHANCEING PERFORMANCE AND EFFICIENCY IN COMPUTING

Blog banner

Security issues

Blog banner

Current Trends in GIS and Remote Sensing(Ocean Applications)

Blog banner

LinkedIn: Watch out for these 7 upcoming updates in 2023

Blog banner

Deadlock in operating system

Blog banner

memory management

Blog banner

MD5 Collisions and the impact on computer forensics

Blog banner

Threat from Inside: Educating the Employees Against Cyber Threats

Blog banner

OPERATING SYSTEM

Blog banner

Yahoo! mail

Blog banner

Modern operating systems (OS)

Blog banner

MySQL

Blog banner

Women empowerment

Blog banner

Memory Management

Blog banner

(Input/Output) in os

Blog banner

COMMUNICATION

Blog banner

To-Do List In LISP

Blog banner

Data is an asset and it is your responsibility!

Blog banner

Evolution of Operating Sytems

Blog banner

Autonomy Vehicles: Future Ki Gadiya

Blog banner

Tiranga - Abbas Haveliwala

Blog banner

Components of GIS

Blog banner

The functions of operating system

Blog banner

Mumbaicha Dabbawalla

Blog banner

CYBER SECURITY CHALLENGES

Blog banner

Top 4 Places To Stay In Copenhagen

Blog banner

Modern operating system

Blog banner

File system implementation

Blog banner

AN EVENT-BASED DIGITAL FORENSIC INVESTIGATION

Blog banner

Memory Management

Blog banner

Real Time Scheduling

Blog banner

Challenges of Digital forensics in cloud computing environment

Blog banner

The Memory Hierarchy

Blog banner