wisemonkeys logo
FeedNotificationProfileManage Forms
FeedNotificationSearchSign in
wisemonkeys logo

Blogs

Deadlock and Starvation

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

Deadlock and Starvation

Blog banner

Review on Cyber Forensics and its Analysis Tools

Blog banner

ADIDAS

Blog banner

Global versus Indian Mental Health Differences

Blog banner

File management in os

Blog banner

social media issue

Blog banner

What is Password Cracking ? and it's Techniques.

Blog banner

A Tourist’s Guide To Florida’s Rodeo Culture: What To Expect At The Arcadia Championship Rodeo

Blog banner

Solving Problems with AI: The Power of Search Algorithms

Blog banner

Exploring Florida Beyond the Obvious Tourist Trails

Blog banner

Steganography and Steganalysis

Blog banner

15 Interesting Facts about India

Blog banner

Deadlocks in Operating System

Blog banner

Virtual Memory

Blog banner

John Titor: The Time Traveler

Blog banner

The Memory Hierarchy

Blog banner

Understanding Portion Control: How Much Food Do You Really Need?

Blog banner

Jira service Management

Blog banner

Odoo

Blog banner

Exploring the Power of Encase Forensic Tools: Unraveling Digital Mysteries

Blog banner

Guidelines for a Low sodium Diet.

Blog banner

THREADS (assignment 1)

Blog banner

Culture Of Ladakh

Blog banner

Instagram

Blog banner

File Management In OS

Blog banner

Full Disk Encryption

Blog banner

Trello ( management software)

Blog banner

Big O Notation

Blog banner

Improving defences Proxy Device(defense in depth)

Blog banner

DBMS and various career options related to it.

Blog banner

Business-to-Business

Blog banner

Bots and Cyber Security

Blog banner

The evolution of OS

Blog banner

Therapy Myths That Need to End in 2025

Blog banner

Rapido

Blog banner

How return on investment is defined in IT services

Blog banner

KAHAWA TEA

Blog banner

Evolution of Operating system

Blog banner

Benefits of yoga and meditation

Blog banner

Memory heirachy (Operating system)

Blog banner

Heart Fulness Meditation

Blog banner

How Social Media Algorithms Will Work in 2026?

Blog banner