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

Education?

Blog banner

Hacking Mobile Platforms

Blog banner

Evolution of Operating System

Blog banner

Title: Network Sniffing Techniques: Uncovering the Secrets of Data Transfer

Blog banner

Internet of Things and cyber security

Blog banner

Risk management in IT

Blog banner

BrainGate Technology

Blog banner

Policies for Service Transition

Blog banner

Method of Evaluating Information Security Level in an Organization

Blog banner

RAID and It's Levels

Blog banner

IOT Hacking Techniques

Blog banner

FAMILY WHERE LIFE BEGINS....

Blog banner

How To Invest in Indian Stock Market For Beginners. ~ Tutorial 2 (NSDL And CSDL) Continued...

Blog banner

Optimization of operating system design

Blog banner

c

Blog banner

Virtual machine

Blog banner

A Journey By Train

Blog banner

Secure Hypertext transfer protocol

Blog banner

Advanced Persistent Threats (APTs)

Blog banner

Friendship

Blog banner

Objectives and functions of Operating System...

Blog banner

File management

Blog banner

TRELLO

Blog banner

Virtual memory

Blog banner

The Sunny Side of Instagram

Blog banner

Visualization in Data Science

Blog banner

Deadlock in Operating System

Blog banner

Social Media.

Blog banner

THE DESIRE OF MANY

Blog banner

Sensory Play for Toddlers: Boosting Curiosity Through Touch, Sound, and Colour

Blog banner

Embaded operating system

Blog banner

How I use google in my daily life

Blog banner

Harsh Rathod

Blog banner

How to setup a professional looking business account on Instagram?

Blog banner

Spotify

Blog banner

How to feel Happy everyday day

Blog banner

Efficiency of SQL Injection Method in Preventing E-Mail Hacking

Blog banner

AI and Cyber Security

Blog banner

Deadlocks in Operating Systems

Blog banner

10 Signs That Prove YOU are his FIRST priority.

Blog banner

Lifestyle of a photographer

Blog banner

Mail merge

Blog banner