wisemonkeys logo
FeedNotificationProfileManage Forms
FeedNotificationSearchSign in
wisemonkeys logo

Blogs

Deadlock and Starvation

profile
Niraj Parulekar
Aug 13, 2024
0 Likes
0 Discussions
96 Reads

1] Deadlock :
                       Deadlock is a situation where a set of processes becomes stuck, each waiting for a resource that the other  processes in the set are holding. This results in a cycle of dependencies where no process can proceed, leading to a complete halt in the system. Deadlock typically occurs under four conditions, known as        Coffman’s conditions:

1. Mutual Exclusion: At least one resource must be held in a non-shareable mode, meaning that only one                                               process can use the resource at a time.

2. Hold and Wait: A process holding at least one resource is waiting to acquire additional resources that are                                         currently being held by other processes.

3. No Preemption: A resource can be released only voluntarily by the process holding it after that process has                                      completed its task.

4. Circular Wait: There must be a circular chain of processes, where each process holds at least one resource                                 that the next process in the chain needs.

--Deadlock prevention, avoidance, detection, and recovery are the primary strategies used to handle deadlocks.

  Prevention involves breaking one of Coffman’s conditions, whereas avoidance uses algorithms like the Banker’s    Algorithm to ensure that the system remains in a safe state. Detection algorithms can identify deadlock when it      occurs, and recovery techniques involve terminating or rolling back processes to break the deadlock.

2] Starvation :
                    Starvation, on the other hand, occurs when a process is perpetually denied the resources it needs to proceed. Unlike deadlock, where processes are waiting on each other in a cycle, starvation involves one or more processes being overlooked in favor of others. This often happens in scheduling algorithms that prioritize certain processes, causing lower-priority processes to wait indefinitely.

For example, in a priority-based scheduling system, a low-priority process might never get CPU time if higher-priority processes continuously arrive. Starvation is particularly problematic in systems where fairness and equitable resource allocation are critical.

To mitigate starvation, algorithms such as aging are used, where the priority of a process increases the longer it waits, eventually ensuring that it will receive the necessary resources.


Comments ()


Sign in

Read Next

Study of Sniffing Tools

Blog banner

MULTITHREADING:ENHANCEING PERFORMANCE AND EFFICIENCY IN COMPUTING

Blog banner

Efficiency of SQL Injection Method in Preventing E-Mail Hacking

Blog banner

Security Issues and Countermeasures

Blog banner

JUSTICE FOR EVERY “BEZUBAAN ANIMAL”

Blog banner

Simple STEM Activities for Toddlers That Spark Curiosity

Blog banner

GIS info about Bermuda Triangle

Blog banner

Characteristics of Etherum

Blog banner

Business-to-Business

Blog banner

Natural Language Processing(NLP)

Blog banner

ACHIEVEMENTS IN OPERATING SYSTEMS

Blog banner

Jamming Attacks in Network Security: Disrupting Communication Signals

Blog banner

Service transition principles

Blog banner

ITIL Version 3 and 4 differenciation?

Blog banner

This Windows 11 encryption bug may cause data damage

Blog banner

Data Lake

Blog banner

Types of Threads

Blog banner

Why Should You Schedule Tweets on Twitter?

Blog banner

HACKING MOBILE PLATFORM

Blog banner

Review on Cyber Forensics and its Analysis Tools

Blog banner

How Does Preschool Help Children Become Better Decision Makers?

Blog banner

Concurrency and memory

Blog banner

Personalized Movie Recommendations with Data Science

Blog banner

Major achievement

Blog banner

What is Internet

Blog banner

Not anti-social, but pro-solitude

Blog banner

Tomato Butter Sauce with Bucatini

Blog banner

LEMON PICKLE SWEET AND MILD HOT

Blog banner

Kafka - A Framework

Blog banner

note taker app

Blog banner

Software

Blog banner

How To Setup DVWA Using XAMPP on Windows

Blog banner

Consumer to consumer business mode

Blog banner

How to Grow Your Brand on YouTube Without a Big Budget

Blog banner

DEVELOPMENTS LEADING TO MODERN OPERATING SYSTEMS

Blog banner

Deadlock

Blog banner

Travel: Everything Everywhere!

Blog banner

Disk scheduling

Blog banner

Some facts about Technology

Blog banner

What is a geographic information system (GIS)?

Blog banner

Firewall / IDS Evasion Techniques

Blog banner

Linker

Blog banner