- OS - Home
- OS - Needs
- OS - Overview
- OS - History
- OS - Components
- OS - Structure
- OS - Architecture
- OS - Services
- OS - Properties
- Process Management
- Operating System Processes
- Process Control Block
- Operations on Processes
- Inter Process Communication
- Context Switching
- Multi-threading
- Scheduling Algorithms
- Process Scheduling
- Preemptive and Non-Preemptive Scheduling
- Scheduling Algorithms Overview
- FCFS Scheduling Algorithm
- SJF Scheduling Algorithm
- Round Robin Scheduling Algorithm
- HRRN Scheduling Algorithm
- Priority Scheduling Algorithm
- Multilevel Queue Scheduling
- Lottery Scheduling Algorithm
- Turn Around Time & Waiting Time
- Burst Time in SJF Scheduling
- Process Synchronization
- Process Synchronization
- Critical Section Problem
- Critical Section Synchronization
- Mutual Exclusion Synchronization
- Semaphores
- Counting Semaphores
- Mutex
- Turn Variable
- Bounded Buffer Problem
- Reader Writer Locks
- Test and Set Lock
- Peterson's Solution
- Monitors
- Sleep and Wake
- Race Condition
- OS Deadlock
- Introduction to Deadlock
- Conditions for Deadlock
- Deadlock Handling
- Deadlock Prevention
- Deadlock Avoidance (Banker's Algorithm)
- Deadlock Detection and Recovery
- Deadlock Ignorance
- Memory Management
- Memory Management
- Contiguous Memory Allocation
- Non-Contiguous Memory Allocation
- First Fit Algorithm
- Next Fit Algorithm
- Best Fit Algorithm
- Worst Fit Algorithm
- Fragmentation
- Virtual Memory
- Segmentation
- Buddy System
- Slab Allocation
- Overlays
- Paging and Page Replacement
- Paging
- Demand Paging
- Page Table
- Page Replacement Algorithms
- Optimal Page Replacement Algorithm
- Belady's Anomaly
- Thrashing
- Storage and File Management
- File Systems
- File Attributes
- Structures of Directory
- Linked Index Allocation
- Indexed Allocation
- Disk Scheduling Algorithms
- FCFS Disk Scheduling
- SSTF Disk Scheduling
- SCAN Disk Scheduling
- LOOK Disk Scheduling
- I/O Systems
- I/O Hardware
- I/O Software
- OS Types
- OS - Types
- OS - Batch Processing
- OS - Multiprocessing
- OS - Hybrid
- OS - Monolithic
- OS - Zephyr
- OS - Nix
- OS - Linux
- OS - Blackberry
- OS - Garuda
- OS - Tails
- OS - Clustered
- OS - Haiku
- OS - AIX
- OS - Solus
- OS - Tizen
- OS - Bharat
- OS - Fire
- OS - Bliss
- OS - VxWorks
- OS - Embedded
- OS - Single User
- Miscellaneous Topics
- OS - Security
- OS Questions Answers
- OS - Questions Answers
- OS Useful Resources
- OS - Quick Guide
- OS - Useful Resources
- OS - Discussion
Operating System - Deadlock Ignorance
In some situations, an operating system may simply prefer to ignore a deadlock completely as if it has no significance. This is considered as one of the four methods to handle deadlock in an operating system. In this chapter, we will discuss the concept of ignoring a deadlock in an operating system.
Deadlock Ignorance in Operating System
Deadlocks are so rare in modern operating systems that sometimes ignoring them altogether can be the best strategy. This approach can simplify system design and improve performance by avoiding the overhead associated with deadlock detection and recovery mechanisms.
The approach of ignoring deadlock is called the ostrich algorithm. This idea came from the myth that ostriches bury their heads in the sand to avoid a potential danger, an analogy for ignoring a problem in the hope that it will go away on its own.
When to Ignore a Deadlock
There are several reasons why some operating systems choose to ignore deadlocks −
- Less likely to occur − If the systems is designed properly, the chances of deadlock occurring can be very low. At any stage if deadlock occurs, it can be resolved by simply restarting the system or terminating a few processes.
- Cost of Prevention and Detection − The deadlock prevention and detection mechanisms can add significant overhead to the system. Sometimes, the cost of implementing these mechanisms may become higher than the cost of dealing with deadlock when it occurs.
- Programmer Responsibility − In some systems, the programmers are needed to design their applications in a way that minimizes the chances of deadlock occurring. System will kill the process if it causes deadlock.
- Non Critical Systems − Mostly, deadlock is ignored in non-critical systems like personal computers. Critical systems like banking systems, flight operating systems, etc., usually implement deadlock prevention or detection mechanisms.
- Simplicity − Ignoring deadlock can simplify the design of the operating system.
When a Deadlock Can't be Ignored
A deadlock cannot be ignored all the time. In some situations, ignoring deadlock can lead to serious consequences like data corruption, system crashes, and loss of important information. For example, imagine a flight control system end up in a deadlock situation during mid air. The operating system will not respond and may lead to crash landing of the aircraft.
Following are some situations where a deadlock cannot be ignored −
- Critical Systems − Critical systems are the systems where safety and reliability are important. For example, medical devices, aerospace systems, and financial systems. Here proper deadlock detection and recovery mechanisms must be implemented.
- High Resource Utilization − If the system has high resource utilization, the chances of deadlock will also increase. In such cases, ignoring deadlock can lead to performance degradation and instability of the system.
- Real-Time Systems − Real-time systems refer to the systems where tasks must be completed within a specific time frame. So there is no room for delays caused by deadlock. Therefore, real-time systems must implement deadlock prevention or avoidance mechanisms.
- Long-Running Processes − In systems with long-running processes, the cost of deadlock can be significant. Therefore, these systems may choose to implement deadlock detection and recovery mechanisms.
Examples of Deadlock Ignoring Operating Systems
Many modern operating systems choose to ignore deadlock as a strategy for handling it. Some examples of such operating systems include −
- Windows Operating System − Microsoft Windows operating system generally ignores deadlock. You might have seen messages like "The program is not responding" or "The application has stopped working" in your computer. These messages may indicate that a deadlock may have occurred. You can forcefully close the program or restart your computer to resolve the issue.
- Linux Operating System − Linux operating system also follows the approach of ignoring deadlock. Similar to Windows, if a deadlock occurs, the system may become unresponsive. The user can terminate the process or restart the system.
- macOS Operating System: Apple's macOS operating system also ignores deadlock similarly to Windows and Linux.
Conclusion
In this chapter, we highlighted the situations when a deadlock can simply be ignored by the system and also some situations when the system must take an action to recover from a deadlock.