Lesson3: Deadlock
Lesson Objectives:
To develop a description of deadlocks, which prevent sets of
concurrent processes from completing their tasks
To present a number of different methods for preventing or
avoiding deadlocks in a computer system.
3.1 Introduction
In a multiprogramming environment, several processes may compete for a finite
number of resources. A process requests resources; and if the resources are not
available at that time, the process enters a waiting state. Sometimes, a waiting
process is never again able to change state, because the resources it has
requested are held by other waiting processes. This situation is called a
deadlock. Perhaps the best illustration of a deadlock can be drawn from a law
passed by the Kansas legislature early in the 20th century. It said, in part:
"When two trains approach each other at a crossing, both shall come to a full
stop and neither shall start up again until the other has gone."
In this lesson, we describe methods that an operating system can use to prevent
or deal with deadlocks. Most current operating systems do not provide
deadlock-prevention facilities, but such features will probably be added soon.
Deadlock problems can only become more common, given current trends,
including larger numbers of processes, multithreaded programs, many more
resources within a system, and an emphasis on long-lived file and database
servers rather than batch systems.
Any Computer system will support different number of resources like printers,
plotters, tape drive, hard disks, files etc. Our operating system have the ability
to grant the exclusive access of a resource to a process temporarily. So, the set
of processes become deadlocked. This permanent blocking of a set of processes
that either compete for system resource or communicate with each other is a
deadlock. So, we define now. A deadlock is a situation where a process or a set
of processes is blocked , waiting for some resource that is held by some other
waiting Processes.
Examples of Deadlock:
A set of blocked processes each holding a resource and waiting to acquire a
resource held by another process in the set.
_ Example1:-
✦ System has 2 tape drives.
✦ P1 and P2 each hold one tape drive and each needs another one.
_ Example 2:
✦ semaphores A and B, initialized to 1
P0 P1
wait (A); wait(B)
wait (B); wait(A)
Example
Bridge Crossing Example:
Traffic only in one direction.
_ Each section of a bridge can be viewed as a resource.
_ If a deadlock occurs, it can be resolved if one car backs up (preempt resources
and rollback).
_ Several cars may have to be backed up if a deadlock occurs.
_ Starvation is possible.
3.2 System Model:
A system consists of a finite number of resources to be distributed among a
number of competing processes. The resources are partitioned into several
types, each consisting of some number of identical instances. Memory space,
CPU cycles, files, and I/O devices (such as printers and DVD drives) are
examples of resource types. if a system has two CPUs, then the resource type
CPU has two instances. Similarly, the resource type printer may have five
instances.
If a process requests an instance of a resource type, the allocation of instance of
the type will satisfy the request. If it will not, then the instances are not
identical, and the resource type classes have not been defined properly. For
example, a system may have two printers. These two printers may be defined to
be in the same resource class if no one cares which printer prints which output.
However, if one printer is on the ninth floor and the other is in the basement,
then people on the ninth floor may not see both printers as equivalent, and
separate resource classes may need to be defined for each printer.
A process must request a resource before using it and must release the resource
after using it. A process may request as many resources as it requires to carry
out its designated task. Obviously, the number of resources requested may not
exceed the total number of resources available in the system. In other words, a
process cannot request three printers if the system has only two.
Let the resource types be R1, R2, . . ., Rm (like CPU cycles, memory space, i/o
devices etc. ).Each resource type Ri has Wi instances. Each process utilizes a
resource as follows:
1. Request: A process, needing a resource, will request the OS for
assignment of the need resource. Then the process waits, till OS
assigns it an instance of the request resource.
2. Assignment: The OS will assign to the requesting process an instance
of the requested resource, wherever it is available. Then, the process
comes out of its waiting state.
3. Use: The process will use the assigned resource. In case, the resource
is non-sharable, the process will have exclusive access to it.
4. Release: After the process finished with the use of assigned resource,
it will return the resource to the system pool. The released resource
can now be assigned to another waiting process.
A set of processes is in a deadlock state when every process in the set
is waiting for an event that can be caused by only another process in
the set.
3.3 Deadlock Characteristics - Necessary condition for deadlock to occur:
Deadlock is an undesirable state of the system. There are four conditions that
must hold simultaneously for a deadlock to occur:
1. Mutual Exclusion: A resource can be used by only one person at a
time.If another person requests for that resource then the requested
process may be delayed until the resource has been released.
2. Hold-and-Wait: Some processes must be holding some resources in a
non-sharable mode and at the same time must be waiting to acquire some
more resources, which are currently held by other processes in a non-
sharable mode.
3. No Pre-emption: Resources granted to a process can be released back to
the system only as a result of the voluntary action of that process, after
the process has competed its task.
4. Circular Wait: there exists a set {P0, P1, …, P0} of waiting processes
such that P0 is waiting for a resource that is held by P1, P1 is waiting for
a resource that is held by P2, …, Pn–1 is waiting for a resource that is
held by Pn , and Pn is waiting for a resource that is held by P0.
3.4 Deadlock Detection
3.4.1Resource Allocation Graph: A deadlock is described i terms of a
drecte graph called as a system resource allocation graph .The resource
allocation graph (RAG) consists of two sets-
a. A set of vertices, V.
b. A set of edges, E.
The set of vertices is again divided into two categories-The set of all the
active processes in the system. i.e ,
_ V is partitioned into two types:
✦ P = {P1, P2, …, Pn}, the set consisting of all the processes in
the system.
✦ R = {R1, R2, …, Rm}, the set consisting of all resource types
in the system.
There are two types of edges in the Resource Allocation Graph:-
A directed edge from the process Pi to resource type Rj
_ Request edge – directed edge Pi → Rj it signifies that ith process is
requesting one unit of resource type j.This edge is called as request edge
_ Assignment edge – directed edge Rj → Pi. A directed edge from
resource Rj to a process Pi .It signifies that one unit of jth resource is held
by the process Pi.
Notations used in Resource-Allocation Graph
Example of Resource-Allocation Graph
Fig: Resource Allocation Graph With A Deadlock
Fig: Resource Allocation Graph With A Cycle But No Deadlock
Basic Facts
If graph contains no cycles . no deadlock.
_ If graph contains a cycle
.✦ if only one instance per resource type, then deadlock.
✦ if several instances per resource type, possibility of deadlock.
3.5 Methods of Deadlock Handling:
Deadlock can be handled by any of the following methods-
1. Deadlock Prevention
Deadlock can be prevented from occurring preventing one of four
necessary conditions to hold. If one of the conditions can be prevented
from holding the deadlock will not occur.
2. Deadlock Avoidance
Deadlocks can be avoided by maintaining the system in a safe state. A
system is said to be in safe state, if all pending processes can be
successfully executed in some sequence but satisfying their resource
requirements completely. The sequence in which the pending processes
can be executed is called a safe sequence. A process is executed only if
its maximum need of resources is within the system capacity, it is our OS
that checks whether the system will be n a safe or unsafe state after the
allocation of requested resources. This avoid deadlocks.
3. Deadlock Recovery:
Let the deadlock occur in the system and try to recover the system from
deadlock.
3.6 Deadlock Prevention:
In this method, we design the system in such a way that the possibility of
deadlock is excluded. It can be done by two methods:
Direct Method: we need to prevent the occurance of a circular wait
condidtion.
Indirect Method: we need to prevent the occurrence of one of the
three conditions-mutual exclusion, Hold-and-Wait and No Pre-
emption.
Deadlock can be prevented by ensuring that at least one of these
conditions cannot hold:
1. Mutual Exclusion: Mutual Exclusion means only one process can use
the resource at a time. An effort should be made to prevent the mutual
exclusion. The rule followed over here is to convert all non-sharable
resources to sharable resources .Like if several processes would like to
access read only file then allow that to happen. There is no need of
mutual exclusion in this case. But please note that few resources cannot
be changed from non-sharable to sharable resources. For eg. Several
processes cannot be allowed an update on a file simultaneously. Here,
Mutual exclusion is must. But we already know that mutual exclusion is
one of the requirements of critical sections problem also. So, preventing it
may lead to undesired results. In general this condition cannot be
disallowed.
2. Hold-and-Wait: We need to ensure that hold and wait condition never
occurs in the system. This means that we guarantee that whenever a
process request for a resource, it does not hold any other resource. For
this, we require that each process has to declare all its requirements in
the beginning and before starting it has to be allocated all its required
resources.
An alternative rule, allows a process to request resources only, when the
process has none .A process may request some resources and use them. It
must release all the resources that it is currently allocated before it
requests for any additional resources.
In either case there are 2 problems:
Low Resource utilization: many of the resources like a printer
may be allocated at the beginning of the process but is used at the
end of the process only like outputs are taken at the end of the
process.
Starvation: A process that needs many resources to start its
execution may be waiting for one or the other resource for an
indefinite time. So ,starvation occurs.
3. No Pre-emption: To ensure that this condition does not happen, pre-
emption of resources should be allowed. The rule is-“if a process is
holding some resources and requests another resources that cannot be
immediately allocated to it, then the resources currently being held are
pre-empted. In other words, these resources are implicitly released. The
preempted resources are added to the list of resources for which the
process is waiting. the process will be restarted only when it can regain its
old resources ,as well as new ones that it is requesting.
4. Circular Wait: To ensure that this condition never holds ,we impose a
total hierarichal ordering of all resource types.It is required that each
process can only request the required resources in an increasing orderto
enumeration.Let R={ R1, R2, . . ., Rm } be the set of resurce types.We
assign a unique integer numberto each resource type.By using these
numbers ,we can check using comparisonwhether one proceedes another
in an ordering.It can be given by a function.
F(resource –type)->N,where N is any integer.
3.7 Deadlock Avoidance: Deadlock avoidance requires that the operating
system be given in advance additional information concerning which
resources a process will request and use during its lifetime. With this
additional knowledge, it can decide for each request whether or not the
process should wait. To decide whether the current request can be
satisfied or must be delayed, the system must consider the resources
currently available, the resources currently allocated to each process, and
the future requests and releases of each processRequires that the system
has some additional a priori information available. Simplest and most
useful model requires that each process declare the maximum number of
resources of each type that it may need.The deadlock-avoidance
algorithm dynamically examines the resource-allocation state to ensure
that there can never be a circular-wait condition. _ Resource-allocation
state is defined by the number of available and allocated resources, and
the maximum demands of the processes.
Safe State: When a process requests an available resource, system
must decide if immediate allocation leaves the system in a safe state.
System is in safe state if there exists a safe sequence of all processes.
Sequence <P1, P2, …, Pn> is safe if for each Pi, the resources that Pi
can still request can be satisfied by currently available resources +
resources held by all the Pj, with j<I.
✦ If Pi resource needs are not immediately available, then Pi can wait
until all Pj have finished.
✦ When Pj is finished, Pi can obtain needed resources, execute, return
allocated resources, and terminate.
✦ When Pi terminates, Pi+1 can obtain its needed resources, and so on.
Basic Facts:
If a system is in safe state no deadlocks.
If a system is in unsafe state possibility of deadlock.
Avoidance _ ensures that a system will never enter an unsafe state.
A safe state is not a deadlocked state. Conversely, a deadlocked state is an
unsafe state. Not all unsafe states are deadlocks, however (Figure). An
unsafe state may lead to a deadlock. As long as the state is safe, the
operating system can avoid unsafe (and deadlocked) states. In an unsafe
state, the operating system cannot prevent processes from requesting
resources such that a deadlock occurs: The behavior of the processes
controls unsafe states.
To illustrate, we consider a system with 12 magnetic tape drives and three
processes: Po, P1, and P2. Process P1 requires 10 tape drives, process P 1 may
need as many as 4 tape drives, and process P2 may need up to 9 tape drives.
Suppose that, at time to, process Po is holding 5 tape drives, process Pi is
holding 2 tape drives, and process P, is holding 2 tape drives. (Thus, there
are 3 free tape drives.)
Maximum Needs Current Needs Available
Po 10 5 3
P1 4 2
P2 9 2
At time to, the system is in a safe state. The sequence <P i, Po, P2> satisfies
the safety condition. Process P1 can immediately be allocated all its tape
drives and then return them (the system will then have .5 available tape
drives); then process P11 can get all its tape drives and return them (the
system will then have 10 available tape drives); and finally process P , can get
all its tape drives and return them (the system will then have all 12 tape
drives available).
A system can go from a safe state to an unsafe state. Suppose that, at time t 1,
process P., requests and is allocated one more tape drive. The system is no
longer in a safe state. At this point, only process P I can be allocated all its
tape drives. When it returns them, the system will have only 4 available tape
drives. Since process Pc is allocated 5 tape drives but has a maximum of 10,
it may request 5 more tape drives. Since they are unavailable, process P o
must wait. Similarly, process P, may request an additional 6 tape drives and
have to wait, resulting in a deadlock. Our mistake was in granting the request
from process R for one more tape drive. If we had made P9 wait until either
of the other
processes had finished and released its resources, then we could have
avoided the deadlock.
Given the concept of a safe state, we can define avoidance algorithms that
ensure that the system will never deadlock. The idea is simply to ensure that
the system will always remain in a safe state. Initially, the system is in a safe
state. Whenever a process requests a resource that is currently available, the
system must decide whether the resource can be allocated immediately or
whether the process must wait. The request is granted only if the allocation
leaves the system in a safe state.
3.8 Resource-Allocation Graph Algorithm
3.8.1) Claim edge Pi → Rj indicated that process Pj may request
resource Rj; represented by a dashed line.
3.8.2) Claim edge converts to request edge when a process requests a
resource.
3.8.3)When a resource is released by a process, assignment edge
reconverts to a claim edge.
3.8.4) Resources must be claimed a priori in the system.
Fig.:Resource-Allocation Graph For Deadlock Avoidance
3.9 Banker’s Algorithm:-
Multiple instance.
Each process must a priori claim maximum use.
When a process requests a resource it may have to wait.
When a process gets all its resources it must return them in a finite
amount of time.
3.9.1Data Structures for the Banker’s Algorithm:
Let n = number of processes, and m = number of resources types.
Available: Vector of length m. If available [j] = k, there are k instances of
resource type Rj available.
Max: n x m matrix. If Max [i,j] = k, then process Pi may request at most
k instances of resource type Rj.
Allocation: n x m matrix. If Allocation[i,j] = k then Pi is currently
allocated k instances of Rj.
Need: n x m matrix. If Need[i,j] = k, then Pi may need k more instances
of Rj to complete its task.
Need [i,j] = Max[i,j] – Allocation [i,j].
3.9.2 Safety Algorithm:
1. Let Work and Finish be vectors of length m and n, respectively.
Initialize:
Work = Available
Finish [i] = false for i - 1,3, …, n.
2. Find and i such that both:
(a) Finish [i] = false
(b) Needi ≤ Work
If no such i exists, go to step 4.
3. Work = Work + Allocationi
Finish[i] = true
go to step 2.
4. If Finish [i] == true for all i, then the system is in a safe state.
3.9.3 Resource-Request Algorithm for Process Pi
Request = request vector for process Pi. If Requesti [j] = k then process Pi
wants k instances of resource type Rj.
1. If Requesti ≤ Needi go to step 2. Otherwise, raise error condition, since
process has exceeded its maximum claim.
2. If Requesti ≤ Available, go to step 3. Otherwise Pi must wait, since
resources are not available.
3. Pretend to allocate requested resources to Pi by modifying the state as
follows:
Available = Available = Requesti;
Allocationi = Allocationi + Requesti;
Needi = Needi – Requesti;;
• If safe _ the resources are allocated to Pi.
• If unsafe _ Pi must wait, and the old resource-allocation state is stored.
Deadlock Detection:
Allow system to enter deadlock state.
Detection algorithm.
Recovery scheme.
3.10.1 Single Instance of Each Resource Type
Maintain wait-for graph
✦ Nodes are processes.
✦ Pi → Pj if Pi is waiting for Pj.
Periodically invoke an algorithm that searches for a cycle
in the graph.
An algorithm to detect a cycle in a graph requires an order of n2
operations, where n is the number of vertices in the graph.
Resource-Allocation Graph Corresponding wait-for graph
Fig. Resource-Allocation Graph and Wait-for Graph
Several Instances of a Resource Type:
Available: A vector of length m indicates the number of available
resources of each type.
Allocation: An n x m matrix defines the number of resources of each type
currently allocated to each process.
Request: An n x m matrix indicates the current request
of each process. If Request [ij] = k, then process Pi is
requesting k more instances of resource type. Rj.
3.10 Detection Algorithm:
Let Work and Finish be vectors of length m and n,
respectively Initialize:
(a) Work = Available
(b) For i = 1,2, …, n, if Allocationi ≠ 0, then
Finish[i] = false;otherwise, Finish[i] = true.
2. Find an index i such that both:
(a) Finish[i] == false
(b) Requesti ≤ Work
If no such i exists, go to step 4.
3.Work = Work + Allocationi
Finish[i] = true
go to step 2.
4. If Finish[i] == false, for some i, 1 ≤ i ≤ n, then the system is in
deadlock state. Moreover, if Finish[i] == false, then Pi is deadlocked.
Algorithm requires an order of O(m x n2) operations to detect whether the
system is in deadlocked state.
Example of Detection Algorithm
Five processes P0 through P4; three resource types A (7 instances), B (2
instances), and C (6 instances)._ Snapshot at time T0:
Allocation Request Available
ABC ABC ABC
P0 010 000 000
P1 200 202
P2 303 000
P3 211 100
P4 002 002
Sequence <P0, P2, P3, P1, P4> will result in Finish[i] = true for all i.
P2 requests an additional instance of type C.
Request
ABC
P0 000
P1 201
P2 001
P3 100
P4 002
State of system?
✦ Can reclaim resources held by process P0, but insufficient
resources to fulfil other processes; requests.
✦ Deadlock exists, consisting of processes P1, P2, P3, and P4.
Detection-Algorithm Usage:
When, and how often, to invoke depends on:
✦ How often a deadlock is likely to occur?
✦ How many processes will need to be rolled back?
✔ one for each disjoint cycle.
_ If detection algorithm is invoked arbitrarily, there may be many cycles
in the resource graph and so we would not be able to tell which of the
many deadlocked processes “caused” the deadlock.
3.11 Recovery from Deadlock: Process Termination:
When a detection algorithm determines that a deadlock exists, several
alternatives are available. One possibility is to inform the operator that a
deadlock has occurred and to let the operator deal with the deadlock
manually. Another possibility is to let the system recover from the
deadlock automatically. There are two options for breaking a deadlock.
One is simply to abort one or more processes to break the circular wait.
The other is to preempt some resources from one or more of the
deadlocked processes.
Process Termination
To eliminate deadlocks by aborting a process, we use one of two
methods. In both methods, the system reclaims all resources allocated to
the terminated processes.
Abort all deadlocked processes. This method clearly will break the
deadlock cycle, but at great expense; the deadlocked processes may have
computed for a long time, and the results of these partial computations
must be discarded and probably will have to be recomputed later.
Abort one process at a time until the deadlock cycle is eliminated. This
method incurs considerable overhead, since, after each process is aborted,
a deadlock-detection algorithm must be invoked to determine whether
any processes are still deadlocked.
Aborting a process may not be easy. If the process was in the midst of
updating a file, terminating it will leave that file in an incorrect state.
Similarly, if the process was in the midst of printing data on a printer, the
system must reset the printer to a correct state before printing the next
job.
If the partial termination method is used, then we must determine which
deadlocked process (or processes) should be terminated. This
determination is a policy decision, similar to CPU-scheduling decisions.
The question is basically an economic one; we should abort those
processes whose termination will incur the minimum cost. Unfortunately,
the term cost is not a precise one. Many factors may affect which process
is chosen., including:
1. What the priority of the process is
2. How long the process has computed and how much longer the
process will compute before completing its designated task
3. How many and what type of resources the process has used (for
example; whether the resources are simple to preempt)
4. How many more resources the process needs in order to complete
5. How many processes will need to be terminated
Resource Preemption
To eliminate deadlocks using resource preemption, we successively
preempt some resources from processes and give these resources to other
processes until the deadlock cycle is broken.
If preemption is required to deal with deadlocks, then three issues need to
be addressed:
1. Selecting a victim. Which resources and which processes are to be
preempted? As in process termination, we must determine the order
of preemption to minimize cost. Cost factors may include such
parameters as the number of resources a deadlocked process is
holding and the amount of time the process has thus far consumed
during its execution.
2. Rollback. If we preempt a resource from a process, what should be
done with that process? Clearly, it cannot continue with its normal
execution; it is missing some needed resource. We must roll back
the process to some safe state and restart it from that state.
Since, in general, it is difficult to determine what a safe state is, the
simplest solution is a total rollback: Abort the process and then
restart it. Although it is more effective to roll back the process only
as far as necessary to break the deadlock, this method requires the
system to keep more information about the state of all running
processes.
3. Starvation. How do we ensure that starvation will not occur? That
is, how can we guarantee that resources will not always be
preempted from the same process?
In a system where victim selection is based primarily on cost factors, it
may happen that the same process is always picked as a victim. As a
result, this process never completes its designated task, a starvation
situation that must be dealt with in any practical system. Clearly, we must
ensure that a process can be picked as a victim only a (small) finite
number of times. The most common solution is to include the number of
rollbacks in the cost factor.
Summary
A deadlock state occurs when two or more processes are waiting
indefinitely for an event that can be caused only by one of the waiting
processes. There are three principal methods for dealing with deadlocks:
Use some protocol to prevent or avoid deadlocks, ensuring that the
system will never enter a deadlock state.
Allow the system to enter a deadlock state, detect it, and then recover.
Ignore the problem altogether and pretend that deadlocks never occur in
the system.
A deadlock can occur only if four necessary conditions hold
simultaneously in the system: mutual exclusion, hold and wait, no
preemption, and circular wait. To prevent deadlocks, we can ensure that
at least one of the necessary conditions never holds.
A method for avoiding deadlocks that is less stringent than the prevention
algorithms requires that the operating system have a priori information on
how each process will utilize system resources. The banker's algorithm,
for example, requires a priori information about the maximum number of
each resource class that may be requested by each process. Using this
information, we can define a deadlock-avoidance algorithm.
If a system does not employ a protocol to ensure that deadlocks will
never occur, then a detection-and-recovery scheme must be employed. A
deadlock-detection algorithm must be invoked to determine whether a
deadlock has occurred. If a deadlock is detected, the system must recover
either by terminating some of the deadlocked processes or by preempting
resources from some of the deadlocked processes.
Where preemption is used to deal with deadlocks, three issues must be
addressed: selecting a victim, rollback, and starvation. In a system that
selects victims for rollback primarily on the basis of cost factors,
starvation may occur, and the selected process can never complete its
designated task.
Finally, researchers have argued that none of the basic approaches alone
is appropriate for the entire spectrum of resource-allocation problems in
operating systems. The basic approaches can be combined, however,
allowing us to select an optimal approach for each class of resources in a
system.
Review Questions:
Que1) Consider the snapshot of a system.
Proce Allocat Max Availa
P0 010 753 332
ss ion ble
P1 200 322
P2 302 902
P3 211 222
P4 002 433
Answer the following question using the banker’s Algorithm
a. What is the content of matrix need?
b. Is the system in safe state?
c. If a request for process P1arrives for (1,0,2) can the request be granted
immediately?
Que.2)There are 3 resources and 3 processes in a system.
Availability Table
Resources Quantity
A 3
B 2
C 1
The quantities of resources requested by the processes are as follows: Request Table:
Process- 1 2 3
Res A 2 2 1
>
Res B 1 1 2
Res C 1 1 0
The resources allocated by the system are as follows: Allocation Table:
Process 1 2 3
Res A 1 2 0
Res B 1 0 1
Res C 0 1 0
Is the system in a deadlock? If yes, then what are the process(es) that need to be pre-
empted and in what order, to ensure that deadlock is overcome?
Que.3)What is mutual exclusion? Depict a scenario where mutual exclusion is
required.
Que.4) What is a dead-lock? List the necessary conditions for a deadlock to occur.
Que.5) Bring out the difference between Deadlock avoidance and deadlock
prevention scheme.
Que.6) Explain why having multiple copies of a resource does not prevent deadlocks
from happening.
Que.7) Define the critical section problem and explain the necessary characteristics of
a correct solution.
Que.8) With the help of the model of resource management, explain the tasks and
goals of the resource manager.
Que.9) When does deadlock happen? How does Banker’s algorithm avoid the
deadlock condition?
Text books:
[1] Silberchatz ,Operating system concepts , 5th edition.
[2] H. M. Deitel, An Introduction to Operating Systems, Second Edition,
Addison-Wesley (1990).
[3] [Tanenbaum 2001] A. S. Tanenbaum, Modern Operating Systems,
Prentice Hall (2001).
References:
[1][Bayer et al. 1978] R. Bayer, R. M. Graham, and G. Seegmuller, editors, Operating
Systems-An Advanced Course, Springer Verlag (1978).
[2][Brinch-Hansen 1973] P. Brinch-Hansen, Operating System Principles, Prentice
Hall (1973).
[3][Brookshear 2003] J. G. Brookshear, Computer Science: An Overview, Seventh
Edition, Addison-Wesley (2003).
[4] [Burns 1978] J. E. Burns, -Mutual Exclusion with Linear Waiting Using
Binary Shared Variables", SIGACT News, Volume 10, Number 2 (1978), pages 42-
47.
[5][Coffman et al. 1971] E. G. Coffman, M. J. Elphick, and A. Shoshani, "System
Deadlocks", Computing Surveys, Volume 3, Number 2 (1971), pages 67-78.
[6] [Deitel 1990] H. M. Deitel, An Introduction to Operating Systems, Second
Eflition,Addison-Wesley (1990).
[7] [Havender 1968] J. W. Havender, "Avoiding Deadlock in Multitasking Systems",
IBM Systems Journal, Volume 7, Number 2 (1968), pages 74-84.
[8][Holt 1971] R. C. Holt, "Comments on Prevention of System Deadlocks", Com-
munications of the ACM, Volume 14, Number 1 (1971), pages 36-38.
[9][Holt 1972] R. C. Holt, "Some Deadlock Properties of Computer Systems",
Computing Surveys, Volume 4, Number 3 (1972), pages 179-196.
[10][Ricart and Agrawala 1981] G. Ricart and A. K. Agrawala, "An Optimal
Algorithm for Mutual Exclusion in Computer Networks", Communications of the ACM,
Volume 24, Number 1 (1981), pages 9-17.
[11] [Tanenbaum 2001] A. S. Tanenbaum, Modern Operating Systems, Prentice Hall
(2001).
[12] [Tanenbaum and Van Renesse 1985] A. S. Tanenbaum and R. Van Renesse,
"Distributed Operating Systems", ACM Computing Survey, Volume 17, Number 4
(1985), pages 419-470.