wisemonkeys logo
FeedNotificationProfileManage Forms
FeedNotificationSearchSign in
wisemonkeys logo

Blogs

Deadlock and Starvation

profile
Shubham Yadav
Aug 15, 2024
0 Likes
0 Discussions
50 Reads

1. Deadlock


Deadlock in an operating system occurs when a set of processes become stuck because each process is waiting for a resource that another process holds, and none of the processes can proceed. This situation usually arises in multi-process systems where processes share resources such as files, memory, or devices. The four necessary conditions for deadlock, often referred to as Coffman’s conditions, are mutual exclusion, hold and wait, no preemption, and circular wait. If all these conditions hold simultaneously, the system can enter a deadlock state. Deadlocks can be addressed through prevention, avoidance, or detection and recovery methods. Prevention involves designing the system to negate one or more of the Coffman conditions, while avoidance uses algorithms like Banker’s Algorithm to ensure the system never enters an unsafe state. Detection and recovery involve allowing the deadlock to occur but having mechanisms to identify and resolve it by terminating processes or rolling them back.


2.Starvation


Starvation occurs in an operating system when a process waits indefinitely to gain access to a resource it needs, even though the resource is available at times. This typically happens in scheduling algorithms that favor certain processes over others, like when a low-priority process is continually preempted by higher-priority processes. Starvation is a significant problem because it can lead to reduced system performance and inefficiency. Solutions to starvation include using aging, a technique where the priority of a waiting process is gradually increased, ensuring that every process eventually gets a chance to execute. By incorporating aging into scheduling algorithms, the operating system can prevent starvation by ensuring that processes waiting for resources for a long time are eventually given access, thus maintaining system fairness.


Comments ()


Sign in

Read Next

GEOLOGY AND GEO-TECTONIC FRAME WORK OF WESTERN BASTAR CRATON

Blog banner

How Cyber Forensics help prevent Crimes

Blog banner

Modern Operating Systems.

Blog banner

Top Career Paths After a B.Com Degree in Mumbai: What’s Next for You?

Blog banner

Direct Memory Access

Blog banner

E-mail security

Blog banner

Paging

Blog banner

ODOO

Blog banner

Service Strategy principles

Blog banner

Direct memory access

Blog banner

Python as a tool for data analysis

Blog banner

Bots and Cyber Security

Blog banner

Study of Backdoor and Trojan tools

Blog banner

Modern operating system

Blog banner

Android Flashlight Application

Blog banner

The Psychology of Diversity, Equity & Inclusion: How Inclusive Workplaces Boost Productivity

Blog banner

Dangers of Using Public WiFis

Blog banner

Smart Shoephone: Is that technology overdose!?

Blog banner

"Audit" In Data Science

Blog banner

Video games

Blog banner

Virtual machine.

Blog banner

Threads

Blog banner

How social media affect

Blog banner

Title: Modern Operating Systems: Powering the Digital Era

Blog banner

Go Daddy

Blog banner

Embedded Operating System

Blog banner

PPC Advertising and its Impressive Benefits

Blog banner

'Positivity in life'

Blog banner

Benefits of yoga and meditation

Blog banner

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

Blog banner

Which Smartphone Company Has the Largest Market Share in India?

Blog banner

Types of Hackers

Blog banner

How to use open SSL for web server - browser communication

Blog banner

Interrupts

Blog banner

Cyber Forensic in the Banking sector

Blog banner

Social Engineering Deceptions and Defenses

Blog banner

Modern OS

Blog banner

Decoding Confusion Matrix

Blog banner

Why am I never satisfied with my Life?

Blog banner

Critical success factors

Blog banner

“CONSISTENCY” in Social Media Marketing

Blog banner

Why Consistency in Eating Habits Matters and How Meal Maharaj Makes It Easy

Blog banner