Term Paper OS
Term Paper OS
Marks Obtained
Maximum Marks
Remarks
Deadlock:
Sparsh Yadav ([email protected]) | Ayush Kumar
([email protected]) | Paras Pal ([email protected])
Abstract
Defining Deadlock:
In the world of operating systems,
deadlocks are a serious problem that In essence, a deadlock occurs when
seriously compromise the stability and numerous processes wait for resources that
dependability of the system. The purpose of are currently used by some another
this abstract is to give a general overview of processes, which prevents them from
deadlocks by examining their origins, moving forward. Imagine an impasse as a
methods of detection, and preventative confrontation between two people, each
measures. When more than 2 processes are holding a key that the other needs to move
stopped waiting for a single resource that it forward with. Both are unable to move
is holding, it is referred as deadlock. A further without giving up their respective
deadlock may only occur in the cases keys, creating a deadlock. This type of
comprising: no pre-emption, hold and wait, deadlock occurs in computer systems when
mutual exclusion, and circular wait. processes come to a standstill and are
Numerous methods, such as resource pre- unable to release resources they are holding
emption and cautious resource allocation while waiting on resources held by others.
policies, have been devised to detect and
prevent deadlocks. Examples of deadlock
detection algorithms include the Banker's
algorithm. This abstract emphasizes how
crucial it is to comprehend deadlocks and
take preventative action to lessen their
negative effects on the system.
Introduction
Within the fields of operating systems and
computer science, deadlocks are a
confusing situation in which the smooth
flow of operations comes to an abrupt stop.
This is a dilemma in which one or more Understanding Deadlock Conditions:
processes are in a state of non-
determination and are withholding
resources that are essential to the progress
of the other. Deadlocks pose serious risks to In order to fully comprehend deadlocks, it
system performance, resource usage, and is imperative to comprehend the underlying
stability, making them a major challenge in causes of them:
system design and management.
resource while waiting for another, there
1. Mutual Exclusion: may be a resource deadlock.
4. Circular Wait:
A sequence of processes that are in a circle,
each waiting for a resource that is being
2. Hold and Wait: consumed by the process after it. A similar
scenario of deadlock results from this cyclic
Procedures can be used to hold resources
dependency, in which no other process may
until further resources are needed. This
move forward without acquiring a resource
condition may lead to resource hoarding, a
that is being held by another.
situation in which processes cling to the
resources they already have and impede the
progress of others.
1. Termination:
Resource Allocation Graph (RAG):
Finding and ending one or more of the
processes causing the deadlock is one
method of deadlock recovery. The system
can return to normal operation and other
processes can continue executing by
releasing the resources that these processes
were holding. To make sure that ending
processes doesn't result in data loss or
corruption, caution must be used.