SlideShare a Scribd company logo
Career Point University
REPORT ON
Deadlock- System model, resource types, deadlock problem, deadlock
characterization, methods for deadlock handling
SUBMITTED TO : SUBMITTED BY :
SOURAVH SHARMA WAKIL KUMAR
ASST. PROFESSOR UID-K12467
CSE DEPT. B.TECH (CSE)
4TH
SEMESTER
Deadlock- System model, resource types, deadlock problem,
deadlock characterization, methods for deadlock handling
Mr. Wakil Kumar
B.Tech CSE 4th
sem CareerPoint
University, Kota (Raj.)
wakilkumar14@gmail.com
Guided by
Mr. Sourabh Sharma
Asst. Professor,Computer science Department
Career Point University, Kota (Raj.)
19.sourabhsharma@gmail.com
Abstract— Deadlock can occur wherever multiple
processes interact. System deadlock is a serious problem in a
multiprogramming environment.
Keywords—Deadlock, prevention, recovery, detection,
avoidance.
Introduction
A deadlock is a state where a set of processes request
resources that are held by other processes in the set. A
deadlock is a condition in a system where a process cannot
proceed because it needs to obtain a resource held by another
process but it itself is holding a resource that the other process
needs. A computer system which allows more than one
process to be simultaneously active, holding and requesting
resources, may encounter the phenomenon of deadlock
(sometimes called deadly embrace).“Deadlock occurs so
infrequently that it is not worthwhile to degrade system
performance by executing prevention algorithms.”When
deadlock situation arise in an online computer system, the
system cannot respond within an acceptable period of time.
This is particularly true in process control applications, where
a very quick response is required of computer systems.
According to Coffman approaches to this problem can be
classified in three categories.(1)prevention (2)detection and
recovery and (3)avoidance.
Prevention approach:
The uses of resources are restricted so that system deadlock
will never occur .However this is a disadvantages of degrading
system performance, because of severe constraints in
resources usage.
Deadlock avoidance:
Pre-claim strategy used in operating system. And not effecting
in database environment.
Deadlock detection:
If transaction is blocked is blocked due to another transaction
make sure that transaction is not blocked on the first
transaction, either directly or indirectly via another
transaction. Using four predetermined application program
parameters obtained in the program development stage, a
directed graph model and a restriction matrix model are
introduced representing the usage of common resources.
ASSUMPTIONS AND DEFINATION
1). Assumptions
Four predetermined parameter relating to the application
program must be given in the development stage
a) Mode of usage for resource in each task.
Information must be given as to whether each task request
common resource in shared usage or exclusive usage.
b) Sequence of common resources usage in each task.
c) Non-concurrent task.
In multiprogramming environment, a number of task are
activated and run simultaneously.
However there are pair o task which are never activated
concurrently with one another
d) Type and number of common resources.
In process control computer system it is not difficult to obtain
these parameters in the development stage of application
program.
2). DEFINATION –
1: Exclusive usage and Shared usage
i) Exclusive Usage:
A resource is said to be exclusive usage state, when being
used for only one task.
ii) Shared usage:
A resource is said to be shared usage state when being used in
more than one task.
3). DEFINATION - System deadlock
A resource is said to be shared usage state when being used in
more than one task.
3).DEFINATION - 2: System deadlock
When a task request a resource, the system is used to be in a
deadlock state if the following two conditions.
1. Either one of the two following situation is encountered.
a) A task request exclusive usage of a resource but the
resource is already being used for exclusive or shared usage
by one or more other tasks. The request is then suspended.
b) A task requests shared usage of resources, but resource
already being used for exclusive usage by another task .The
request then suspended.
2. The request for the resource can’t be accepted unless the
requesting task release at least one of the resources which the
task is holding.
3.’wait’ relation between resources :
If task T request resource Rj while holding resources Ri (i!=j)
it is said that resources Ri is waiting for resource Rj in task T .
This situation is denoted by Ri-> Rj. This relation is referred
as „wait relation between resource.‟
4. Propagation of wait relation:
Let T1 and T2 are two task. If the following two wait
relation .Ri 𝑇1 Rj and Rj 𝑇2 Rk are true and the usage of
resource Rj by T1 and T2 is in an exclusive usage state, it is
said that resource Ri is waiting for resource Rk via resource
Rj. This situation is denoted by Ri 𝑇1 Rj 𝑇2 Rk. This is
known as propagation of wait relation.
4).DEADLOCK WITH REUSABLE AND
CONSUMABLE RESOURCES:
Secondary storage, I/O devices, or processors, and software
components, such as data files, tables, or semaphores, are all
considered reusable resource
classes. Consumable resources are produced and consumed
dynamically, and have the following properties:
1. The number of units within a class varies at runtime; it may
be zero and is potentially unbounded.
2. A process may increase the number of units of a resource
class by releasing one or more units into that class; i.e.,
processes create new resources at runtime without acquiring
them first from the class.
3. A process may decrease the number of units of a resource
class by requesting and acquiring one or more units of that
class. Many types of data generated by either hardware or
software have the above characteristics of consumable
resources.
4.2 Resource-Allocation Graph Algorithm
Claim edge Pi → Rj indicated that process Pj may request
resource Rj; represented by a dashed line.
Claim edge converts to request edge when a process requests a
resource.
When a resource is released by a process, assignment edge
reconverts to a claim edge.
Resources must be claimed a priori in the system.
4.3 Methods for Handling Deadlocks
 Ensure that the system will never enter a deadlock state.
 Allow the system to enter a deadlock state and then recover.
 Ignore the problem and pretend that deadlocks never occur
