SlideShare a Scribd company logo
1 of 13
DEADLOCKS
CHAPTER – 7
DEADLOCK
 Definition:
 A deadlock is a situation in which two computer
programs sharing the same resource are effectively
preventing each other from accessing the resource,
resulting in both programs ceasing to function.
 The reason, why earliest computer OS ran only one
program
at a time.
 A set of processes is deadlocked if each process in
the set is waiting for an event that only another
process can trigger.
CONTINUE...
 As all the processes in the set are waiting for an
another process to trigger an event that could wake
up any of the other members of the set, all the
processes would wait for ever.
 None of the processes can run, none of them can
release any resource, and thus none can be awakened.
 The no. of processes and the no. and kind of
resources processed and requested are unimp..
This kind of request holds for any kind of resource
and is called Resource Deadlock.
CHARACTERISTICS OF DEADLOCK
 A deadlock situation can arise if the following four
conditions hold simultaneously in a system:
1. Mutual Exclusion
2. Hold & Wait
3. No Pre-emption
4. Circular wait.
PREVENTION TECHNIQUES
 The methods to prevent the Deadlock
are:
1. Attacking the Mutual Exclusion
Condition.
2. Attacking the Hold & Wait Condition.
3. Attacking the No Pre-emption
Condition.
4. Attacking the Circular Wait Condition.
ATTACKING THE MUTUAL EXCLUSION
CONDITION
 Mutual Exclusion: For two processes, if any one
process is accessing the common resource then the
another process is excluded from accessing the
resource.
 Thus, each resource is either currently allocated to
exactly one process or it is available for other
process to access it. Two processes can’t
simultaneously access the common resource.
EXAMPLE
 It is clear that by allowing two processes to write on the
printer
simultaneously will lead to chaos.
 Actually, the only process which requests the physical
printer is the printer daemon.
 Printer daemon never requests any other resource, so
the deadlock can be eliminated and also it prints only
after the complete o/p file is available.
 But this could in itself lead to deadlock for two processes
having finished their part, but not all, of their o/p, and can’t
continue.
 Thus, avoiding to assign a resource unless not
absolutely necessary and try to make less
processes request for the resource.
ATTACKING THE HOLD & WAIT
CONDITION
 Hold and Wait: In this scenario, processes currently
holding resource can request new resource to
complete its task.
 If the process requests all the resources before
starting the execution, deadlocks can be eliminated.
 I.E. if everything is available, process will be
allocated whatever it needs and can run to
completion.
 Whereas, if one or more of the requested resource
is/are busy, then nothing will be allocated and the
process would just wait for the resource to become
free and enter the critical region.
 The problem that how many resources does a
process may need can’t be known until it has started
EXAMPLE
 Consider a process, that reads data from an i/p tape,
analyzes it for an hour, and then writes an o/p tape as
well as plotting the results.
 Thus, if all resources are requested in adv, the process
will tie up the o/p tape and the plotter for an hour.
 Thus, this method wastes the resources as for an
hour no other process would be able to use the
plotter and the o/p tape.
ATTACKING THE NO PRE-EMPTION CONDITION
 No Pre-emption: Once a process holds a resource, it
can’t be taken away by another process or the kernel
and resource can only be voluntarily released by the
process.
 Example: if a process is assigned a printer and is in the
middle of printing its output, forcibly taking away the
printer because the plotter needed isn’t available is not
possible.
 Thus, a resource can be used only if the process
holding it, releases it voluntarily.
ATTACKING THE CIRCULAR WAIT
CONDITION
 Circular wait: Each process is waiting to obtain a
resource which is held by another process.
 The circular wait can be eliminated by a rule that if a
process is holding a resource at the moment then it
can’t request for other resource, and if it wants to
access the other resource then it must release the first
one.
 Another way to avoid the circular wait is to provide a
global numbering of all the resources.
 A process can request whenever it wants, but all the
request
must be made in numerical order.
EXAMPLE
 Consider the following resources numbered as below:
1. Image setter
2. Scanner
3. Plotter
4. Tape-Drive
5. CD-ROM drive.
• A process may request first a printer and then a tape drive, but it can’t request
first a plotter and then a printer.
Example
 Here, if A requests for j ;
i>j, then A is not allowed
to request j because
that is lower than what it
already has.
 Similarly, if B requests
for i; i<j, then B is not
allowed to request for i.
 Thus, either way
deadlock
is not possible.
A
i
B
j

More Related Content

Similar to Deadlocks

4.3 Deadlock [Autosaved].pptx
4.3 Deadlock [Autosaved].pptx4.3 Deadlock [Autosaved].pptx
4.3 Deadlock [Autosaved].pptxDishaDwivedi2
 
3.6 Deadlock-operating system unit 3.pptx
3.6 Deadlock-operating system unit 3.pptx3.6 Deadlock-operating system unit 3.pptx
3.6 Deadlock-operating system unit 3.pptxsvulasal
 
