OS3e_07

OS3e_07 - Chapter 7 Deadlock and Indefinite Postponement...

Info iconThis preview shows pages 1–10. Sign up to view the full content.

View Full Document Right Arrow Icon
2004 Deitel & Associates, Inc. All rights reserved. Chapter 7 – Deadlock and Indefinite Postponement Outline 7.1 Introduction 7.2 Examples of Deadlock 7.2.1 Traffic Deadlock 7.2.2 Simple Resource Deadlock 7.2.3 Deadlock in Spooling Systems 7.2.4 Example: Dining Philosophers 7.3 Related Problem: Indefinite Postponement 7.4 Resource Concepts 7.5 Four Necessary Conditions for Deadlock 7.6 Deadlock Solutions 7.7 Deadlock Prevention 7.7.1 Denying the “Wait-For” Condition 7.7.2 Denying the “No-Preemption Condition 7.7.3 Denying the “Circular-Wait” Condition
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
2004 Deitel & Associates, Inc. All rights reserved. Chapter 7 – Deadlock and Indefinite Postponement Outline (continued) 7.8 Deadlock Avoidance with Dijkstra’s Banker’s Algorithm 7.8.1 Example of a Safe State 7.8.2 Example of an Unsafe State 7.8.3 Example of Safe-State-to-Unsafe-State Transition 7.8.4 Banker’s Algorithm Resource Allocation 7.8.5 Weaknesses in the Banker’s Algorithm 7.9 Deadlock Detection 7.9.1 Resource-Allocation Graphs 7.9.2 Reduction of Resource-Allocation Graphs 7.10 Deadlock Recovery 7.11 Deadlock Strategies in Current and Future Systems
Background image of page 2
2004 Deitel & Associates, Inc. All rights reserved. Objectives After reading this chapter, you should understand: the problem of deadlock. the four necessary conditions for deadlock to exist. the problem of indefinite postponement. the notions of deadlock prevention, avoidance, detection and recovery. algorithms for deadlock avoidance and detection. how systems can recover from deadlocks.
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
2004 Deitel & Associates, Inc. All rights reserved. 7.1 Introduction Deadlock A process or thread is waiting for a particular event that will not occur System deadlock One or more processes are deadlocked
Background image of page 4
2004 Deitel & Associates, Inc. All rights reserved. Figure 7.1 Traffic deadlock example. 7.2.1 Traffic Deadlock
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
2004 Deitel & Associates, Inc. All rights reserved. 7.2.2 Simple Resource Deadlock Most deadlocks develop because of the normal contention for dedicated resources Circular wait is characteristic of deadlocked systems
Background image of page 6
2004 Deitel & Associates, Inc. All rights reserved. Figure 7.2 Resource deadlock example. This system is deadlocked because each process holds a resource being requested by the other process and neither process is willing to release the resource it holds. 7.2.2 Simple Resource Deadlock
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
2004 Deitel & Associates, Inc. All rights reserved. 7.2.3 Deadlock in Spooling Systems Spooling systems are prone to deadlock Common solution Restrain input spoolers so that when the spooling file begins to reach some saturation threshold, the spoolers do not read in more print jobs Today’s systems Printing begins before the job is completed so that a full spooling file can be emptied even while a job is still executing Same concept has been applied to streaming audio and video
Background image of page 8
2004 Deitel & Associates, Inc. All rights reserved. 7.2.4 Example: Dining Philosophers
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 10
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 10/14/2009 for the course CSC 332 taught by Professor Leung during the Spring '09 term at NJIT.

Page1 / 38

OS3e_07 - Chapter 7 Deadlock and Indefinite Postponement...

This preview shows document pages 1 - 10. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online