10_Deadlocks_I

10_Deadlocks_I - CSC 4103 - Operating Systems Fall 2009...

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

View Full Document Right Arrow Icon
1 CSC 4103 - Operating Systems Fall 2009 Tevfik Ko ! ar Louisiana State University September 24 th , 2009 Lecture - X Deadlocks - I 2 Roadmap • Deadlocks Deadlock Characterization Deadlock Detection • Resource Allocation Graphs • Classic Problems of Synchronization Bounded Buffer 3 The Deadlock Problem • A set of blocked processes each holding a resource and waiting to acquire a resource held by another process in the set. Example System has 2 disk drives. P 1 and P 2 each hold one disk drive and each needs another one. Example semaphores A and B , initialized to 1 P 0 P 1 wait (A); wait(B) wait (B); wait(A) 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. 5 Deadlock vs Starvation Deadlock – two or more processes are waiting indefinitely for an event that can be caused by only one of the waiting processes Starvation – indefinite blocking. A process may never be removed from the semaphore queue in which it is suspended. 6
Background image of page 1

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

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

This note was uploaded on 10/01/2011 for the course CSC 4103 taught by Professor Ullmer,b during the Fall '08 term at LSU.

Page1 / 4

10_Deadlocks_I - CSC 4103 - Operating Systems Fall 2009...

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

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