wisemonkeys logo
FeedNotificationProfileManage Forms
FeedNotificationSearchSign in
wisemonkeys logo

Blogs

Deadlock and Starvation

profile
Khush Bagaria
Aug 15, 2024
0 Likes
0 Discussions
121 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

It's all about our Brain.- The Brain Metaphor

Blog banner

Lifestyle of a photographer

Blog banner

The Sunny Side of Instagram

Blog banner

Major achievement

Blog banner

How Laughing Gas Makes Your Dental Visit So Much Easier

Blog banner

Virtual memory

Blog banner

Depression

Blog banner

Cross site scripting Attack

Blog banner

Explain the concept of ( MIS) Management information systems

Blog banner

My Favorite Country

Blog banner

Types of OS

Blog banner

Deadlock

Blog banner

Women’s Mental Health (After Marriage)

Blog banner

Process, process creation and process termination

Blog banner

Types of Big Data

Blog banner

Benefits of Yoga

Blog banner

Full Disk Encryption on Digital Forensics

Blog banner

(Input/Output) in os

Blog banner

LINUX

Blog banner

Deadlock

Blog banner

Blog on health and fitness

Blog banner

Hacking of web server and application

Blog banner

The Importance of Financial Literacy for College Students

Blog banner

Exploring Arcadia’s Cowboy Culture, Peace River & Hidden Attractions

Blog banner

SmartData Collective: Data Science aur Analytics ki Duniya

Blog banner

OS Assignment 1

Blog banner

Dr. Venkadavarahan

Blog banner

Global versus Indian Mental Health Differences

Blog banner

Smartphone Security: Vulnerabilities and Attacks

Blog banner

Some web vulnerabilities

Blog banner

Women empowerment

Blog banner

Human factor, a critical weak point in the information security of an organization’s IOT

Blog banner

Security Issues

Blog banner

SEIZING DIGITL EVIDENCE AT THE SCENE

Blog banner

The 60-Minute Window: What to Do (And What NOT to Do) When You Knock Out a Tooth

Blog banner

Impact of social media on the human life

Blog banner

CYBER FORENCIS: PAST, PRESENT AND FUTURE.

Blog banner

Operating Systems

Blog banner

Corporate Discipline.

Blog banner

Objectives and functions of Operating System...

Blog banner

Why Data Security Is Important

Blog banner

RAID

Blog banner