wisemonkeys logo
FeedNotificationProfileManage Forms
FeedNotificationSearchSign in
wisemonkeys logo

Blogs

Deadlock and Starvation

profile
Shubham Yadav
Aug 15, 2024
0 Likes
0 Discussions
53 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

Man In The Middle Attack

Blog banner

Evolution of OS

Blog banner

Why Skipping Afternoon Meals Affects More Than Just Your Hunger?

Blog banner

ADIDAS

Blog banner

Types of Malware in Cyber Security

Blog banner

CYBER FORENCIS: PAST, PRESENT AND FUTURE.

Blog banner

EVOLUTION OF THE MIRCOPROCESSOR

Blog banner

Mutual exclusion

Blog banner

Why Personalized Return Gifts Are the Perfect Choice for Every Kid’s Birthday Party?

Blog banner

IT security management

Blog banner

10 Alien Encounters and Abduction Stories

Blog banner

Outlook mail

Blog banner

DATA VAULT

Blog banner

Knowledge Management in Continual Service improvement (CSI)

Blog banner

Paddle Through Paradise: The Best Kayak Launch Points Near Arcadia

Blog banner

Web browser forensics:Tools,Evidence collection and analysis

Blog banner

Electronic Funds Transfer

Blog banner

What is 'Multi-core and Multi-threading' ?

Blog banner

Dekkers Algorithm : Ensuring Safe Process Synchronization

Blog banner

Why Nature-Based Learning Is Becoming Popular in Early Education?

Blog banner

Challenges of Digital forensics in cloud computing environment

Blog banner

PERSONALITY DEVELOPMENT

Blog banner

SQL Injection Techniques

Blog banner

Memory management

Blog banner

Why is online marketing is important in current scenario

Blog banner

Fashion design

Blog banner

Way to make your meal healthier.

Blog banner

Kernel Memory Allocation In Linux.

Blog banner

Risk factors in service transistion

Blog banner

Education?

Blog banner

What is E-commerce

Blog banner

From Classic to Flavoured: Exploring Different Types of Khari

Blog banner

Gaming Disorder: When Gaming Affects Mental Health

Blog banner

Message Passing in OS

Blog banner

Zero-Day Attack

Blog banner

Why Is Freshly Cooked Food Better Than Processed Food for Everyday Health?

Blog banner

Smartsheet

Blog banner

Sweet and Sour Mango Pickle (Gol Keri)

Blog banner

KPMG (Klynveld Peat Marwick Goerdeler)

Blog banner

What is Password Cracking ? and it's Techniques.

Blog banner

THE DESIRE OF MANY

Blog banner

Direct Memory Access

Blog banner