Chapter 5 - Input, Output Notes | EduRev

: Chapter 5 - Input, Output Notes | EduRev

 Page 1


1
1
Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved. 0-13-6006639
MODERN OPERATING SYSTEMS
Third Edition
ANDREW S. TANENBAUM
Chapter 6
Deadlocks
Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved. 0-13-6006639
Slide 1 (Notes) 
Page 2


1
1
Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved. 0-13-6006639
MODERN OPERATING SYSTEMS
Third Edition
ANDREW S. TANENBAUM
Chapter 6
Deadlocks
Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved. 0-13-6006639
Slide 1 (Notes) 
Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved. 0-13-6006639
Preemptable and Nonpreemptable 
Resources
Sequence of events required to use a 
resource:
1. Request the resource.
2. Use the resource.
3. Release the resource.
Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved. 0-13-6006639
Slide 2 (Notes) 
Page 3


1
1
Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved. 0-13-6006639
MODERN OPERATING SYSTEMS
Third Edition
ANDREW S. TANENBAUM
Chapter 6
Deadlocks
Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved. 0-13-6006639
Slide 1 (Notes) 
Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved. 0-13-6006639
Preemptable and Nonpreemptable 
Resources
Sequence of events required to use a 
resource:
1. Request the resource.
2. Use the resource.
3. Release the resource.
Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved. 0-13-6006639
Slide 2 (Notes) 
3
Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved. 0-13-6006639
Figure 6-1. Using a semaphore to protect resources. 
(a) One resource. (b) Two resources.
Resource Acquisition (1)
Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved. 0-13-6006639
Slide 3 (Notes) 
Page 4


1
1
Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved. 0-13-6006639
MODERN OPERATING SYSTEMS
Third Edition
ANDREW S. TANENBAUM
Chapter 6
Deadlocks
Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved. 0-13-6006639
Slide 1 (Notes) 
Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved. 0-13-6006639
Preemptable and Nonpreemptable 
Resources
Sequence of events required to use a 
resource:
1. Request the resource.
2. Use the resource.
3. Release the resource.
Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved. 0-13-6006639
Slide 2 (Notes) 
3
Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved. 0-13-6006639
Figure 6-1. Using a semaphore to protect resources. 
(a) One resource. (b) Two resources.
Resource Acquisition (1)
Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved. 0-13-6006639
Slide 3 (Notes) 
4
Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved. 0-13-6006639
Figure 6-2. (a) 
Deadlock-free 
code. 
Resource Acquisition (2)
Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved. 0-13-6006639
Slide 4 (Notes) 
Page 5


1
1
Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved. 0-13-6006639
MODERN OPERATING SYSTEMS
Third Edition
ANDREW S. TANENBAUM
Chapter 6
Deadlocks
Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved. 0-13-6006639
Slide 1 (Notes) 
Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved. 0-13-6006639
Preemptable and Nonpreemptable 
Resources
Sequence of events required to use a 
resource:
1. Request the resource.
2. Use the resource.
3. Release the resource.
Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved. 0-13-6006639
Slide 2 (Notes) 
3
Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved. 0-13-6006639
Figure 6-1. Using a semaphore to protect resources. 
(a) One resource. (b) Two resources.
Resource Acquisition (1)
Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved. 0-13-6006639
Slide 3 (Notes) 
4
Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved. 0-13-6006639
Figure 6-2. (a) 
Deadlock-free 
code. 
Resource Acquisition (2)
Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved. 0-13-6006639
Slide 4 (Notes) 
5
Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved. 0-13-6006639
Figure 6-2. (b) Code with a 
potential deadlock.
Resource Acquisition (3)
Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved. 0-13-6006639
Slide 5 (Notes) 
Read More
Offer running on EduRev: Apply code STAYHOME200 to get INR 200 off on our premium plan EduRev Infinity!