wisemonkeys logo
FeedNotificationProfileManage Forms
FeedNotificationSearchSign in
wisemonkeys logo

Blogs

Deadlock and starvation in operating system

profile
Nishchay Maurya
Jul 11, 2023
0 Likes
0 Discussions
34 Reads

Deadlock

All processes keep waiting for each other to complete and none get executed. Resources are blocked by the processes.A deadlock occurs when no process can proceed and becomes blocked . In other words, a deadlock occurs when multiple processes in the CPU compete for the limited number of resources available in the CPU .Deadlocks typically occur in systems that use resource allocation policies like mutual exclusion, hold and wait, no preemption, and circular wait. Let's discuss each of these conditions:

 

1)Mutual Exclusion: At least one resource must be held in a non-shareable mode, meaning that only one process can use it at a time. If a process requests a resource that is already held by another process, it must wait until the resource is released.

 

2)Hold and Wait: A process must be holding at least one resource while waiting to acquire additional resources. If a process holds a resource and requests another that is held by a different process, a situation of deadlock can occur if the second process is also waiting for a resource held by the first process.

 

3)No Preemption: Resources cannot be forcibly taken away from a process that is currently using them. The only way a resource can be released is voluntarily by the process holding it. This condition contributes to the possibility of deadlock, as processes may hold resources indefinitely.

 

4)Circular Wait: A set of processes is involved in a circular chain, where each process is waiting for a resource held by the next process in the chain. This circular dependency leads to a situation where no process can proceed.

 

 

 

 

Starvation 

Starvation happens when a low priority program requests a system resource but cannot run because a higher priority program has been employing that resource for a long time.

 

1)High priority processes keep executing and low priority processes are blocked. Resources are continuously utilized by high priority processes.When a process is ready to start executing, it waits for the CPU to allocate the necessary resources. However, because other processes continue to block the required resources, the process must wait indefinitely.

 

2)Deadlock: In a deadlock situation, multiple processes are waiting for resources that are held by other processes, forming a circular dependency. If the deadlock resolution policy in the operating system is ineffective, processes may remain deadlocked indefinitely, resulting in resource starvation for those processes.

For example, if a process is granted a large amount of memory and holds onto it for an extended period, other processes may be unable to acquire sufficient memory and may not be able to progress.

 

3)CPU Scheduling: In a multi-programmed operating system, if a scheduling algorithm always prioritizes certain processes over others, lower-priority processes may starve for CPU time. They may experience delays or never get a chance to execute if higher-priority processes continually occupy the CPU.


Comments ()


Sign in

Read Next

PROCESS STATE:

Blog banner

What is Virtual Memory

Blog banner

Juveniles, Internet and Computer Crime

Blog banner

 " Healing of Yoga "

Blog banner

How to Encrypt and Decrypt Using GNU PGP

Blog banner

Real Time Scheduling

Blog banner

How Preschool Annual Day Shapes Confidence, Emotions, and Growth

Blog banner

Deadlock in operating system

Blog banner

Why You Should Not Use Free VPNs

Blog banner

Therapy Myths That Need to End in 2025

Blog banner

The Role of Frontline Managers in Driving Workplace Performance and Customer Satisfaction

Blog banner

How chatGPT Is Changing SEO: What Every Business Needs to Know in 2026

Blog banner

child Labour

Blog banner

Routers

Blog banner

Super Garlicky Tomato Soup with Smashed White Beans

Blog banner

Concurrency and Deadlocks

Blog banner

Dancing Classes In Mumbai

Blog banner

Spitting Pink in the Sink: Why Your Gums Randomly Bleed

Blog banner

TRELLO

Blog banner

From Model Mistakes to Metrics

Blog banner

Cloud Technology and its Implications for Entrepreneurship

Blog banner

From Procrastinator to Performer: How to Beat the Last-Minute Rush

Blog banner

TECHNOLOGY : BOON OR CURSE ?

Blog banner

Sage

Blog banner

Blockchain

Blog banner

All you need to know about “On-page SEO”

Blog banner

A buffer overflow

Blog banner

Winter-to-Spring Smile Care: How Sydney’s Late-August Winds Impact Your Teeth & Gums

Blog banner

Why am I never satisfied with my Life?

Blog banner

The House ??of Patola Designs: Traditional Weaves with a Modern Twist

Blog banner

OS Assignment 3

Blog banner

Memory Management

Blog banner

10 Reasons why Monica and Chandler are the best couple ever.!!!

Blog banner

Operating system

Blog banner

Deadlock and Starvation

Blog banner

Emotional Suppression: The Hidden Costs Of Unfelt Feelings

Blog banner

GIS

Blog banner

Domain Name System

Blog banner

The Art of Slow Fashion: Why Patola Defines Sustainable Luxury

Blog banner

From Websites To Super Apps For Digital User Experience

Blog banner

Threads

Blog banner

Bharat Maps

Blog banner