Movatterモバイル変換


[0]ホーム

URL:


Uploaded byjamsibro140
PPTX, PDF26 views

Algorithm 4Chapter Four- Deadlock (5).pptx

Here is chapter four material use it

Embed presentation

Download to read offline
DeadlockChapter 41Operating System
2Deadlocks• System Model• Deadlock Characterization• Methods for Handling Deadlocks• Deadlock Prevention• Deadlock Avoidance• Deadlock Detection• Recovery from Deadlock• Combined Approach to Deadlock Handling
3The Deadlock Problem• A set of blocked processes each holding a resource and waiting toacquire a resource held by another process in the set.• Example: Suppose that process A asks for CD-ROM drive and gets it.A moment later, process B asks for the flatbed plotter and gets it, too.Now process A asks for the plotter and blocks waiting for it. Finallyprocess B asks for CD-ROM drive and also blocks. This situation iscalled a deadlock.
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.4
5Resources• A resource is anything that must be acquired, used, and releasedover the course of time• Resource types R1, R2, . . ., RmCPU cycles, memory space, I/O devices• Each resource type Ri has Wi instances.• A resource is anything that can only be used by a single process atany instance (at any amount).• Each process utilizes a resource as follows: request use release
6Preemptable and Non-preemptableResourcesPreemptable resource Can be taken away from a process Example : MemoryNon-preemptable resource Cannot be taken away from its current owner without causingthe computation to fail. Example : CD-ROM• Deadlock involves non-preemptable resources.
7What is Deadlock?• A Deadlock is a situation where a group of processes are permanentlyblocked as a result of each process having acquired a subset of theresources needed for its completion and waiting for release of theremaining resource held by others in the same group.• Deadlock occurs when two or more processes are each waiting for anevent that will never occur, since it can only be generated by anotherprocess in that set.• A set of blocked processes each holding a resource and waiting toacquire a resource held by another process in the set.
8Deadlock Characterization• Deadlock can arise if four conditions hold simultaneously. Mutual exclusion: only one process at a time can use a resource. Hold and wait: a process holding at least one resource is waitingto acquire additional resources held by other processes. No preemption: a resource can be released only voluntarily bythe process holding it, after that process has completed its task. Circular wait: there exists a set {P0, P1, …, P0} of waitingprocesses such that P0 is waiting for a resource that is held byP1, P1 is waiting for a resource that is held by P2, …, Pn–1 iswaiting for a resource that is held by Pn, and P0 is waiting for aresource that is held by P0.
9Deadlock Modeling: Resource-AllocationGraph• Two kinds of nodes: Squares— Represent resources –Instances of the resource are representedas dots within the box. Circles — Represent threads / processes.• Two kinds of (directed) edges: Request edge — from process to resource — indicates the process hasrequested the resource, and is waiting to acquire it. Assignment edge —from resource-instance to process— indicates theProcess is holding the resource instance. When a request is made, a request edge is added. When request is fulfilled, the request edge is transformed into anassignment edge. When process releases the resource, the assignment edge is deleted.
10Resource-Allocation Graph (Cont.)
11Resource-Allocation Graph (Cont.)
12Example of a Resource Allocation Graph
13Resource Allocation Graph With A Deadlock
14Resource Allocation Graph With A Cycle ButNo Deadlock
15Basic 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.
16Methods for Handling Deadlocks• Four strategies are used for dealing with deadlocks.1. Just ignore the problem.2. Detection and recovery3. Dynamic avoidance4. Prevention
17The Ostrich AlgorithmThe simplest approach is the ostrich algorithm: stick yourhead in the sand and pretend (assume) there is no problem
18Deadlock Detection and Recovery• Allow system to enter deadlock state• Detection algorithm• Recovery scheme
19Deadlock Detection with One Resource ofEach Type• For such a system, we can construct a resource graph.• If this graph contains one or more cycles, a deadlock exists.• Any process that is part of a cycle is deadlocked.• If no cycles exist, the system is not deadlocked.
20Deadlock Detection with One Resource ofEach Type• Example: consider a system with seven processes, A through G, and sixresources, R through W. The state of which resources are currentlyowned and which ones are currently being requested is as follows:1. Process A holds R and wants S.2. Process B holds nothing but wants T.3. Process C holds nothing but wants S.4. Process D holds U and wants S and T.5. Process E holds T and wants V.6. Process F holds W and wants S.7. Process G holds V and wants U.•Q: Is this system deadlocked? And if so, which processes are involved?
21Resource-Allocation Graph
22Recovery from DeadlockRecovery through Preemption• Select a victim• Suspend that process (Mark it as not runnable).• Take a resource away from the process and give it to another process.• Restart the suspended process.• Recovering this way is frequently difficult or impossible.• Choosing the process to suspend depends largely on which ones haveresources that can easily be taken back.
23Recovery from DeadlockRecovery through Rollback• Having processes check-pointed (a place where actions were stoped)periodically.• Check-pointing a process means that its state is written to a file sothat it can be restarted later.• The checkpoint contains not only the memory image, but also theresource state, in other words, which resources are currentlyassigned to the process.• To do the recovery, a process that owns a needed resource is rolledback to a point in time before it acquired that resource by starting atone of its earlier checkpoints.
24Recovery from DeadlockRecovery through Killing Processes• Abort(end) one process at a time until the deadlock cycle is eliminated.• If this does not help, it can be repeated until the cycle is broken.• Alternatively, a process not in the cycle can be chosen as the victim in orderto release its resources.• In which order should we choose to abort? Priority of the process. How long process has computed, and how much longer to completion. Resources the process has used. Resources process needs to complete. How many processes will need to be terminated. Is process interactive or batch?
25Deadlock Avoidance• Requires that the system has some additional a priori informationavailable. Simplest and most useful model requires that each processdeclare the maximum number of resources of each type that itmay need. The deadlock-avoidance algorithm dynamically examines theresource-allocation state to ensure that there can never be acircular-wait condition. Resource-allocation state is defined by the number of availableand allocated resources, and the maximum demands of theprocesses.
26Safe State• When a process requests an available resource, system must decide ifimmediate 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 Pican 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 canwait 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, andso on.
27Basic Facts• If a system is in safe state no deadlocks.⇒• If a system is in unsafe state possibility of deadlock.⇒• Avoidance ensure that a system will never enter an unsafe state.⇒
28Safe, unsafe , deadlock state spaces
29Deadlock PreventionRestrain the ways request can be made• Mutual Exclusion – not required for sharable resources; must holdfor non-sharable resources.• Hold and Wait – must guarantee that whenever a process requests aresource, it does not hold any other resources. Require process to request and be allocated all its resourcesbefore it begins execution, or allow process to requestresources only when the process has none. Low resource utilization; starvation possible.
30Deadlock Prevention (Cont.)• No Preemption – If a process that is holding some resources requestsanother resource that cannot be immediately allocated to it, then allresources currently being held are released. Preempted resources are added to the list of resources forwhich the process is waiting. Process will be restarted only when it can regain its oldresources, as well as the new ones that it is requesting.• Circular Wait – impose a total ordering of all resource types, andrequire that each process requests resources in an increasing order ofenumeration.
31Combined Approach to Deadlock HandlingPrevention (Cont.)• Combine the three basic approaches prevention avoidance detectionallowing the use of the optimal approach for each of resources in thesystem.• Partition resources into hierarchically ordered classes.• Use most appropriate technique for handling deadlocks within eachclass.
32The End