Os case study word
Os case study wordOs case study word
Os case study wordDhol Yash
 
Deadlocks prefinal
Deadlocks prefinalDeadlocks prefinal
Deadlocks prefinalmarangburu42
 
Deadlocksprefinal 161014115456
Deadlocksprefinal 161014115456Deadlocksprefinal 161014115456
Deadlocksprefinal 161014115456marangburu42
 
Deadlock and Banking Algorithm
Deadlock and Banking AlgorithmDeadlock and Banking Algorithm
Deadlock and Banking AlgorithmMD.ANISUR RAHMAN
 
Deadlocks 160928121516-160928183232
Deadlocks 160928121516-160928183232Deadlocks 160928121516-160928183232
Deadlocks 160928121516-160928183232marangburu42
 
Deadlock in Operating System
Deadlock in Operating SystemDeadlock in Operating System
Deadlock in Operating SystemSanthiNivas
 
Process Synchronization And Deadlocks
Process Synchronization And DeadlocksProcess Synchronization And Deadlocks
Process Synchronization And Deadlockstech2click
 
Deadlock in Operating System
Deadlock in Operating SystemDeadlock in Operating System
Deadlock in Operating SystemAUST
 
Deadlock and memory management -- Operating System
Deadlock and memory management -- Operating SystemDeadlock and memory management -- Operating System
Deadlock and memory management -- Operating SystemEktaVaswani2
 

Similar to Deadlocks (20)

4.3 Deadlock [Autosaved].pptx
4.3 Deadlock [Autosaved].pptx4.3 Deadlock [Autosaved].pptx
4.3 Deadlock [Autosaved].pptx
 
Ch 4 deadlock
Ch 4 deadlockCh 4 deadlock
Ch 4 deadlock
 
3.6 Deadlock-operating system unit 3.pptx
3.6 Deadlock-operating system unit 3.pptx3.6 Deadlock-operating system unit 3.pptx
3.6 Deadlock-operating system unit 3.pptx
 
OS 7.pptx
OS 7.pptxOS 7.pptx
OS 7.pptx
 
Os module 2 d
Os module 2 dOs module 2 d
Os module 2 d
 
Module3
Module3Module3
Module3
 
Os case study word
Os case study wordOs case study word
Os case study word
 
Distributed deadlock
Distributed deadlockDistributed deadlock
Distributed deadlock
 
Deadlocks prefinal
Deadlocks prefinalDeadlocks prefinal
Deadlocks prefinal
 
Deadlocksprefinal 161014115456
Deadlocksprefinal 161014115456Deadlocksprefinal 161014115456
Deadlocksprefinal 161014115456
 
Deadlocks
DeadlocksDeadlocks
Deadlocks
 
Deadlocks final
Deadlocks finalDeadlocks final
Deadlocks final
 
Deadlock and Banking Algorithm
Deadlock and Banking AlgorithmDeadlock and Banking Algorithm
Deadlock and Banking Algorithm
 
Deadlocks 160928121516-160928183232
Deadlocks 160928121516-160928183232Deadlocks 160928121516-160928183232
Deadlocks 160928121516-160928183232
 
ikh311-05
ikh311-05ikh311-05
ikh311-05
 
Deadlock in Operating System
Deadlock in Operating SystemDeadlock in Operating System
Deadlock in Operating System
 
Process Synchronization And Deadlocks
Process Synchronization And DeadlocksProcess Synchronization And Deadlocks
Process Synchronization And Deadlocks
 
Deadlock in Operating System
Deadlock in Operating SystemDeadlock in Operating System
Deadlock in Operating System
 
Deadlock and memory management -- Operating System
Deadlock and memory management -- Operating SystemDeadlock and memory management -- Operating System
Deadlock and memory management -- Operating System
 
Deadlocks in operating system
Deadlocks in operating systemDeadlocks in operating system
Deadlocks in operating system
 

More from Munazza-Mah-Jabeen (20)

Virtual Functions
Virtual FunctionsVirtual Functions
Virtual Functions
 
The Standard Template Library
The Standard Template LibraryThe Standard Template Library
The Standard Template Library
 
Object-Oriented Software
Object-Oriented SoftwareObject-Oriented Software
Object-Oriented Software
 
Templates and Exceptions
 Templates and Exceptions Templates and Exceptions
Templates and Exceptions
 
Dictionaries and Sets
Dictionaries and SetsDictionaries and Sets
Dictionaries and Sets
 
More About Strings
More About StringsMore About Strings
More About Strings
 
Streams and Files
Streams and FilesStreams and Files
Streams and Files
 
Lists and Tuples
Lists and TuplesLists and Tuples
Lists and Tuples
 
Files and Exceptions
Files and ExceptionsFiles and Exceptions
Files and Exceptions
 
Functions
FunctionsFunctions
Functions
 
Pointers
PointersPointers
Pointers
 
Repitition Structure
Repitition StructureRepitition Structure
Repitition Structure
 
