0% found this document useful (0 votes)
12 views

Operating System: Dead Lock

Deadlock occurs when two processes are preventing each other from accessing shared resources. A graph model uses circles for processes and squares for resources, with directed arcs showing what each needs and holds. For deadlock, there must be mutual exclusion of resources, with each process holding a resource and waiting for another (hold and wait), inability to take resources from processes (no preemption), and circular waiting where each is waiting on a resource held by another in a cycle (circular wait).

Uploaded by

rmpprabu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views

Operating System: Dead Lock

Deadlock occurs when two processes are preventing each other from accessing shared resources. A graph model uses circles for processes and squares for resources, with directed arcs showing what each needs and holds. For deadlock, there must be mutual exclusion of resources, with each process holding a resource and waiting for another (hold and wait), inability to take resources from processes (no preemption), and circular waiting where each is waiting on a resource held by another in a cycle (circular wait).

Uploaded by

rmpprabu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

Operating System

Dead Lock
Dead Lock is problem or situation when 2 process sharing the same resources are
effectively preventing each other from accessing the resources.

R1

P1 P2

R2

A graph Model: we use a directed graph model to capture the sense of deadlock.
There are two kind of nodes.
i.Circles  denote process
ii.Squares  denote resources
A directed arc from a process node(circle) to a resource node(square) denoted that the
process needs that resource to proceed with its execution.
A directed arc from a square to a circle denotes that the resource is held by that
process.
Deadlock occurs when the following conditions.
1.Mutual Execlution  each resource can be assigned to at most one process only.
2.Hold and Wait  process hold a resource and wait for a additional resource.
3.No Preemption  a resource can be voluntarily by process itself.
4.Circular wait  every process awaits release of atleast one resource held by some
other processes.
A deadlock requires above four conditions to occur at the same time.

You might also like