Deadlock and Starvation - Operating Systems - Lecture Slides, Slides of Computer Science

These are the Lecture Slides of Operating Systems which includes Sleeping Barber Problem, Waiting Customers, Chair and Sleeps, Barber Is Sleeping, New Customer Arrives, Barber Shop Hints, Customer Threads, Barber Invokes, Thread Invoking etc.Key important points are: Deadlock and Starvation, Potential Deadlock, Actual Deadlock, Deadlock, Triggered, Typically Involves, Competing, Resources, Efficient Solution, Bad News

Typology: Slides

2012/2013

Uploaded on 03/27/2013

ekana
ekana 🇮🇳

4

(44)

370 documents

1 / 12

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Operating Systems
Lecture 14:
Deadlock and Starvation
1
Docsity.com
pf3
pf4
pf5
pf8
pf9
pfa

Partial preview of the text

Download Deadlock and Starvation - Operating Systems - Lecture Slides and more Slides Computer Science in PDF only on Docsity!

Operating Systems

Lecture 14:

Deadlock and Starvation

Potential Deadlock

I need quad A and B

I need quad B and C

I need quad C and B

I need quad D and A

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

Alternative logic

• Suppose that P does not

need both resources at

the same time so that the

two processes have this

form

Diagram of

alternative logic

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