Inheritance
InheritanceInheritance
Inheritance
 
Operator Overloading
Operator OverloadingOperator Overloading
Operator Overloading
 
Memory Management
Memory ManagementMemory Management
Memory Management
 
Arrays and Strings
Arrays and StringsArrays and Strings
Arrays and Strings
 
Objects and Classes
Objects and ClassesObjects and Classes
Objects and Classes
 
Functions
FunctionsFunctions
Functions
 
Structures
StructuresStructures
Structures
 
Loops and Decisions
Loops and DecisionsLoops and Decisions
Loops and Decisions
 

Recently uploaded

Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Celine George
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppCeline George
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxRoyAbrique
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsKarinaGenton
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 

Recently uploaded (20)

Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website App
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its Characteristics
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 

Deadlocks

  • 2. DEADLOCK  Definition:  A deadlock is a situation in which two computer programs sharing the same resource are effectively preventing each other from accessing the resource, resulting in both programs ceasing to function.  The reason, why earliest computer OS ran only one program at a time.  A set of processes is deadlocked if each process in the set is waiting for an event that only another process can trigger.
  • 3. CONTINUE...  As all the processes in the set are waiting for an another process to trigger an event that could wake up any of the other members of the set, all the processes would wait for ever.  None of the processes can run, none of them can release any resource, and thus none can be awakened.  The no. of processes and the no. and kind of resources processed and requested are unimp.. This kind of request holds for any kind of resource and is called Resource Deadlock.
  • 4. CHARACTERISTICS OF DEADLOCK  A deadlock situation can arise if the following four conditions hold simultaneously in a system: 1. Mutual Exclusion 2. Hold & Wait 3. No Pre-emption 4. Circular wait.
  • 5. PREVENTION TECHNIQUES  The methods to prevent the Deadlock are: 1. Attacking the Mutual Exclusion Condition. 2. Attacking the Hold & Wait Condition. 3. Attacking the No Pre-emption Condition. 4. Attacking the Circular Wait Condition.
  • 6. ATTACKING THE MUTUAL EXCLUSION CONDITION  Mutual Exclusion: For two processes, if any one process is accessing the common resource then the another process is excluded from accessing the resource.  Thus, each resource is either currently allocated to exactly one process or it is available for other process to access it. Two processes can’t simultaneously access the common resource.
  • 7. EXAMPLE  It is clear that by allowing two processes to write on the printer simultaneously will lead to chaos.  Actually, the only process which requests the physical printer is the printer daemon.  Printer daemon never requests any other resource, so the deadlock can be eliminated and also it prints only after the complete o/p file is available.  But this could in itself lead to deadlock for two processes having finished their part, but not all, of their o/p, and can’t continue.  Thus, avoiding to assign a resource unless not absolutely necessary and try to make less processes request for the resource.
  • 8. ATTACKING THE HOLD & WAIT CONDITION  Hold and Wait: In this scenario, processes currently holding resource can request new resource to complete its task.  If the process requests all the resources before starting the execution, deadlocks can be eliminated.  I.E. if everything is available, process will be allocated whatever it needs and can run to completion.  Whereas, if one or more of the requested resource is/are busy, then nothing will be allocated and the process would just wait for the resource to become free and enter the critical region.  The problem that how many resources does a process may need can’t be known until it has started
  • 9. EXAMPLE  Consider a process, that reads data from an i/p tape, analyzes it for an hour, and then writes an o/p tape as well as plotting the results.  Thus, if all resources are requested in adv, the process will tie up the o/p tape and the plotter for an hour.  Thus, this method wastes the resources as for an hour no other process would be able to use the plotter and the o/p tape.
  • 10. ATTACKING THE NO PRE-EMPTION CONDITION  No Pre-emption: Once a process holds a resource, it can’t be taken away by another process or the kernel and resource can only be voluntarily released by the process.  Example: if a process is assigned a printer and is in the middle of printing its output, forcibly taking away the printer because the plotter needed isn’t available is not possible.  Thus, a resource can be used only if the process holding it, releases it voluntarily.
  • 11. ATTACKING THE CIRCULAR WAIT CONDITION  Circular wait: Each process is waiting to obtain a resource which is held by another process.  The circular wait can be eliminated by a rule that if a process is holding a resource at the moment then it can’t request for other resource, and if it wants to access the other resource then it must release the first one.  Another way to avoid the circular wait is to provide a global numbering of all the resources.  A process can request whenever it wants, but all the request must be made in numerical order.
  • 12. EXAMPLE  Consider the following resources numbered as below: 1. Image setter 2. Scanner 3. Plotter 4. Tape-Drive 5. CD-ROM drive. • A process may request first a printer and then a tape drive, but it can’t request first a plotter and then a printer.
  • 13. Example  Here, if A requests for j ; i>j, then A is not allowed to request j because that is lower than what it already has.  Similarly, if B requests for i; i<j, then B is not allowed to request for i.  Thus, either way deadlock is not possible. A i B j