11-Deadlocks_II_2spp

11-Deadlocks_II_2spp - CSE 421/521 - Operating Systems Fall...

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

View Full Document Right Arrow Icon
1 CSE 421/521 - Operating Systems Fall 2011 Tevfik Ko ş ar University at Buffalo October 6 th , 2011 Lecture - XI Deadlocks - II 2 Roadmap • Deadlocks Resource Allocation Graphs Deadlock Prevention Deadlock Detection
Background image of page 1

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

View Full DocumentRight Arrow Icon
3 Deadlock Characterization 1. Mutual exclusion: nonshared resources; only one process at a time can use a specific resource 2. Hold and wait: a process holding at least one resource is waiting to acquire additional resources held by other processes 3. No preemption: a resource can be released only voluntarily by the process holding it, after that process has completed its task Deadlock can arise if four conditions hold simultaneously. 4 Deadlock Characterization (cont.) 4. Circular wait: there exists a set { P 0 , P 1 , …, P n } of waiting processes such that P 0 is waiting for a resource that is held by P 1 , P 1 is waiting for a resource that is held by P 2 , …, P n –1 is waiting for a resource that is held by P n , and P n is waiting for a resource that is held by P 0 . Deadlock can arise if four conditions hold simultaneously.
Background image of page 2
5 Resource-Allocation Graph • V is partitioned into two types: P = { P 1 , P 2 , …, P n }, the set consisting of all the processes in the system. R = { R 1 , R 2 , …, R m }, the set consisting of all resource types in the system. P requests R directed edge P 1 R j R is assigned to P directed edge R j P i Used to describe deadlocks Consists of a set of vertices V and a set of edges E . 6 Resource-Allocation Graph (Cont.) • Process • Resource Type with 4 instances P i requests instance of R j P i is holding an instance of R j P i P i R j R j
Background image of page 3

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

View Full DocumentRight Arrow Icon
7 Example of a Resource Allocation Graph 8 Basic Facts
Background image of page 4
Image of page 5
This is the end of the preview. Sign up to access the rest of the document.

This document was uploaded on 11/12/2011.

Page1 / 15

11-Deadlocks_II_2spp - CSE 421/521 - Operating Systems Fall...

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

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