in the system; used by most operating systems, including
UNIX.
4.4 Deadlock Prevention
Mutual Exclusion – not required for sharable resources; must
hold for non-sharable resources.
Hold and Wait – must guarantee that whenever a process
requests a resource, it does not hold any other resources.
Require process to request and be allocated all its sources
before it begins execution, or allow process to request
resources only when the process has none. Low resource
utilization; starvation possible. Restrain the ways request can
be made.
No Preemption – If a process that is holding some resources
requests another resource that cannot be immediately allocated
to it, then all resources currently being held are released.
Preempted resources are added to the list of resources for
which the process is waiting.
4.4.1 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.
1. If Pi resource needs are not immediately available, then Pi
can wait until all Pj have finished.
2. When Pj is finished, Pi can obtain needed resources,
execute, return allocated resources, and terminate.
3. When Pi terminates, Pi+1 can obtain its needed resources,
and so on.
Properties of Safe States:
• A safe state is not a deadlock state
• An unsafe state may lead to deadlock
• It is possible to go from a safe state to an unsafe
state
• Example: A system with 12 units of a resource
– Three processes
• P1: max need = 10, current need = 5
• P2: max need = 4, current need = 2
• P3: max need = 9, current need = 2
– This is a safe state, since a safe sequence <P2, P1, P3> exists
– P3 requests an additional unit. Should this request be
granted?
– No, because this would put the system in an unsafe state
• P1, P2, P3 will then hold 5, 2, and 3 resources (2
units are available)
• P2 s future needs can be satisfied, but no way to‟
satisfy P1 s and P3 s needs‟ ‟
• Avoidance algorithms prevent the system from
entering an unsafe state.
5). BASICS OF PETRI NETS
Petri nets are a graphical and mathematical modelling tool
applicable to many systems. It is a promising tool for
describing and studying information processing systems that
are characterized as being concurrent, asynchronous,
distributed, parallel, nondeterministic, and/or stochastic. The
main definitions related to Petri net models are introduced in a
very compact way.
A Petri net is a 3-tuple N=(P, T, F) where P and T are finite,
nonempty, and disjoint sets. P is the set of places and T is the
set of transitions. F∁(P×T)∪(T×P) is called the flow relation.
The preset of a node xPT is defined as
• x={y∈P∪T|(y, x) ∈F}. The postset of a node x∈P∪T is
defined as x={y ∈P∪T|(x, y)∈F}.
ELEMENTARY SIPHONS
We distinguish the strict minimal siphons (SMS) in a Petri net
by elementary and dependent ones. In the sequel, Π is used to
denote the set of strict minimal siphons, while ΠE and ΠD the
sets of elementary and dependent ones, respectively. Unless
otherwise stated, we refer to a strict minimal one when
mentioning a siphon.
6). DEADLOCK AVOIDANCE
• Main idea:
– request additional information about how resources are to be
requested
– before allocating request, verify that system will not enter a
deadlock state
( resources currently available,
resources currently allocated,
future requests and releases )
• if no: grant the request
• if yes: block the process
• Algorithms differ in amount and type of information
– simplest (also most useful) model: maximum number of
resources
– other choices
• sequence of requests and releases
• alternate request paths
6.1 Limitations of Deadlock Avoidance
• Deadlock avoidance vs. deadlock prevention
– Prevention schemes work with local information.
• What does this process already have, what is it asking
– Avoidance schemes work with global information.
• Therefore, are less conservative.
• However, avoidance schemes require specification of
future needs.
– not generally known for OS processes
– more applicable to specialized situations
• programming language constructs (e.g., transaction-
based systems)
• known OS components (e.g., Unix “exec”)
APPLICATION
The algorithm for checking deadlock possibility was
developing by introducing three theorems mentioned above.
8. CONCLUSION AND FUTURE SCOPE:
In computer science, deadlock refers to a specific condition
when two or more processes are each waiting for the other to
release a resource, or more than two processes are waiting for
resources in a circular chain. Deadlock is a common problem
in multiprocessing where many processes share a specific type
of mutually exclusive resource known as a software lock or
soft lock. The future work includes developing some effective
and efficient deadlock prevention policies based on
elementary siphons in a Petri net. The problem of deadlock
detection in distributed systems has undergone extensive
study. In this paper we have tried to get rid of on distributed
deadlock by studying the performance representative
algorithms. Using four predetermined application program
parameters, a directed graph model representing the usage of
common resources by tasks and a restriction matrix model
were presented Sufficient conditions for system deadlock
prevention were mentioned. The methods in this paper is
useful in process control computer systems because the
algorithms introduced do have to be executed in real time
mode, and the restrictions on the usage of common resources
are applied when deadlock possibility is found. Thus
additional side effects on the responsiveness of the system will
not arise and the proper and higher utilization rate of common
resources is guaranteed.
ACKNOWLEDGEMENT
The authors would like to acknowledge valuable discussions
with Prof. Binayak Sahu, Prof. Amarnath Singh, Prof.
Tanushree Mohapatra and Prof. Neelamani Samal for their
effort and cooperation in making this paper successful. This
work was supported by Gandhi Institute for Education and
Technology (GIET), Bhubaneswar.
REFRENCES
[1] E.G. Coffman, M.J. Elphick . System deadlock and computing
surveys.
[2] Operating system concepts ,Greg Gagne, Peter B. Galvin.
[3] J.W. Murphy, Resource allocation with interlock detection in a
multitasking system.
[4] Dijkstra N.W, and Scholten C.S., Termination detection for diffusing
computations, Inf. Process. Lett., 11(1), 1-4 (1980)
[5] Goldman B., Deadlock detection in computer networks. Tech. Rep.
MIT-LCS-TR185, Massachusetts Institute of Technology, Cambridge,
Mass., (1977)
[6] Gray J.N., Notes on database operating systems. In Operating
Systems: An Advanced Course, Lecture Notes in Computer Science,
Springer-Verlag, New York, 60, 393-481 (1978), Science Dept., Univ.
of Texas at Austin, July (1981).
[7] HOARE, C.A.R. Communicating sequential processes Commun.
ACM21, 8, 666-677
[8] B. Abdallah and H. A. ElMaraghy, “Deadlock Prevention and
Avoidance in FMS: a Petri net based approach”, Int. J Manuf. Tech.,
[9] Li, Z. W., Uzam, M., and Zhou, M. C., “Comments on „Deadlock
prevention policy based on Petri nets and siphons ”,‟ Int. J. Prod. Res.,
Vol. 42, No. 24, 2004, pp. 5253–5254.
[10] Murata, T., “Petri nets: properties, analysis, and applications”.
The authors would like to acknowledge valuable discussions
with Prof. Binayak Sahu, Prof. Amarnath Singh, Prof.
Tanushree Mohapatra and Prof. Neelamani Samal for their
effort and cooperation in making this paper successful. This
work was supported by Gandhi Institute for Education and
Technology (GIET), Bhubaneswar.
REFRENCES
[1] E.G. Coffman, M.J. Elphick . System deadlock and computing
surveys.
[2] Operating system concepts ,Greg Gagne, Peter B. Galvin.
[3] J.W. Murphy, Resource allocation with interlock detection in a
multitasking system.
[4] Dijkstra N.W, and Scholten C.S., Termination detection for diffusing
computations, Inf. Process. Lett., 11(1), 1-4 (1980)
[5] Goldman B., Deadlock detection in computer networks. Tech. Rep.
MIT-LCS-TR185, Massachusetts Institute of Technology, Cambridge,
Mass., (1977)
[6] Gray J.N., Notes on database operating systems. In Operating
Systems: An Advanced Course, Lecture Notes in Computer Science,
Springer-Verlag, New York, 60, 393-481 (1978), Science Dept., Univ.
of Texas at Austin, July (1981).
[7] HOARE, C.A.R. Communicating sequential processes Commun.
ACM21, 8, 666-677
[8] B. Abdallah and H. A. ElMaraghy, “Deadlock Prevention and
Avoidance in FMS: a Petri net based approach”, Int. J Manuf. Tech.,
[9] Li, Z. W., Uzam, M., and Zhou, M. C., “Comments on „Deadlock
prevention policy based on Petri nets and siphons ”,‟ Int. J. Prod. Res.,
Vol. 42, No. 24, 2004, pp. 5253–5254.
[10] Murata, T., “Petri nets: properties, analysis, and applications”.
Ad

