lecture14-chapter06

# lecture14-chapter06 - form Diagram of alternative logic...

This preview shows pages 1–12. Sign up to view the full content.

Operating Systems Lecture 14: Deadlock and Starvation Anda Iamnitchi 1

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

View Full Document
Actual Deadlock HALT until B is free HALT until C is free HALT until D is free HALT until A is free

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

View Full Document
Deadlock A set of processes is deadlocked when each process in the set is blocked awaiting an event that can only be triggered by another blocked process in the set Typically involves processes competing for the same set of resources The bad news: no efficient solution
Two Processes P and Q Two processes P and Q, each needing exclusive access to a resource A and B for a period of time

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

View Full Document
Alternative logic Suppose that P does not need both resources at the same time so that the two processes have this

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

View Full Document

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

View Full Document

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: form Diagram of alternative logic Resource Allocation Graphs • Directed graph that depicts a state of the system of resources and processes • Process == circle, Resource == square Resource Allocation Graphs 11 Four Conditions for Deadlock 1. Mutual exclusion condition – Only one process may use a resource at a time 2. Hold ‐ and ‐ wait condition – A process may hold allocated resources while awaiting assignment of others 3. No preemption condition – No resource can be forcibly removed form a process holding it 4. Circular wait condition – A closed chain of processes exists, such that each process holds at least one resource needed by the next process in the chain Cars in Intersection, again...
View Full Document

{[ snackBarMessage ]}

### Page1 / 12

lecture14-chapter06 - form Diagram of alternative logic...

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

View Full Document
Ask a homework question - tutors are online