wisemonkeys logo
FeedNotificationProfileManage Forms
FeedNotificationSearchSign in
wisemonkeys logo

Blogs

Deadlock and Starvation

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

Uniprocessor Scheduling

Blog banner

TRIGGERS IN DATABASE

Blog banner

Operating system and overviews

Blog banner

Self managing devices

Blog banner

Importance Of Education.

Blog banner

Khau Galli – Vile Parle

Blog banner

A-B-C of Networking: Part-1 (Basics)

Blog banner

Fitness

Blog banner

Memory heirachy (Operating system)

Blog banner

SECURITY VULNERABILITIES COUNTERMEASURES IN A SMART SHIP SYSTEM

Blog banner

Service Strategy In ITSM

Blog banner

The Evolution of Operating Systems

Blog banner

How College Events Build Real-world Skills You Can’t Learn From Textbooks

Blog banner

The khan mehtab transforming the modular switches company

Blog banner

Processes : Process description and control

Blog banner

Networking 101: How to Build Meaningful Connections in College

Blog banner

Save Environment

Blog banner

Photorec - media recovery tool

Blog banner

My favourite food

Blog banner

Direct Memory Access

Blog banner

OS- Assignnment 1

Blog banner

Service Strategy principles

Blog banner

Human Error: The weakest link in Cybersecurity

Blog banner

GraphX:- A graph processing tool

Blog banner

DISK SCHEDULING

Blog banner

STUDY OF SYSTEM HACKING TOOLS

Blog banner

Security Breaches in Stock market trading

Blog banner

Cache memory

Blog banner

Brain wash of social media

Blog banner

Explaining Buffer Overflow with Example

Blog banner

“Shot on iPhone” : A campaign by Apple that turned into a prodigy

Blog banner

BUSINESS MODELS OF E COMMERCE

Blog banner

What is Segmentation?

Blog banner

Pipedrive

Blog banner

Digital Marketing

Blog banner

GIS Mapping

Blog banner

Operating System

Blog banner

File Management In OS

Blog banner

Service Operation

Blog banner

Buffer overflow

Blog banner

Tiranga - Abbas Haveliwala

Blog banner

Multicore CPUs

Blog banner