More Related Content

What's hot (20)

Chapter 7 - Deadlocks
Chapter 7 - DeadlocksChapter 7 - Deadlocks
Chapter 7 - Deadlocks
Wayne Jones Jnr
 
Deadlock
DeadlockDeadlock
Deadlock
Rajandeep Gill
 
The implementation of Banker's algorithm, data structure and its parser
The implementation of Banker's algorithm, data structure and its parserThe implementation of Banker's algorithm, data structure and its parser
The implementation of Banker's algorithm, data structure and its parser
Matthew Chang
 
Deadlock
DeadlockDeadlock
Deadlock
VISHAL DONGA
 
Deadlock Detection in Distributed Systems
Deadlock Detection in Distributed SystemsDeadlock Detection in Distributed Systems
Deadlock Detection in Distributed Systems
DHIVYADEVAKI
 
Bankers
BankersBankers
Bankers
mandeep kaur virk
 
Deadlock detection & prevention
Deadlock detection & preventionDeadlock detection & prevention
Deadlock detection & prevention
IkhtiarUddinShaHin
 
7 Deadlocks
7 Deadlocks7 Deadlocks
7 Deadlocks
Dr. Loganathan R
 
OSCh8
OSCh8OSCh8
OSCh8
Joe Christensen
 
Sucet os module_3_notes
Sucet os module_3_notesSucet os module_3_notes
Sucet os module_3_notes
SRINIVASUNIVERSITYEN
 
Gp1242 007 oer ppt
Gp1242 007 oer pptGp1242 007 oer ppt
Gp1242 007 oer ppt
Nivedita Kasturi
 
Deadlock
DeadlockDeadlock
Deadlock
Gaurav Singh Chandel
 
Chapter 4
Chapter 4Chapter 4
Chapter 4
ushabarad142
 
Ice
IceIce
Ice
ponnibala
 
Deadlock in Distributed Systems
Deadlock in Distributed SystemsDeadlock in Distributed Systems
Deadlock in Distributed Systems
Pritom Saha Akash
 
Deadlock and memory management -- Operating System
Deadlock and memory management -- Operating SystemDeadlock and memory management -- Operating System
Deadlock and memory management -- Operating System
EktaVaswani2
 
deadlock avoidance
deadlock avoidancedeadlock avoidance
deadlock avoidance
wahab13
 
Deadlock
DeadlockDeadlock
Deadlock
Mohd Arif
 
Deadlocks in operating system
Deadlocks in operating systemDeadlocks in operating system
Deadlocks in operating system
Midhun Sankar
 
Operating system Dead lock
Operating system Dead lockOperating system Dead lock
Operating system Dead lock
Karam Munir Butt
 

Similar to Deadlock- System model, resource types, deadlock problem, deadlock characterization, methods for deadlock handling Research paper (20)

Principles of Operating system and types
Principles of Operating system and typesPrinciples of Operating system and types
Principles of Operating system and types
dilipkumarcontact
 
Process Synchronization And Deadlocks
Process Synchronization And DeadlocksProcess Synchronization And Deadlocks
Process Synchronization And Deadlocks
tech2click
 
deadlock-operating-systems (1jjhkh).docx
deadlock-operating-systems (1jjhkh).docxdeadlock-operating-systems (1jjhkh).docx
deadlock-operating-systems (1jjhkh).docx
Dpak Chavan
 
Os unit 4
Os unit 4Os unit 4
Os unit 4
Krupali Mistry
 
Module-3 Deadlocks.pptx BCS303 Operating system
Module-3 Deadlocks.pptx BCS303 Operating systemModule-3 Deadlocks.pptx BCS303 Operating system
Module-3 Deadlocks.pptx BCS303 Operating system
ambikavenkatesh2
 
Deadlock principles in operating systems
Deadlock principles in operating systemsDeadlock principles in operating systems
Deadlock principles in operating systems
nazimsattar
 
Deadlock - An Operating System Concept.pptx
Deadlock - An Operating System Concept.pptxDeadlock - An Operating System Concept.pptx
Deadlock - An Operating System Concept.pptx
viceprincipalbfc
 
A ppt on deadlock in operating systems for the better explanation
A ppt on deadlock in operating systems for the better explanationA ppt on deadlock in operating systems for the better explanation
A ppt on deadlock in operating systems for the better explanation
AkashPundir2
 
Deadlock
DeadlockDeadlock
Deadlock
Mahershi ACT
 
Module-2Deadlock.ppt
Module-2Deadlock.pptModule-2Deadlock.ppt
Module-2Deadlock.ppt
KAnurag2
 
Deadlock.ppt
Deadlock.pptDeadlock.ppt
Deadlock.ppt
JeelBhanderi4
 
Module 3 Deadlocks.pptx
Module 3 Deadlocks.pptxModule 3 Deadlocks.pptx
Module 3 Deadlocks.pptx
shreesha16
 
