wisemonkeys logo
FeedNotificationProfileManage Forms
FeedNotificationSearchSign in
wisemonkeys logo

Blogs

Deadlock and Starvation

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

Constrains in service design

Blog banner

“CONSISTENCY” in Social Media Marketing

Blog banner

Importance of Education

Blog banner

Service Strategy principles

Blog banner

Kernel in Operating System

Blog banner

Mendeley (management software)

Blog banner

Concept and definition of m-commerce

Blog banner

USES OF WHATSAPP

Blog banner

Pink sauce pasta

Blog banner

Buffer Overflow

Blog banner

Making Money through Instagram

Blog banner

Health and fitness

Blog banner

The New Classic: Indo Western Patola Outfits for Today’s Woman

Blog banner

Memory Management of Operating System(OS)

Blog banner

MODERN OPERATING SYSTEMS

Blog banner

Memory heirachy (Operating system)

Blog banner

Operating System

Blog banner

What is Anxiety? How to manage Anxiety?

Blog banner

All you need to know about Cassandra

Blog banner

MEMORY MANAGEMENT (techniques)

Blog banner

Importance of education

Blog banner

Service transistion under difficult conditions

Blog banner

Modern Operating System - Khush bagaria

Blog banner

Life

Blog banner

What is thread and multithreading ?

Blog banner

My favourite food

Blog banner

Virtual Machine

Blog banner

Constrained Management in IT

Blog banner

LINUX VSERVER VIRTUAL MACHINE ARCHITECTURE

Blog banner

Types of Hackers

Blog banner

TOP 5 GAMING GADGETS (2024)

Blog banner

Virus

Blog banner

Some facts about Technology

Blog banner

Multiprocessor and scheduling

Blog banner

Types of email

Blog banner

Senseless Teeths

Blog banner

Deadlock in operating system

Blog banner

Why Kanye West (Now Ye) is the GOAT: A Legacy Beyond Music

Blog banner

Embaded operating system

Blog banner

KEAP MANAGEMENT SYSTEM

Blog banner

Full Disk Encryption

Blog banner

Distributed Denial of Service (DDoS) attack

Blog banner