Recommended

PPT
A ppt on deadlock in operating systems for the better explanation
PPT
Deadlock
PPTX
Deadlock
PPTX
Lecture 4 Deadlocks in operating systems.pptx
PPTX
Ch 4 deadlock
PPTX
deadlock in OS.pptx
PPTX
Gp1242 007 oer ppt
PPTX
Deadlock detection & prevention
PPTX
Module 3 Deadlocks.pptx
PPT
Mch7 deadlock
PPTX
Operting System- unit5-part1_Deadlock.pptx
PPT
Os module 2 d
PPTX
Deadlock - An Operating System Concept.pptx
PPTX
Deadlock
PPTX
osvzjsjjdndnnssnnsnsndndndnndeadlock.pptx
PPT
Ch07 deadlocks
PPTX
operating system memory management with example
PPT
Dead Lock
PPT
Section07-Deadlocks_operating_system.ppt
PPT
Section07-Deadlocks (1).ppt
PPTX
6. Deadlock_1640227623705.pptx
PPTX
hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
PPTX
OS Module-3 (2).pptx
PPTX
Deadlock and memory management -- Operating System
PPT
Deadlock.ppt
PDF
9 deadlock
PPT
Deadlock
PPT
Deadlocks
PPT
RM chapter-4 (3).ppt measurements and descriptive
PPTX
RM chapter-5 (5).pptx survey and experimental

More Related Content

PPT
A ppt on deadlock in operating systems for the better explanation
PPT
Deadlock
PPTX
Deadlock
PPTX
Lecture 4 Deadlocks in operating systems.pptx
PPTX
Ch 4 deadlock
PPTX
deadlock in OS.pptx
PPTX
Gp1242 007 oer ppt
PPTX
Deadlock detection & prevention
A ppt on deadlock in operating systems for the better explanation
Deadlock
Deadlock
Lecture 4 Deadlocks in operating systems.pptx
Ch 4 deadlock
deadlock in OS.pptx
Gp1242 007 oer ppt
Deadlock detection & prevention

Similar to Algorithm 4Chapter Four- Deadlock (5).pptx

PPTX
Module 3 Deadlocks.pptx
PPT
Mch7 deadlock
PPTX
Operting System- unit5-part1_Deadlock.pptx
PPT
Os module 2 d
PPTX
Deadlock - An Operating System Concept.pptx
PPTX
Deadlock
PPTX
osvzjsjjdndnnssnnsnsndndndnndeadlock.pptx
PPT
Ch07 deadlocks
PPTX
operating system memory management with example
PPT
Dead Lock
PPT
Section07-Deadlocks_operating_system.ppt
PPT
Section07-Deadlocks (1).ppt
PPTX
6. Deadlock_1640227623705.pptx
PPTX
hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
PPTX
OS Module-3 (2).pptx
PPTX
Deadlock and memory management -- Operating System
PPT
Deadlock.ppt
PDF
9 deadlock
PPT
Deadlock
PPT
Deadlocks
Module 3 Deadlocks.pptx
Mch7 deadlock
Operting System- unit5-part1_Deadlock.pptx
Os module 2 d
Deadlock - An Operating System Concept.pptx
Deadlock
osvzjsjjdndnnssnnsnsndndndnndeadlock.pptx
Ch07 deadlocks
operating system memory management with example
Dead Lock
Section07-Deadlocks_operating_system.ppt
Section07-Deadlocks (1).ppt
6. Deadlock_1640227623705.pptx
hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
OS Module-3 (2).pptx
Deadlock and memory management -- Operating System
Deadlock.ppt
9 deadlock
Deadlock
Deadlocks

More from jamsibro140

PPT
RM chapter-4 (3).ppt measurements and descriptive
PPTX
RM chapter-5 (5).pptx survey and experimental
PPT
System development chapter six power point
PPT
Artificial intelligence chapter three power point
PPTX
Accounting for merchandise chapter four ppt
PPT
Enterprise_Systems_for_Management.power point
PPTX
Funda mental of information CHAPTER TWO.pptx
PPTX
Computer organization and architecture Chapter 1-1.pptx
PPTX
Operating system 1Chapter One- Introduction(0) (1).pptx
PPTX
2Chapter Two- Process Management(2) (1).pptx
PPT
Information system society Chapter one.ppt
PPTX
Machine learning Chapter three (16).pptx
PPTX
Information systems security chapter (5).pptx
PPTX
Data communication and computer network Chapter 2.pptx
PPT
Knowledge Management system_Slides_Ch 1.ppt
PPT
CHapter 2_text operation.ppt material for university students
PPTX
Computer organization and architecture Chapter 1 (3).PPTX
RM chapter-4 (3).ppt measurements and descriptive
RM chapter-5 (5).pptx survey and experimental
System development chapter six power point
Artificial intelligence chapter three power point
Accounting for merchandise chapter four ppt
Enterprise_Systems_for_Management.power point
Funda mental of information CHAPTER TWO.pptx
Computer organization and architecture Chapter 1-1.pptx
Operating system 1Chapter One- Introduction(0) (1).pptx
2Chapter Two- Process Management(2) (1).pptx
Information system society Chapter one.ppt
Machine learning Chapter three (16).pptx
Information systems security chapter (5).pptx
Data communication and computer network Chapter 2.pptx
Knowledge Management system_Slides_Ch 1.ppt
CHapter 2_text operation.ppt material for university students
Computer organization and architecture Chapter 1 (3).PPTX