deadlock in OS.pptx
deadlock in OS.pptxdeadlock in OS.pptx
deadlock in OS.pptx
Monirul Islam
 
Module3
Module3Module3
Module3
dilshad begum
 
Deadlocks
DeadlocksDeadlocks
Deadlocks
Shipra Swati
 
Methods for handling deadlock
Methods for handling deadlockMethods for handling deadlock
Methods for handling deadlock
sangrampatil81
 
DeadlockMar21.ppt
DeadlockMar21.pptDeadlockMar21.ppt
DeadlockMar21.ppt
hetrathod001
 
Deadlock and Banking Algorithm
Deadlock and Banking AlgorithmDeadlock and Banking Algorithm
Deadlock and Banking Algorithm
MD.ANISUR RAHMAN
 
OSLec14&15(Deadlocksinopratingsystem).pptx
OSLec14&15(Deadlocksinopratingsystem).pptxOSLec14&15(Deadlocksinopratingsystem).pptx
OSLec14&15(Deadlocksinopratingsystem).pptx
ssusere16bd9
 
Deadlock in software engineering for beginners.ppt
Deadlock in software engineering for beginners.pptDeadlock in software engineering for beginners.ppt
Deadlock in software engineering for beginners.ppt
shantomajumdar
 
Principles of Operating system and types
Principles of Operating system and typesPrinciples of Operating system and types
Principles of Operating system and types
dilipkumarcontact
 
Process Synchronization And Deadlocks
Process Synchronization And DeadlocksProcess Synchronization And Deadlocks
Process Synchronization And Deadlocks
tech2click
 
deadlock-operating-systems (1jjhkh).docx
deadlock-operating-systems (1jjhkh).docxdeadlock-operating-systems (1jjhkh).docx
deadlock-operating-systems (1jjhkh).docx
Dpak Chavan
 
Module-3 Deadlocks.pptx BCS303 Operating system
Module-3 Deadlocks.pptx BCS303 Operating systemModule-3 Deadlocks.pptx BCS303 Operating system
Module-3 Deadlocks.pptx BCS303 Operating system
ambikavenkatesh2
 
Deadlock principles in operating systems
Deadlock principles in operating systemsDeadlock principles in operating systems
Deadlock principles in operating systems
nazimsattar
 
Deadlock - An Operating System Concept.pptx
Deadlock - An Operating System Concept.pptxDeadlock - An Operating System Concept.pptx
Deadlock - An Operating System Concept.pptx
viceprincipalbfc
 
A ppt on deadlock in operating systems for the better explanation
A ppt on deadlock in operating systems for the better explanationA ppt on deadlock in operating systems for the better explanation
A ppt on deadlock in operating systems for the better explanation
AkashPundir2
 
Module-2Deadlock.ppt
Module-2Deadlock.pptModule-2Deadlock.ppt
Module-2Deadlock.ppt
KAnurag2
 
Module 3 Deadlocks.pptx
Module 3 Deadlocks.pptxModule 3 Deadlocks.pptx
Module 3 Deadlocks.pptx
shreesha16
 
Methods for handling deadlock
Methods for handling deadlockMethods for handling deadlock
Methods for handling deadlock
sangrampatil81
 
Deadlock and Banking Algorithm
Deadlock and Banking AlgorithmDeadlock and Banking Algorithm
Deadlock and Banking Algorithm
MD.ANISUR RAHMAN
 
OSLec14&15(Deadlocksinopratingsystem).pptx
OSLec14&15(Deadlocksinopratingsystem).pptxOSLec14&15(Deadlocksinopratingsystem).pptx
OSLec14&15(Deadlocksinopratingsystem).pptx
ssusere16bd9
 
Deadlock in software engineering for beginners.ppt
Deadlock in software engineering for beginners.pptDeadlock in software engineering for beginners.ppt
Deadlock in software engineering for beginners.ppt
shantomajumdar
 
Ad

More from Wakil Kumar (10)

Mcq android app
Mcq android appMcq android app
Mcq android app
Wakil Kumar
 
How to create .exe file into .c file in C Language anyone Program (Marksheet ...
How to create .exe file into .c file in C Language anyone Program (Marksheet ...How to create .exe file into .c file in C Language anyone Program (Marksheet ...
How to create .exe file into .c file in C Language anyone Program (Marksheet ...
Wakil Kumar
 
Report Normalization documents
Report Normalization documentsReport Normalization documents
Report Normalization documents
Wakil Kumar
 
Electronic bus ticketing system ppt
Electronic bus ticketing system pptElectronic bus ticketing system ppt
Electronic bus ticketing system ppt
Wakil Kumar
 
Miniature Circuit Breakers (MCB) By Chhotray Tiyu
Miniature Circuit Breakers (MCB) By Chhotray TiyuMiniature Circuit Breakers (MCB) By Chhotray Tiyu
Miniature Circuit Breakers (MCB) By Chhotray Tiyu
Wakil Kumar
 
Stepdown Transformer By Nagmani
Stepdown Transformer By NagmaniStepdown Transformer By Nagmani
Stepdown Transformer By Nagmani
Wakil Kumar
 
function (mal120) By Wakil Kumar
function (mal120) By Wakil Kumarfunction (mal120) By Wakil Kumar
function (mal120) By Wakil Kumar
Wakil Kumar
 
Line balancing ppt By Wakil Kumar
Line balancing ppt By Wakil KumarLine balancing ppt By Wakil Kumar
Line balancing ppt By Wakil Kumar
Wakil Kumar
 
RLC series circuit simulation at Proteus Wakil Kumar
RLC series circuit simulation at Proteus Wakil KumarRLC series circuit simulation at Proteus Wakil Kumar
RLC series circuit simulation at Proteus Wakil Kumar
Wakil Kumar
 
RLC series circuit simulation at Proteus
RLC series circuit simulation at Proteus RLC series circuit simulation at Proteus
RLC series circuit simulation at Proteus
Wakil Kumar
 
How to create .exe file into .c file in C Language anyone Program (Marksheet ...
How to create .exe file into .c file in C Language anyone Program (Marksheet ...How to create .exe file into .c file in C Language anyone Program (Marksheet ...
How to create .exe file into .c file in C Language anyone Program (Marksheet ...
Wakil Kumar
 
Report Normalization documents
Report Normalization documentsReport Normalization documents
Report Normalization documents
Wakil Kumar
 
Electronic bus ticketing system ppt
Electronic bus ticketing system pptElectronic bus ticketing system ppt
Electronic bus ticketing system ppt
Wakil Kumar
 
Miniature Circuit Breakers (MCB) By Chhotray Tiyu
Miniature Circuit Breakers (MCB) By Chhotray TiyuMiniature Circuit Breakers (MCB) By Chhotray Tiyu
Miniature Circuit Breakers (MCB) By Chhotray Tiyu
Wakil Kumar
 
Stepdown Transformer By Nagmani
Stepdown Transformer By NagmaniStepdown Transformer By Nagmani
Stepdown Transformer By Nagmani
Wakil Kumar
 
function (mal120) By Wakil Kumar
function (mal120) By Wakil Kumarfunction (mal120) By Wakil Kumar
function (mal120) By Wakil Kumar
Wakil Kumar
 
Line balancing ppt By Wakil Kumar
Line balancing ppt By Wakil KumarLine balancing ppt By Wakil Kumar
Line balancing ppt By Wakil Kumar
Wakil Kumar
 
RLC series circuit simulation at Proteus Wakil Kumar
RLC series circuit simulation at Proteus Wakil KumarRLC series circuit simulation at Proteus Wakil Kumar
RLC series circuit simulation at Proteus Wakil Kumar
Wakil Kumar
 
RLC series circuit simulation at Proteus
RLC series circuit simulation at Proteus RLC series circuit simulation at Proteus
RLC series circuit simulation at Proteus
Wakil Kumar
 
Ad

Recently uploaded (20)

new ppt artificial intelligence historyyy
new ppt artificial intelligence historyyynew ppt artificial intelligence historyyy
new ppt artificial intelligence historyyy
PianoPianist
 
QA/QC Manager (Quality management Expert)
QA/QC Manager (Quality management Expert)QA/QC Manager (Quality management Expert)
QA/QC Manager (Quality management Expert)
rccbatchplant
 
Reagent dosing (Bredel) presentation.pptx
Reagent dosing (Bredel) presentation.pptxReagent dosing (Bredel) presentation.pptx
Reagent dosing (Bredel) presentation.pptx
AlejandroOdio
 
five-year-soluhhhhhhhhhhhhhhhhhtions.pdf
five-year-soluhhhhhhhhhhhhhhhhhtions.pdffive-year-soluhhhhhhhhhhhhhhhhhtions.pdf
five-year-soluhhhhhhhhhhhhhhhhhtions.pdf
AdityaSharma944496
 
DT REPORT by Tech titan GROUP to introduce the subject design Thinking
DT REPORT by Tech titan GROUP to introduce the subject design ThinkingDT REPORT by Tech titan GROUP to introduce the subject design Thinking
DT REPORT by Tech titan GROUP to introduce the subject design Thinking
DhruvChotaliya2
 
Process Parameter Optimization for Minimizing Springback in Cold Drawing Proc...
Process Parameter Optimization for Minimizing Springback in Cold Drawing Proc...Process Parameter Optimization for Minimizing Springback in Cold Drawing Proc...
Process Parameter Optimization for Minimizing Springback in Cold Drawing Proc...
Journal of Soft Computing in Civil Engineering
 
Artificial Intelligence (AI) basics.pptx
Artificial Intelligence (AI) basics.pptxArtificial Intelligence (AI) basics.pptx
Artificial Intelligence (AI) basics.pptx
aditichinar
 
Value Stream Mapping Worskshops for Intelligent Continuous Security
Value Stream Mapping Worskshops for Intelligent Continuous SecurityValue Stream Mapping Worskshops for Intelligent Continuous Security
Value Stream Mapping Worskshops for Intelligent Continuous Security
Marc Hornbeek
 
Smart_Storage_Systems_Production_Engineering.pptx
Smart_Storage_Systems_Production_Engineering.pptxSmart_Storage_Systems_Production_Engineering.pptx
Smart_Storage_Systems_Production_Engineering.pptx
rushikeshnavghare94
 
ELectronics Boards & Product Testing_Shiju.pdf
ELectronics Boards & Product Testing_Shiju.pdfELectronics Boards & Product Testing_Shiju.pdf
ELectronics Boards & Product Testing_Shiju.pdf
Shiju Jacob
 
Development of MLR, ANN and ANFIS Models for Estimation of PCUs at Different ...
Development of MLR, ANN and ANFIS Models for Estimation of PCUs at Different ...Development of MLR, ANN and ANFIS Models for Estimation of PCUs at Different ...
Development of MLR, ANN and ANFIS Models for Estimation of PCUs at Different ...
Journal of Soft Computing in Civil Engineering
 
"Feed Water Heaters in Thermal Power Plants: Types, Working, and Efficiency G...
"Feed Water Heaters in Thermal Power Plants: Types, Working, and Efficiency G..."Feed Water Heaters in Thermal Power Plants: Types, Working, and Efficiency G...
"Feed Water Heaters in Thermal Power Plants: Types, Working, and Efficiency G...
Infopitaara
 
railway wheels, descaling after reheating and before forging
railway wheels, descaling after reheating and before forgingrailway wheels, descaling after reheating and before forging
railway wheels, descaling after reheating and before forging
Javad Kadkhodapour
 
Structural Response of Reinforced Self-Compacting Concrete Deep Beam Using Fi...
Structural Response of Reinforced Self-Compacting Concrete Deep Beam Using Fi...Structural Response of Reinforced Self-Compacting Concrete Deep Beam Using Fi...
Structural Response of Reinforced Self-Compacting Concrete Deep Beam Using Fi...
Journal of Soft Computing in Civil Engineering
 
Raish Khanji GTU 8th sem Internship Report.pdf
Raish Khanji GTU 8th sem Internship Report.pdfRaish Khanji GTU 8th sem Internship Report.pdf
Raish Khanji GTU 8th sem Internship Report.pdf
RaishKhanji
 
Fort night presentation new0903 pdf.pdf.
Fort night presentation new0903 pdf.pdf.Fort night presentation new0903 pdf.pdf.
Fort night presentation new0903 pdf.pdf.
anuragmk56
 
"Boiler Feed Pump (BFP): Working, Applications, Advantages, and Limitations E...
"Boiler Feed Pump (BFP): Working, Applications, Advantages, and Limitations E..."Boiler Feed Pump (BFP): Working, Applications, Advantages, and Limitations E...
"Boiler Feed Pump (BFP): Working, Applications, Advantages, and Limitations E...
Infopitaara
 
introduction to machine learining for beginers
introduction to machine learining for beginersintroduction to machine learining for beginers
introduction to machine learining for beginers
JoydebSheet
 
15th International Conference on Computer Science, Engineering and Applicatio...
15th International Conference on Computer Science, Engineering and Applicatio...15th International Conference on Computer Science, Engineering and Applicatio...
15th International Conference on Computer Science, Engineering and Applicatio...
IJCSES Journal
 
Mathematical foundation machine learning.pdf
Mathematical foundation machine learning.pdfMathematical foundation machine learning.pdf
Mathematical foundation machine learning.pdf
TalhaShahid49
 
new ppt artificial intelligence historyyy
new ppt artificial intelligence historyyynew ppt artificial intelligence historyyy
new ppt artificial intelligence historyyy
PianoPianist
 
QA/QC Manager (Quality management Expert)
QA/QC Manager (Quality management Expert)QA/QC Manager (Quality management Expert)
QA/QC Manager (Quality management Expert)
rccbatchplant
 
Reagent dosing (Bredel) presentation.pptx
Reagent dosing (Bredel) presentation.pptxReagent dosing (Bredel) presentation.pptx
Reagent dosing (Bredel) presentation.pptx
AlejandroOdio
 
five-year-soluhhhhhhhhhhhhhhhhhtions.pdf
five-year-soluhhhhhhhhhhhhhhhhhtions.pdffive-year-soluhhhhhhhhhhhhhhhhhtions.pdf
five-year-soluhhhhhhhhhhhhhhhhhtions.pdf
AdityaSharma944496
 
DT REPORT by Tech titan GROUP to introduce the subject design Thinking
DT REPORT by Tech titan GROUP to introduce the subject design ThinkingDT REPORT by Tech titan GROUP to introduce the subject design Thinking
DT REPORT by Tech titan GROUP to introduce the subject design Thinking
DhruvChotaliya2
 
Artificial Intelligence (AI) basics.pptx
Artificial Intelligence (AI) basics.pptxArtificial Intelligence (AI) basics.pptx
Artificial Intelligence (AI) basics.pptx
aditichinar
 
Value Stream Mapping Worskshops for Intelligent Continuous Security
Value Stream Mapping Worskshops for Intelligent Continuous SecurityValue Stream Mapping Worskshops for Intelligent Continuous Security
Value Stream Mapping Worskshops for Intelligent Continuous Security
Marc Hornbeek
 
Smart_Storage_Systems_Production_Engineering.pptx
Smart_Storage_Systems_Production_Engineering.pptxSmart_Storage_Systems_Production_Engineering.pptx
Smart_Storage_Systems_Production_Engineering.pptx
rushikeshnavghare94
 
ELectronics Boards & Product Testing_Shiju.pdf
ELectronics Boards & Product Testing_Shiju.pdfELectronics Boards & Product Testing_Shiju.pdf
ELectronics Boards & Product Testing_Shiju.pdf
Shiju Jacob
 
"Feed Water Heaters in Thermal Power Plants: Types, Working, and Efficiency G...
"Feed Water Heaters in Thermal Power Plants: Types, Working, and Efficiency G..."Feed Water Heaters in Thermal Power Plants: Types, Working, and Efficiency G...
"Feed Water Heaters in Thermal Power Plants: Types, Working, and Efficiency G...
Infopitaara
 
railway wheels, descaling after reheating and before forging
railway wheels, descaling after reheating and before forgingrailway wheels, descaling after reheating and before forging
railway wheels, descaling after reheating and before forging
Javad Kadkhodapour
 
Raish Khanji GTU 8th sem Internship Report.pdf
Raish Khanji GTU 8th sem Internship Report.pdfRaish Khanji GTU 8th sem Internship Report.pdf
Raish Khanji GTU 8th sem Internship Report.pdf
RaishKhanji
 
Fort night presentation new0903 pdf.pdf.
Fort night presentation new0903 pdf.pdf.Fort night presentation new0903 pdf.pdf.
Fort night presentation new0903 pdf.pdf.
anuragmk56
 
"Boiler Feed Pump (BFP): Working, Applications, Advantages, and Limitations E...
"Boiler Feed Pump (BFP): Working, Applications, Advantages, and Limitations E..."Boiler Feed Pump (BFP): Working, Applications, Advantages, and Limitations E...
"Boiler Feed Pump (BFP): Working, Applications, Advantages, and Limitations E...
Infopitaara
 
introduction to machine learining for beginers
introduction to machine learining for beginersintroduction to machine learining for beginers
introduction to machine learining for beginers
JoydebSheet
 
15th International Conference on Computer Science, Engineering and Applicatio...
15th International Conference on Computer Science, Engineering and Applicatio...15th International Conference on Computer Science, Engineering and Applicatio...
15th International Conference on Computer Science, Engineering and Applicatio...
IJCSES Journal
 
Mathematical foundation machine learning.pdf
Mathematical foundation machine learning.pdfMathematical foundation machine learning.pdf
Mathematical foundation machine learning.pdf
TalhaShahid49
 

Deadlock- System model, resource types, deadlock problem, deadlock characterization, methods for deadlock handling Research paper

  • 1. Career Point University REPORT ON Deadlock- System model, resource types, deadlock problem, deadlock characterization, methods for deadlock handling SUBMITTED TO : SUBMITTED BY : SOURAVH SHARMA WAKIL KUMAR ASST. PROFESSOR UID-K12467 CSE DEPT. B.TECH (CSE) 4TH SEMESTER
  • 2. Deadlock- System model, resource types, deadlock problem, deadlock characterization, methods for deadlock handling Mr. Wakil Kumar B.Tech CSE 4th sem CareerPoint University, Kota (Raj.) [email protected] Guided by Mr. Sourabh Sharma Asst. Professor,Computer science Department Career Point University, Kota (Raj.) [email protected] Abstract— Deadlock can occur wherever multiple processes interact. System deadlock is a serious problem in a multiprogramming environment. Keywords—Deadlock, prevention, recovery, detection, avoidance. Introduction A deadlock is a state where a set of processes request resources that are held by other processes in the set. A deadlock is a condition in a system where a process cannot proceed because it needs to obtain a resource held by another process but it itself is holding a resource that the other process needs. A computer system which allows more than one process to be simultaneously active, holding and requesting resources, may encounter the phenomenon of deadlock (sometimes called deadly embrace).“Deadlock occurs so infrequently that it is not worthwhile to degrade system performance by executing prevention algorithms.”When deadlock situation arise in an online computer system, the system cannot respond within an acceptable period of time. This is particularly true in process control applications, where a very quick response is required of computer systems. According to Coffman approaches to this problem can be classified in three categories.(1)prevention (2)detection and recovery and (3)avoidance. Prevention approach: The uses of resources are restricted so that system deadlock will never occur .However this is a disadvantages of degrading system performance, because of severe constraints in resources usage. Deadlock avoidance: Pre-claim strategy used in operating system. And not effecting in database environment. Deadlock detection: If transaction is blocked is blocked due to another transaction make sure that transaction is not blocked on the first transaction, either directly or indirectly via another transaction. Using four predetermined application program parameters obtained in the program development stage, a directed graph model and a restriction matrix model are introduced representing the usage of common resources. ASSUMPTIONS AND DEFINATION 1). Assumptions Four predetermined parameter relating to the application program must be given in the development stage a) Mode of usage for resource in each task. Information must be given as to whether each task request common resource in shared usage or exclusive usage. b) Sequence of common resources usage in each task. c) Non-concurrent task. In multiprogramming environment, a number of task are activated and run simultaneously. However there are pair o task which are never activated concurrently with one another d) Type and number of common resources. In process control computer system it is not difficult to obtain these parameters in the development stage of application program. 2). DEFINATION – 1: Exclusive usage and Shared usage i) Exclusive Usage:
  • 3. A resource is said to be exclusive usage state, when being used for only one task. ii) Shared usage: A resource is said to be shared usage state when being used in more than one task. 3). DEFINATION - System deadlock A resource is said to be shared usage state when being used in more than one task. 3).DEFINATION - 2: System deadlock When a task request a resource, the system is used to be in a deadlock state if the following two conditions. 1. Either one of the two following situation is encountered. a) A task request exclusive usage of a resource but the resource is already being used for exclusive or shared usage by one or more other tasks. The request is then suspended. b) A task requests shared usage of resources, but resource already being used for exclusive usage by another task .The request then suspended. 2. The request for the resource can’t be accepted unless the requesting task release at least one of the resources which the task is holding. 3.’wait’ relation between resources : If task T request resource Rj while holding resources Ri (i!=j) it is said that resources Ri is waiting for resource Rj in task T . This situation is denoted by Ri-> Rj. This relation is referred as „wait relation between resource.‟ 4. Propagation of wait relation: Let T1 and T2 are two task. If the following two wait relation .Ri 𝑇1 Rj and Rj 𝑇2 Rk are true and the usage of resource Rj by T1 and T2 is in an exclusive usage state, it is said that resource Ri is waiting for resource Rk via resource Rj. This situation is denoted by Ri 𝑇1 Rj 𝑇2 Rk. This is known as propagation of wait relation. 4).DEADLOCK WITH REUSABLE AND CONSUMABLE RESOURCES: Secondary storage, I/O devices, or processors, and software components, such as data files, tables, or semaphores, are all considered reusable resource classes. Consumable resources are produced and consumed dynamically, and have the following properties: 1. The number of units within a class varies at runtime; it may be zero and is potentially unbounded. 2. A process may increase the number of units of a resource class by releasing one or more units into that class; i.e., processes create new resources at runtime without acquiring them first from the class. 3. A process may decrease the number of units of a resource class by requesting and acquiring one or more units of that class. Many types of data generated by either hardware or software have the above characteristics of consumable resources. 4.2 Resource-Allocation Graph Algorithm Claim edge Pi → Rj indicated that process Pj may request resource Rj; represented by a dashed line. Claim edge converts to request edge when a process requests a resource. When a resource is released by a process, assignment edge reconverts to a claim edge. Resources must be claimed a priori in the system. 4.3 Methods for Handling Deadlocks  Ensure that the system will never enter a deadlock state.  Allow the system to enter a deadlock state and then recover.  Ignore the problem and pretend that deadlocks never occur in the system; used by most operating systems, including UNIX. 4.4 Deadlock Prevention Mutual Exclusion – not required for sharable resources; must hold for non-sharable resources. Hold and Wait – must guarantee that whenever a process requests a resource, it does not hold any other resources. Require process to request and be allocated all its sources before it begins execution, or allow process to request resources only when the process has none. Low resource utilization; starvation possible. Restrain the ways request can be made. No Preemption – If a process that is holding some resources requests another resource that cannot be immediately allocated to it, then all resources currently being held are released. Preempted resources are added to the list of resources for which the process is waiting. 4.4.1 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. 1. If Pi resource needs are not immediately available, then Pi can wait until all Pj have finished. 2. When Pj is finished, Pi can obtain needed resources, execute, return allocated resources, and terminate. 3. When Pi terminates, Pi+1 can obtain its needed resources, and so on. Properties of Safe States: • A safe state is not a deadlock state • An unsafe state may lead to deadlock • It is possible to go from a safe state to an unsafe state
  • 4. • Example: A system with 12 units of a resource – Three processes • P1: max need = 10, current need = 5 • P2: max need = 4, current need = 2 • P3: max need = 9, current need = 2 – This is a safe state, since a safe sequence <P2, P1, P3> exists – P3 requests an additional unit. Should this request be granted? – No, because this would put the system in an unsafe state • P1, P2, P3 will then hold 5, 2, and 3 resources (2 units are available) • P2 s future needs can be satisfied, but no way to‟ satisfy P1 s and P3 s needs‟ ‟ • Avoidance algorithms prevent the system from entering an unsafe state. 5). BASICS OF PETRI NETS Petri nets are a graphical and mathematical modelling tool applicable to many systems. It is a promising tool for describing and studying information processing systems that are characterized as being concurrent, asynchronous, distributed, parallel, nondeterministic, and/or stochastic. The main definitions related to Petri net models are introduced in a very compact way. A Petri net is a 3-tuple N=(P, T, F) where P and T are finite, nonempty, and disjoint sets. P is the set of places and T is the set of transitions. F∁(P×T)∪(T×P) is called the flow relation. The preset of a node xPT is defined as • x={y∈P∪T|(y, x) ∈F}. The postset of a node x∈P∪T is defined as x={y ∈P∪T|(x, y)∈F}. ELEMENTARY SIPHONS We distinguish the strict minimal siphons (SMS) in a Petri net by elementary and dependent ones. In the sequel, Π is used to denote the set of strict minimal siphons, while ΠE and ΠD the sets of elementary and dependent ones, respectively. Unless otherwise stated, we refer to a strict minimal one when mentioning a siphon. 6). DEADLOCK AVOIDANCE • Main idea: – request additional information about how resources are to be requested – before allocating request, verify that system will not enter a deadlock state ( resources currently available, resources currently allocated, future requests and releases ) • if no: grant the request • if yes: block the process • Algorithms differ in amount and type of information – simplest (also most useful) model: maximum number of resources – other choices • sequence of requests and releases • alternate request paths 6.1 Limitations of Deadlock Avoidance • Deadlock avoidance vs. deadlock prevention – Prevention schemes work with local information. • What does this process already have, what is it asking – Avoidance schemes work with global information. • Therefore, are less conservative. • However, avoidance schemes require specification of future needs. – not generally known for OS processes – more applicable to specialized situations • programming language constructs (e.g., transaction- based systems) • known OS components (e.g., Unix “exec”) APPLICATION The algorithm for checking deadlock possibility was developing by introducing three theorems mentioned above. 8. CONCLUSION AND FUTURE SCOPE: In computer science, deadlock refers to a specific condition when two or more processes are each waiting for the other to release a resource, or more than two processes are waiting for resources in a circular chain. Deadlock is a common problem in multiprocessing where many processes share a specific type of mutually exclusive resource known as a software lock or soft lock. The future work includes developing some effective and efficient deadlock prevention policies based on elementary siphons in a Petri net. The problem of deadlock detection in distributed systems has undergone extensive study. In this paper we have tried to get rid of on distributed deadlock by studying the performance representative algorithms. Using four predetermined application program parameters, a directed graph model representing the usage of common resources by tasks and a restriction matrix model were presented Sufficient conditions for system deadlock prevention were mentioned. The methods in this paper is useful in process control computer systems because the algorithms introduced do have to be executed in real time mode, and the restrictions on the usage of common resources are applied when deadlock possibility is found. Thus additional side effects on the responsiveness of the system will not arise and the proper and higher utilization rate of common resources is guaranteed. ACKNOWLEDGEMENT
  • 5. The authors would like to acknowledge valuable discussions with Prof. Binayak Sahu, Prof. Amarnath Singh, Prof. Tanushree Mohapatra and Prof. Neelamani Samal for their effort and cooperation in making this paper successful. This work was supported by Gandhi Institute for Education and Technology (GIET), Bhubaneswar. REFRENCES [1] E.G. Coffman, M.J. Elphick . System deadlock and computing surveys. [2] Operating system concepts ,Greg Gagne, Peter B. Galvin. [3] J.W. Murphy, Resource allocation with interlock detection in a multitasking system. [4] Dijkstra N.W, and Scholten C.S., Termination detection for diffusing computations, Inf. Process. Lett., 11(1), 1-4 (1980) [5] Goldman B., Deadlock detection in computer networks. Tech. Rep. MIT-LCS-TR185, Massachusetts Institute of Technology, Cambridge, Mass., (1977) [6] Gray J.N., Notes on database operating systems. In Operating Systems: An Advanced Course, Lecture Notes in Computer Science, Springer-Verlag, New York, 60, 393-481 (1978), Science Dept., Univ. of Texas at Austin, July (1981). [7] HOARE, C.A.R. Communicating sequential processes Commun. ACM21, 8, 666-677 [8] B. Abdallah and H. A. ElMaraghy, “Deadlock Prevention and Avoidance in FMS: a Petri net based approach”, Int. J Manuf. Tech., [9] Li, Z. W., Uzam, M., and Zhou, M. C., “Comments on „Deadlock prevention policy based on Petri nets and siphons ”,‟ Int. J. Prod. Res., Vol. 42, No. 24, 2004, pp. 5253–5254. [10] Murata, T., “Petri nets: properties, analysis, and applications”.
  • 6. The authors would like to acknowledge valuable discussions with Prof. Binayak Sahu, Prof. Amarnath Singh, Prof. Tanushree Mohapatra and Prof. Neelamani Samal for their effort and cooperation in making this paper successful. This work was supported by Gandhi Institute for Education and Technology (GIET), Bhubaneswar. REFRENCES [1] E.G. Coffman, M.J. Elphick . System deadlock and computing surveys. [2] Operating system concepts ,Greg Gagne, Peter B. Galvin. [3] J.W. Murphy, Resource allocation with interlock detection in a multitasking system. [4] Dijkstra N.W, and Scholten C.S., Termination detection for diffusing computations, Inf. Process. Lett., 11(1), 1-4 (1980) [5] Goldman B., Deadlock detection in computer networks. Tech. Rep. MIT-LCS-TR185, Massachusetts Institute of Technology, Cambridge, Mass., (1977) [6] Gray J.N., Notes on database operating systems. In Operating Systems: An Advanced Course, Lecture Notes in Computer Science, Springer-Verlag, New York, 60, 393-481 (1978), Science Dept., Univ. of Texas at Austin, July (1981). [7] HOARE, C.A.R. Communicating sequential processes Commun. ACM21, 8, 666-677 [8] B. Abdallah and H. A. ElMaraghy, “Deadlock Prevention and Avoidance in FMS: a Petri net based approach”, Int. J Manuf. Tech., [9] Li, Z. W., Uzam, M., and Zhou, M. C., “Comments on „Deadlock prevention policy based on Petri nets and siphons ”,‟ Int. J. Prod. Res., Vol. 42, No. 24, 2004, pp. 5253–5254. [10] Murata, T., “Petri nets: properties, analysis, and applications”.