Answer & Explanation:Deadlock.docx
deadlock.docx
Unformatted Attachment Preview
Running head: DEADLOCK
1
Deadlock
Student Name
Institution
Deadlock
2
DEADLOCK
In programming, a deadlock is a situation whereby two computer programs sharing the
same system are entirely preventing each other from accessing the resources, therefore stopping
the functionality of both programs. The conventional computer operating systems used to run
one program at a time. All the resources of the system were made available to only this one
program. However, operating systems later started running multiple programs at once
interleaving them. Programs were supposed to be specific to the resources they required so as to
avoid conflicts with the programs running at the same time. However, some operating systems
eventually introduced a dynamic resource allocation. Therefore, applications could request
further allocation of resources even when running (Black, 2010). Through, this the problem of
the deadlock was introduced.
The easiest and most reliable model requires that each process declares the maximum
number of resources of each type that it may require. The deadlock avoidance method
dynamically checks the resource allocation condition to make sure that there can never be a
circular wait condition (Johansen, 2009). Resource allocation state is elaborated by the number
of available and designated resources and the maximum demand of the process. Deadlock
prevention restrains the methods that can be used to make requests. To prevent deadlock, the
following process must be put into consideration mutual extension, hold and wait, no
preemption, and circular wait.
Deadlock
3
There are about four stages used to deal with deadlock. However the operating system
should be written precisely to prevent it from ever deadlocking, but the process can still
deadlock.
The Ostrich Approach
In this strategy, one is advised to ignore the deadlock problem altogether. Despite the cost
of prevention in this strategy being high, deadlock rarely occurs. The procedure is said to be a
trade in between correctness and convenience.
Deadlock Detection and Recovery
In this approach, one is required to locate the deadlock and when it occurs to take the
required steps to recover. First, the system lets the deadlock occur, and then it automatically tries
to detect the deadlock and takes action to recover from the deadlock. One of the most used
techniques to recover deadlock is by using a resource graph (Black, 2010).
Deadlock Avoidance
In this approach, one is supposed to avoid deadlock through scheduling resource carefully.
In this process dreadlock is made impossible to occur at any cost.
Deadlock Prevention
In this approach, deadlock is avoided through scheduling of resources so as to avoid any of
the four conditions from occurring.
Deadlock
The process of deadlock works best on operating systems. However, most operating systems
only allow mutual exclusive access to appropriate resources, but they do not prevent operations
from deadlocking.
4
Deadlock
Reference
Black, S. (2010). Deadlock. London: Bantam.
Johansen, I. (2009). Deadlock. New York: St. Martin’s Press.
5
…
Purchase answer to see full
attachment
You will get a plagiarism-free paper and you can get an originality report upon request.
All the personal information is confidential and we have 100% safe payment methods. We also guarantee good grades
Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.
You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.
Read moreEach paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.
Read moreThanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.
Read moreYour email is safe, as we store it according to international data protection rules. Your bank details are secure, as we use only reliable payment systems.
Read moreBy sending us your money, you buy the service we provide. Check out our terms and conditions if you prefer business talks to be laid out in official language.
Read more