Recently uploaded

PDF
45 ĐỀ LUYỆN THI IOE LỚP 8 THEO CHƯƠNG TRÌNH MỚI - NĂM HỌC 2024-2025 (CÓ LINK ...
PPTX
Time Series Analysis - Weighted (Unequal) Moving Average Method
PDF
AI and ICT for Teaching and Learning, Induction-cum-Training Programme, 5th 8...
PDF
The invasion of Alexander of Macedonia in India
PPTX
Anatomy of the eyeball An overviews.pptx
PPTX
kklklklklklklklk;lkpoipor[3rjdkjoe99759893058085
PDF
DEFINITION OF COMMUNITY Sociology. .pdf
PDF
Cattolica University - Lab Generative and Agentic AI - Mario Bencivinni
PDF
1. Doing Academic Research: Problems and Issues, 2. Academic Research Writing...
PPTX
Introduction to Beauty Care and Wellness Services.pptx-day fcs 3rd quarter tl...
PPT
n-1-PMES-Guidelines-for-SY-2025-2026.ppt
PPTX
Session 5 Overview of the PPST and Its Indicators (COI and NCOI).pptx
PDF
UGC NET Paper 1 Syllabus | 10 Units Complete Guide for NTA JRF
PPTX
Finals - History and Geography Quiz - Around the World in 80 Questions - IITK
PPTX
Masterclass on Cybercrime, Scams & Safety Hacks.pptx
PDF
Rigor, ethics, wellbeing and resilience in the biomedical doctoral journey
 
PDF
Digital Electronics – Registers and Their Applications
PDF
IMPATT Diodes: Theory, Construction, Operation, and Microwave Applications"
PPTX
G-Protein-Coupled Receptors (GPCRs): Structure, Mechanism, and Functions
PDF
Integrated Circuits: Lithography Techniques - Fundamentals and Advanced Metho...
45 ĐỀ LUYỆN THI IOE LỚP 8 THEO CHƯƠNG TRÌNH MỚI - NĂM HỌC 2024-2025 (CÓ LINK ...
Time Series Analysis - Weighted (Unequal) Moving Average Method
AI and ICT for Teaching and Learning, Induction-cum-Training Programme, 5th 8...
The invasion of Alexander of Macedonia in India
Anatomy of the eyeball An overviews.pptx
kklklklklklklklk;lkpoipor[3rjdkjoe99759893058085
DEFINITION OF COMMUNITY Sociology. .pdf
Cattolica University - Lab Generative and Agentic AI - Mario Bencivinni
1. Doing Academic Research: Problems and Issues, 2. Academic Research Writing...
Introduction to Beauty Care and Wellness Services.pptx-day fcs 3rd quarter tl...
n-1-PMES-Guidelines-for-SY-2025-2026.ppt
Session 5 Overview of the PPST and Its Indicators (COI and NCOI).pptx
UGC NET Paper 1 Syllabus | 10 Units Complete Guide for NTA JRF
Finals - History and Geography Quiz - Around the World in 80 Questions - IITK
Masterclass on Cybercrime, Scams & Safety Hacks.pptx
Rigor, ethics, wellbeing and resilience in the biomedical doctoral journey
 
Digital Electronics – Registers and Their Applications
IMPATT Diodes: Theory, Construction, Operation, and Microwave Applications"
G-Protein-Coupled Receptors (GPCRs): Structure, Mechanism, and Functions
Integrated Circuits: Lithography Techniques - Fundamentals and Advanced Metho...

Algorithm 4Chapter Four- Deadlock (5).pptx

  • 1.
  • 2.
    2Deadlocks• System Model•Deadlock Characterization• Methods for Handling Deadlocks• Deadlock Prevention• Deadlock Avoidance• Deadlock Detection• Recovery from Deadlock• Combined Approach to Deadlock Handling
  • 3.
    3The Deadlock Problem•A set of blocked processes each holding a resource and waiting toacquire a resource held by another process in the set.• Example: Suppose that process A asks for CD-ROM drive and gets it.A moment later, process B asks for the flatbed plotter and gets it, too.Now process A asks for the plotter and blocks waiting for it. Finallyprocess B asks for CD-ROM drive and also blocks. This situation iscalled a deadlock.
  • 4.
    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.4
  • 5.
    5Resources• A resourceis anything that must be acquired, used, and releasedover the course of time• Resource types R1, R2, . . ., RmCPU cycles, memory space, I/O devices• Each resource type Ri has Wi instances.• A resource is anything that can only be used by a single process atany instance (at any amount).• Each process utilizes a resource as follows: request use release
  • 6.
    6Preemptable and Non-preemptableResourcesPreemptableresource Can be taken away from a process Example : MemoryNon-preemptable resource Cannot be taken away from its current owner without causingthe computation to fail. Example : CD-ROM• Deadlock involves non-preemptable resources.
  • 7.
    7What is Deadlock?•A Deadlock is a situation where a group of processes are permanentlyblocked as a result of each process having acquired a subset of theresources needed for its completion and waiting for release of theremaining resource held by others in the same group.• Deadlock occurs when two or more processes are each waiting for anevent that will never occur, since it can only be generated by anotherprocess in that set.• A set of blocked processes each holding a resource and waiting toacquire a resource held by another process in the set.
  • 8.
    8Deadlock Characterization• Deadlockcan arise if four conditions hold simultaneously. Mutual exclusion: only one process at a time can use a resource. Hold and wait: a process holding at least one resource is waitingto acquire additional resources held by other processes. No preemption: a resource can be released only voluntarily bythe process holding it, after that process has completed its task. Circular wait: there exists a set {P0, P1, …, P0} of waitingprocesses such that P0 is waiting for a resource that is held byP1, P1 is waiting for a resource that is held by P2, …, Pn–1 iswaiting for a resource that is held by Pn, and P0 is waiting for aresource that is held by P0.
  • 9.
    9Deadlock Modeling: Resource-AllocationGraph•Two kinds of nodes: Squares— Represent resources –Instances of the resource are representedas dots within the box. Circles — Represent threads / processes.• Two kinds of (directed) edges: Request edge — from process to resource — indicates the process hasrequested the resource, and is waiting to acquire it. Assignment edge —from resource-instance to process— indicates theProcess is holding the resource instance. When a request is made, a request edge is added. When request is fulfilled, the request edge is transformed into anassignment edge. When process releases the resource, the assignment edge is deleted.
  • 10.
  • 11.
  • 12.
    12Example of aResource Allocation Graph
  • 13.
  • 14.
    14Resource Allocation GraphWith A Cycle ButNo Deadlock
  • 15.
    15Basic Facts• Ifgraph 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.
  • 16.
    16Methods for HandlingDeadlocks• Four strategies are used for dealing with deadlocks.1. Just ignore the problem.2. Detection and recovery3. Dynamic avoidance4. Prevention
  • 17.
    17The Ostrich AlgorithmThesimplest approach is the ostrich algorithm: stick yourhead in the sand and pretend (assume) there is no problem
  • 18.
    18Deadlock Detection andRecovery• Allow system to enter deadlock state• Detection algorithm• Recovery scheme
  • 19.
    19Deadlock Detection withOne Resource ofEach Type• For such a system, we can construct a resource graph.• If this graph contains one or more cycles, a deadlock exists.• Any process that is part of a cycle is deadlocked.• If no cycles exist, the system is not deadlocked.
  • 20.
    20Deadlock Detection withOne Resource ofEach Type• Example: consider a system with seven processes, A through G, and sixresources, R through W. The state of which resources are currentlyowned and which ones are currently being requested is as follows:1. Process A holds R and wants S.2. Process B holds nothing but wants T.3. Process C holds nothing but wants S.4. Process D holds U and wants S and T.5. Process E holds T and wants V.6. Process F holds W and wants S.7. Process G holds V and wants U.•Q: Is this system deadlocked? And if so, which processes are involved?
  • 21.
  • 22.
    22Recovery from DeadlockRecoverythrough Preemption• Select a victim• Suspend that process (Mark it as not runnable).• Take a resource away from the process and give it to another process.• Restart the suspended process.• Recovering this way is frequently difficult or impossible.• Choosing the process to suspend depends largely on which ones haveresources that can easily be taken back.
  • 23.
    23Recovery from DeadlockRecoverythrough Rollback• Having processes check-pointed (a place where actions were stoped)periodically.• Check-pointing a process means that its state is written to a file sothat it can be restarted later.• The checkpoint contains not only the memory image, but also theresource state, in other words, which resources are currentlyassigned to the process.• To do the recovery, a process that owns a needed resource is rolledback to a point in time before it acquired that resource by starting atone of its earlier checkpoints.
  • 24.
    24Recovery from DeadlockRecoverythrough Killing Processes• Abort(end) one process at a time until the deadlock cycle is eliminated.• If this does not help, it can be repeated until the cycle is broken.• Alternatively, a process not in the cycle can be chosen as the victim in orderto release its resources.• In which order should we choose to abort? Priority of the process. How long process has computed, and how much longer to completion. Resources the process has used. Resources process needs to complete. How many processes will need to be terminated. Is process interactive or batch?
  • 25.
    25Deadlock Avoidance• Requiresthat the system has some additional a priori informationavailable. Simplest and most useful model requires that each processdeclare the maximum number of resources of each type that itmay need. The deadlock-avoidance algorithm dynamically examines theresource-allocation state to ensure that there can never be acircular-wait condition. Resource-allocation state is defined by the number of availableand allocated resources, and the maximum demands of theprocesses.
  • 26.
    26Safe State• Whena process requests an available resource, system must decide ifimmediate 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 Pican 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 canwait 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, andso on.
  • 27.
    27Basic Facts• Ifa system is in safe state no deadlocks.⇒• If a system is in unsafe state possibility of deadlock.⇒• Avoidance ensure that a system will never enter an unsafe state.⇒
  • 28.
    28Safe, unsafe ,deadlock state spaces
  • 29.
    29Deadlock PreventionRestrain theways request can be made• Mutual Exclusion – not required for sharable resources; must holdfor non-sharable resources.• Hold and Wait – must guarantee that whenever a process requests aresource, it does not hold any other resources. Require process to request and be allocated all its resourcesbefore it begins execution, or allow process to requestresources only when the process has none. Low resource utilization; starvation possible.
  • 30.
    30Deadlock Prevention (Cont.)•No Preemption – If a process that is holding some resources requestsanother resource that cannot be immediately allocated to it, then allresources currently being held are released. Preempted resources are added to the list of resources forwhich the process is waiting. Process will be restarted only when it can regain its oldresources, as well as the new ones that it is requesting.• Circular Wait – impose a total ordering of all resource types, andrequire that each process requests resources in an increasing order ofenumeration.
  • 31.
    31Combined Approach toDeadlock HandlingPrevention (Cont.)• Combine the three basic approaches prevention avoidance detectionallowing the use of the optimal approach for each of resources in thesystem.• Partition resources into hierarchically ordered classes.• Use most appropriate technique for handling deadlocks within eachclass.
  • 32.

[8]ページ先頭

©2009-2025 Movatter.jp