lecture14-chapter06 - time so that the two processes have...

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

View Full Document Right Arrow Icon
Operating Systems Operating Systems Lecture 14: Lecture 14: Deadlock and Starvation Deadlock and Starvation Anda Iamnitchi [email protected] 1
Image of page 1

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

View Full Document Right Arrow Icon
Potential Deadlock 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
Image of page 2
Actual Deadlock Actual Deadlock HALT until B is free HALT until C is free HALT until D is free HALT until A is free
Image of page 3

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

View Full Document Right Arrow Icon
Deadlock 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
Image of page 4
Two Processes P and Q 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
Image of page 5

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

View Full Document Right Arrow Icon
Joint Progress Joint Progress Diagram of Deadlock Diagram of Deadlock
Image of page 6
Alternative logic Alternative logic Suppose that P does not need both resources at the same
Image of page 7

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

View Full Document Right Arrow Icon
Image of page 8
Image of page 9

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

View Full Document Right Arrow Icon
Image of page 10
Image of page 11

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

View Full Document Right Arrow Icon
Image of page 12
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: time so that the two processes have this form Diagram of Diagram of alternative logic alternative logic Resource Allocation Resource Allocation Graphs Graphs • Directed graph that depicts a state of the system of resources and processes • Process == circle, Resource == square Resource Allocation Graphs Resource Allocation Graphs 11 Four Conditions for Four Conditions for Deadlock Deadlock 1. Mutual exclusion condition – Only one process may use a resource at a time 1. Hold-and-wait condition – A process may hold allocated resources while awaiting assignment of others 1. No preemption condition – No resource can be forcibly removed form a process holding it 1. 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 Cars in Intersection, again...
View Full Document

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern